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

Migration to Python3 #3616

Merged
merged 253 commits into from
Dec 11, 2024
Merged

Migration to Python3 #3616

merged 253 commits into from
Dec 11, 2024

Conversation

milescalabresi
Copy link
Contributor

@milescalabresi milescalabresi commented Feb 17, 2023

Migrate the codebase to Python 3 (currently 3.7, aiming for higher once we bump Django and other packages)

Fixes #2576.

full command/config: python -m modernize --no-diffs --write --nobackups --six-unicode --enforce --fix=default --fix=libmodernize.fixes.fix_open -f classic_division -f open -f idioms -f set_literal -f ws_comma .
@milescalabresi milescalabresi added Infrastructure Security Development Future Django Work in progress dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Feb 17, 2023
@hwatheod
Copy link
Contributor

Regarding Python 3.7, its end-of-life is only a few months way (2023-06-27).

@milescalabresi
Copy link
Contributor Author

Good catch, Ted. I think we want to avoid upgrading Django in this PR (the main limiting library), but we should make a separate issue to bump Django as soon as possible. Then we can bump to a current version of Python. Only potential reason I can see to do it sooner is that this tool https://docs.python.org/3.10/library/functools.html#functools.cmp_to_key buys us a lot of ground with the cmp issue

@milescalabresi
Copy link
Contributor Author

milescalabresi commented Feb 24, 2023

For the record, once the tests are fixed up and everything, you can test locally by running fab manage:test. EDIT: to test Python 3, see #3411 (comment)

@willgearty
Copy link
Member

🤩

@milescalabresi milescalabresi merged commit 117be38 into main Dec 11, 2024
5 checks passed
@milescalabresi milescalabresi deleted the migration-to-python3 branch December 11, 2024 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment