Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python 3.9-dev support #165

Merged
merged 1 commit into from
Jul 3, 2020
Merged

Add python 3.9-dev support #165

merged 1 commit into from
Jul 3, 2020

Conversation

pdecat
Copy link
Collaborator

@pdecat pdecat commented Jul 1, 2020

Replace python version 3.8-dev by 3.8 and add 3.9-dev.

We may want to drop 3.4 and maybe even 2.7 at some point, but there's no real gain right now. Maybe later if a cleanup or refactoring is considered at some point.

See https://devguide.python.org/#status-of-python-branches for officially supported python branches.

@pdecat
Copy link
Collaborator Author

pdecat commented Jul 1, 2020

Travis CI job: https://travis-ci.org/github/venth/aws-adfs/builds/703765067

Like I said in #164 (review), I'm not sure why the Travis build results do not show up in PRs. Probably some settings to adjust.

Alternatively, we switch to Github Actions to get a more streamlined experience.

@pdecat
Copy link
Collaborator Author

pdecat commented Jul 1, 2020

Some tests are failing with python 3.9-dev: https://travis-ci.org/github/venth/aws-adfs/jobs/703765074

test/test_account_aliases_fetcher.py .......                             [ 23%]
test/test_assertion_extractor.py ..FFF                                   [ 40%]
test/test_authenticator.py .....                                         [ 56%]
test/test_click_parses_command_line_arguments.py .                       [ 60%]
test/test_config_preparation.py ..                                       [ 66%]
test/test_fetch_html_encoded_roles.py ..                                 [ 73%]
test/test_role_chooser.py .......                                        [ 96%]
test/test_version.py .                                                   [100%]

The underlying error is the same for all three failing tests:

>           encoded_assertion = base64.encodestring(assertion.encode('utf-8')).decode('utf-8')
E           AttributeError: module 'base64' has no attribute 'encodestring'

@pdecat
Copy link
Collaborator Author

pdecat commented Jul 1, 2020

From https://docs.python.org/3.9/whatsnew/3.9.html#removed:

base64.encodestring() and base64.decodestring(), aliases deprecated since Python 3.1, have been removed: use base64.encodebytes() and base64.decodebytes() instead.

Note: simply replacing base64.encodestring() calls to base64.encodebytes() would mean dropping support for python 2.7 (and < 3.1) which only has base64.encodestring().

@pdecat pdecat changed the title Update tested python versions Add python 3.9-dev support Jul 1, 2020
@venth venth merged commit 9413211 into venth:master Jul 3, 2020
@pdecat
Copy link
Collaborator Author

pdecat commented Jul 3, 2020

Hi @venth, sorry this wasn't ready to merge as I did not yet fix the code compatibility for python 3.9-dev while maintaining backward compatibility with 2.7 and 3.1.

@venth
Copy link
Owner

venth commented Jul 3, 2020 via email

@venth
Copy link
Owner

venth commented Jul 5, 2020

Commit reverted. Sorry, I was too hasty :)

@pdecat pdecat mentioned this pull request Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants