Skip to content

python3.12 upgrade#4219

Open
Rob-Johnson wants to merge 2 commits intomasterfrom
u/robj/py312-upgrade
Open

python3.12 upgrade#4219
Rob-Johnson wants to merge 2 commits intomasterfrom
u/robj/py312-upgrade

Conversation

@Rob-Johnson
Copy link
Contributor

  • removed focal support
  • bumped six, py, pygpgme, black.
  • dropped tomli and exceptiongroup (now part of stdlib)
  • lots of reformatting

sorry for the big diff - this was roughly the smallest single-commit I could make

@Rob-Johnson Rob-Johnson requested a review from a team as a code owner February 2, 2026 14:40
@Rob-Johnson Rob-Johnson marked this pull request as draft February 2, 2026 14:45
@Rob-Johnson Rob-Johnson changed the base branch from u/robj/remove-pylint-astroid to u/robj/pipx-virtualenv February 2, 2026 19:43
@Rob-Johnson Rob-Johnson force-pushed the u/robj/py312-upgrade branch 2 times, most recently from fc9f6f6 to 2388dde Compare February 3, 2026 13:13
@Rob-Johnson Rob-Johnson changed the base branch from u/robj/pipx-virtualenv to master February 3, 2026 16:23
@Rob-Johnson Rob-Johnson marked this pull request as ready for review February 3, 2026 16:42
Copy link
Member

@nemacysts nemacysts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what i've tried to do in the past for python version upgrades is

  • one commit that bumps the version
  • one-to-N commit(s) that bump pre-commit hooks and adds any changes
  • {misc commit if needed}

so that linting/formatting don't obscure actual changes - but I took a look at the non-python files and this should be fine :)

that said: i do think we have some extra requirements in requirements-minimal.txt if i'm not mistaken

"paasta_tools.cli.cmds.mark_for_deployment.validate_service_name",
autospec=True,
return_value=True,
with (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whaddayaknow - a black formatting change that doesn't make things uglier/i like!

Comment on lines +30 to +32
# dh_strip/objcopy corrupts _gpgme.cpython-312 at build time; exclude to keep packaging working.
override_dh_strip:
dh_strip --exclude=_gpgme.cpython-
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, do i even wanna ask? :p

graphviz
grpcio
gunicorn
gunicorn >= 25.0.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally we wouldn't really have any bounds here (and treat this like our internal pyproject.toml where we only add bounds if absolutely necessary) since in both cases we have a lockfile

...but there's already a decent number of lower-bounds here so i guess this is fine

graphviz==0.8.2
grpcio==1.62.2
gunicorn==19.8.1
gunicorn==25.0.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somewhat scary-looking bump - but afaict the breaking changes from https://github.com/benoitc/gunicorn/releases shouldn't affect us

@Rob-Johnson
Copy link
Contributor Author

what i've tried to do in the past for python version upgrades is

* one commit that bumps the version

* one-to-N commit(s) that bump pre-commit hooks and adds any changes

* {misc commit if needed}

so that linting/formatting don't obscure actual changes - but I took a look at the non-python files and this should be fine :)

that said: i do think we have some extra requirements in requirements-minimal.txt if i'm not mistaken

yeah, I'm always a bit conflicted, because I also try and stick to 'every commit should pass the linter/tests and be safe to roll back to'. so I guess I could have made a bunch of commits and then squashed them all, but 🤷 . also, the github UI doesn't really make it easy to review indiviudal commits, so I'm not sure how much better things get for you.

@Rob-Johnson
Copy link
Contributor Author

also opened #4227 to try and waste less of your time reviewing requirements-*.txt @nemacysts!

@nemacysts
Copy link
Member

yeah, I'm always a bit conflicted, because I also try and stick to 'every commit should pass the linter/tests and be safe to roll back to'. so I guess I could have made a bunch of commits and then squashed them all, but 🤷 . also, the github UI doesn't really make it easy to review indiviudal commits, so I'm not sure how much better things get for you.

yea, it's not great for leaving comments (i usually end up leaving the per-commit view if i actually need/want to leave a comment :p) - but in the usual best-case scenario where there's no comments it can make it easier to skip through files that only have no-op linting changes

nemacysts
nemacysts previously approved these changes Feb 5, 2026
bumped six, py, pygpgme, black, splunk-sdk, venusian, gunicorn
dropped tomli and exceptiongroup (now part of stdlib)

add an override to the dh_strip interaction with py-gpgme

lots of reformatting
Copy link

@giuli007 giuli007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

4 participants