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

Python 3.12 compatibility for build tooling #715

Merged
merged 8 commits into from
May 23, 2024
Merged

Python 3.12 compatibility for build tooling #715

merged 8 commits into from
May 23, 2024

Conversation

dzuelke
Copy link
Contributor

@dzuelke dzuelke commented May 22, 2024

Ubuntu 24.04 ships with Python 3.12, which deprecates a few things we use (distutils.version, datetime.datetime.utc*).

More crucially, bob-builder uses boto, which due to a weird vendoring of six is incompatible with Python 3.12, so we need to update it to 0.0.20, which uses boto3.

That version picks up S3_REGION from the environment, but our S3_REGION values so far contained a prefix of "s3.".

GUS-W-15794852

@dzuelke dzuelke requested a review from a team as a code owner May 22, 2024 18:51
support/build/_docker/heroku-20.Dockerfile Outdated Show resolved Hide resolved
support/build/_docker/heroku-22.Dockerfile Show resolved Hide resolved
@dzuelke dzuelke force-pushed the python312-compat branch 2 times, most recently from 62eb973 to 66e5979 Compare May 22, 2024 19:45
Ubuntu 24.04 no longer allows a "direct" install of pip packages without a virtual environment, so in preparation for that, we're now setting up a venv.

GUS-W-15794852
We use the natsort PyPI package now - distutils.versions is deprecated in Python 3.12, which Ubuntu 24.04 ships with.

GUS-W-15794852
Not passing timezones explicitly is deprecated in Python 3.12, which Ubuntu 24.04 ships with.

GUS-W-15794852
Not passing timezones explicitly is deprecated in Python 3.12, which Ubuntu 24.04 ships with.

GUS-W-15794852
We are upgrading to bob-builder 0.0.20, which will be able to use the S3_REGION env var, but it needs a "correct" value, like "us-east-1".

GUS-W-15794852
It now uses boto3, which, unlike the old boto, works with Python 3.12 or newer, and that's what Ubuntu 24.04 ships with.

GUS-W-15794852
@dzuelke dzuelke merged commit 6b58b7f into main May 23, 2024
10 checks passed
@dzuelke dzuelke deleted the python312-compat branch May 23, 2024 18:40
@heroku-linguist heroku-linguist bot mentioned this pull request May 29, 2024
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.

None yet

2 participants