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

WIP python 3.12 upgrade #657

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

WIP python 3.12 upgrade #657

wants to merge 10 commits into from

Conversation

chris48s
Copy link
Member

@chris48s chris48s commented Oct 16, 2024

And so the "upgrade all the things" project rumbles on.

@@ -11,7 +11,7 @@ project_urls =
Tracker = https://github.com/DemocracyClub/dc_logging/issues

[options]
python_requires = >=3.8
python_requires = >=3.11
Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like there are 2 places we care about using this package:

  1. In our applications (which are all now running on python 3.12, across the board)
  2. In AWS CloudShell.

TIL AWS CloudShell. TI also L that the most recent python version available in the Amazon Linux 2023 repository is still python 3.11. Obviously there are other ways to get python on there (pyenv, uv, etc) but it seems like the lowest friction thing to do here is say we are compatible with >=3.11 and leave the instructions in https://github.com/DemocracyClub/dc_logging/blob/main/dc_logging_legacy_import/README.md#running-from-aws-cloudshell as they are for now.

I think we can live with the test suite only being run against 3.12 though. Does that seem right to you?

@chris48s chris48s changed the title python 3.12 upgrade WIP python 3.12 upgrade Oct 16, 2024
sometimes we get a 202 with a handled error
lets log that
@chris48s
Copy link
Member Author

Suspect this one might end up sitting around open for a bit, so some notes:

I tried deploying this to the dev account. When deployed to dev I can log a message and the log pops up in the S3 bucket as expected. (I've now rolled those commits back). The code works fine on python 3.12. It is the mocking that is causing the test failure.

I managed to track down the reason for the test failure to

error running docker: 404 Client Error for http+docker://localhost/v1.43/images/create?tag=python3.12&fromImage=lambci%2Flambda: Not Found ("manifest for lambci/lambda:python3.12 not found: manifest unknown: manifest unknown")

I've pushed 38c5032 which will now log that error instead of swallowing it.

I've also raised an issue upstream over on the moto repo getmoto/moto#8236 Lets see where that goes..

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.

1 participant