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

Upgrade Python version to 3.10 #811

Merged
merged 6 commits into from
Apr 28, 2022
Merged

Upgrade Python version to 3.10 #811

merged 6 commits into from
Apr 28, 2022

Conversation

noliveleger
Copy link
Contributor

@noliveleger noliveleger commented Apr 25, 2022

Description

Use Python 3.10 in docker image

Additional info

Changes:

  • Celery CLI syntax. options must come before app name

Removed:

Packages that cannot be upgraded now:

package pinned version latest_version
psycopg2 2.8.4 2.9.1 UTC issue with Django 2.2
Werkzeug 2.0.3 2.1.1 issue with Django extension
PyMongo 3.12.3 4.1.0 MongoDB version issue: pymongo.errors.ConfigurationError: Server at mongo.kobo.private:27017 reports wire version 5, but this version of PyMongo requires at least 6 (MongoDB 3.6).

Related issues

kobotoolbox/kpi#3759

@noliveleger noliveleger changed the title Upgrade python to 3.10 Upgrade to python 3.10 Apr 25, 2022
@noliveleger noliveleger requested a review from bufke April 25, 2022 20:28
@bufke
Copy link
Contributor

bufke commented Apr 25, 2022

You missed my sneaky .gitlab-ci.yml test that references python:3.8 🐧

Aside: I can't leave a comment that isn't related to a diff in a review, right? Why not GitHub.

Copy link
Contributor

@bufke bufke left a comment

Choose a reason for hiding this comment

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

Looks good to me aside from my comments. After changes are made, this is good to merge IMO.

dependencies/pip/requirements.in Show resolved Hide resolved
lxml
pyxform==1.9.0
django-reversion<3.0.2
xlwt
openpyxl
celery>=4.0,<5.0
celery>=5
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this any better than just celery? It's saying use celery >= 5. So 6 would match that too. Any pip-compile --upgrade would pick the newest compatible version, so maybe unnecessary to specify a minimum version. I'm new to pip-tools so maybe I'm missing something.

Personally I prefer the ^ and ~ syntax to tie things to major and minor versions. Then liberally upgrading patch versions via pip-compile --upgrade quite often to deliver security patches without major version changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, it did not want to upgrade to latest one on my environment. Indeed >=5 should not required to install the latest version.
I'll try again and change it if it works as expected.

Dockerfile Outdated Show resolved Hide resolved
@noliveleger noliveleger force-pushed the upgrade-python-3.10 branch 2 times, most recently from e79f0c5 to 1fa30ad Compare April 26, 2022 21:11
@bufke bufke merged commit dfee086 into beta Apr 28, 2022
@noliveleger noliveleger deleted the upgrade-python-3.10 branch April 28, 2022 19:50
@noliveleger noliveleger changed the title Upgrade to python 3.10 Upgrade Python version to 3.10 Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants