update to python 3.11
Categories
(Tecken :: General, task, P3)
Tracking
(Not tracked)
People
(Reporter: willkg, Assigned: bdanforth)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
It'd be good to update to Python 3.10. I tried to do that last month and hit issues and wrote a comment:
https://github.com/mozilla-services/tecken/pull/2434#issuecomment-956531129
We need to regenerate the requirements.txt file which will fix the text that caused this check to fail.
Fixing that uncovers a bigger issue wehre pytest or Django or pytest-django isn't happy with Python 3.10 in some way:
... File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1002, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 941, in _find_spec File "<frozen importlib._bootstrap>", line 914, in _find_spec_legacy ImportWarning: ConfigurationImporter.find_spec() not found; falling back to find_module() make: *** [Makefile:85: test] Error 1
It's a month later and still a problem, so I'm writing this bug up to cover figuring it out.
Reporter | ||
Comment 1•2 years ago
|
||
Bumping this to Python 3.11 because it's been out for a while and there's anecdotes going from 3.9 to 3.11 yields a big speedup.
Also, making this block the GCP migration since a speedup will help a bunch.
Reporter | ||
Comment 2•2 years ago
|
||
Bianca: Can you work on this? The first step is updating the Python version in the Dockerfile. Right now it's using python:3.9.16-slim and we probably want to switch to python:3.11.6-slim-bullseye so we're using the same debian version that we use in Socorro.
We'll also need to update the target version for black and ruff. That's in pyproject.toml
.
We'll probably need to re-generate the requirements.txt
file, too.
If we get this far without problems, we should run linting and tests and see what else breaks.
Assignee | ||
Comment 3•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
Reporter | ||
Comment 5•2 years ago
|
||
willkg merged PR [mozilla-services/tecken]: bug-1743835: switch python image from bookworm to bullseye (#2838) in 83e4282.
This (hopefully) should unstick the stage deploy which is currently not working and (we think) related to the fix in this bug. This is covered in DSRE-1483. If this doesn't fix the stage deploy, we'll look at other things. Maybe downgrade to Python 3.10 or something.
Reporter | ||
Comment 6•2 years ago
|
||
Stage deploy is fixed, so this is all set.
Reporter | ||
Comment 7•2 years ago
|
||
I pushed this out just now in bug #1867844.
Comment 8•1 years ago
|
||
Description
•