Closed Bug 1743835 Opened 4 years ago Closed 2 years ago

update to python 3.11

Categories

(Tecken :: General, task, P3)

Tracking

(Not tracked)

RESOLVED FIXED

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.

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.

Blocks: 1687804
Summary: update to python 3.10 → update to python 3.11

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.

https://hub.docker.com/layers/library/python/3.11.6-slim-bullseye/images/sha256-ecaf89b8cedc4ff98b3a32df092d9197d30eee0dbae28a8fc9653c6e1323091f?context=explore

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: nobody → bdanforth
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

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.

Stage deploy is fixed, so this is all set.

I pushed this out just now in bug #1867844.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: