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 to 3.11 #1269

Merged
merged 3 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cookiecutter/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"package_name": "via",
"slug": "via",
"short_description": "An app that proxies web pages and PDF files and injects the Hypothesis client so you can annotate them.",
"python_version": "3.8.12",
"python_version": "3.11.7",
"port": "9082",
"github_owner": "hypothesis",
"visibility": "public",
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.12
3.11.7
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN yarn build
# reverted back to Alpine when Musl v1.2.4 is released.
#
# See https://github.com/hypothesis/product-backlog/issues/1409
FROM python:3.8.18-slim-bullseye
FROM python:3.11.7-slim-bullseye
LABEL maintainer="Hypothes.is Project and contributors"

RUN apt-get update && apt-get install --yes nginx nginx-extras gettext-base supervisor libpq-dev \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a href="https://github.com/hypothesis/via/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/hypothesis/via/ci.yml?branch=main"></a>
<a><img src="https://img.shields.io/badge/python-3.8-success"></a>
<a><img src="https://img.shields.io/badge/python-3.11-success"></a>
<a href="https://github.com/hypothesis/via/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-BSD--2--Clause-success"></a>
<a href="https://github.com/hypothesis/cookiecutters/tree/main/pyramid-app"><img src="https://img.shields.io/badge/cookiecutter-pyramid--app-success"></a>
<a href="https://black.readthedocs.io/en/stable/"><img src="https://img.shields.io/badge/code%20style-black-000000"></a>
Expand Down
2 changes: 1 addition & 1 deletion bin/make_python
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -n "${CI+x}" ]; then exit; fi

pyenv_root=$(pyenv root)

for python_version in 3.8.12; do
for python_version in 3.11.7; do
bin_dir=$pyenv_root/versions/$python_version/bin
if [ ! -f "$bin_dir"/tox ]; then
pyenv install --skip-existing "$python_version"
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ filterwarnings = [
"ignore:^pkg_resources is deprecated as an API:DeprecationWarning:pkg_resources",
"ignore:^pkg_resources is deprecated as an API:DeprecationWarning:pyramid",
"ignore:^Deprecated call to .pkg_resources\\.declare_namespace\\('.*'\\).\\.:DeprecationWarning:pkg_resources",
# https://github.com/webpy/webpy/issues/732
"ignore:^\\'cgi\\' is deprecated and slated for removal in Python 3\\.13:DeprecationWarning:webob",
Copy link
Member Author

Choose a reason for hiding this comment

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

We removed our usage of this library but our dependencies still use it.

This blocks the upgrade to 3.13 I suppose but we have plenty of time to worry about that.

]

[tool.pydocstyle]
Expand Down
11 changes: 2 additions & 9 deletions requirements/build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --allow-unsafe requirements/build.in
Expand All @@ -9,9 +9,7 @@ build==1.0.3
click==8.1.7
# via pip-tools
importlib-metadata==7.0.1
# via
# build
# pip-sync-faster
# via pip-sync-faster
packaging==23.2
# via build
pip-sync-faster==0.0.3
Expand All @@ -22,11 +20,6 @@ pip-tools==7.3.0
# pip-sync-faster
pyproject-hooks==1.0.0
# via build
tomli==2.0.1
# via
# build
# pip-tools
# pyproject-hooks
wheel==0.42.0
# via pip-tools
whitenoise==6.6.0
Expand Down
14 changes: 2 additions & 12 deletions requirements/checkformatting.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --allow-unsafe requirements/checkformatting.in
Expand All @@ -13,9 +13,7 @@ click==8.1.7
# black
# pip-tools
importlib-metadata==7.0.1
# via
# build
# pip-sync-faster
# via pip-sync-faster
isort==5.13.2
# via -r requirements/checkformatting.in
mypy-extensions==1.0.0
Expand All @@ -36,14 +34,6 @@ platformdirs==4.1.0
# via black
pyproject-hooks==1.0.0
# via build
tomli==2.0.1
# via
# black
# build
# pip-tools
# pyproject-hooks
typing-extensions==4.9.0
# via black
wheel==0.42.0
# via pip-tools
zipp==3.17.0
Expand Down
12 changes: 2 additions & 10 deletions requirements/coverage.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --allow-unsafe requirements/coverage.in
Expand All @@ -11,9 +11,7 @@ click==8.1.7
coverage[toml]==7.4.0
# via -r requirements/coverage.in
importlib-metadata==7.0.1
# via
# build
# pip-sync-faster
# via pip-sync-faster
packaging==23.2
# via build
pip-sync-faster==0.0.3
Expand All @@ -24,12 +22,6 @@ pip-tools==7.3.0
# pip-sync-faster
pyproject-hooks==1.0.0
# via build
tomli==2.0.1
# via
# build
# coverage
# pip-tools
# pyproject-hooks
wheel==0.42.0
# via pip-tools
zipp==3.17.0
Expand Down
35 changes: 7 additions & 28 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --allow-unsafe requirements/dev.in
Expand All @@ -13,8 +13,6 @@ attrs==23.2.0
# -r requirements/prod.txt
# jsonschema
# referencing
backcall==0.2.0
# via ipython
build==1.0.3
# via pip-tools
cachetools==5.3.2
Expand Down Expand Up @@ -52,9 +50,9 @@ executing==2.0.1
# via stack-data
factory-boy==3.3.0
# via -r requirements/dev.in
faker==22.1.0
faker==22.2.0
# via factory-boy
google-auth==2.26.1
google-auth==2.26.2
# via
# -r requirements/prod.txt
# google-auth-oauthlib
Expand Down Expand Up @@ -83,23 +81,18 @@ idna==3.6
importlib-metadata==7.0.1
# via
# -r requirements/prod.txt
# alembic
# build
# h-assets
# h-vialib
# pip-sync-faster
importlib-resources==6.1.1
# via
# -r requirements/prod.txt
# alembic
# checkmatelib
# jsonschema
# jsonschema-specifications
ipython==8.12.3
ipython==8.20.0
# via pyramid-ipython
jedi==0.19.1
# via ipython
jinja2==3.1.2
jinja2==3.1.3
# via
# -r requirements/prod.txt
# pyramid-jinja2
Expand All @@ -121,7 +114,7 @@ markupsafe==2.1.3
# jinja2
# mako
# pyramid-jinja2
marshmallow==3.20.1
marshmallow==3.20.2
# via
# -r requirements/prod.txt
# webargs
Expand Down Expand Up @@ -153,18 +146,12 @@ pastedeploy==3.1.0
# plaster-pastedeploy
pexpect==4.9.0
# via ipython
pickleshare==0.7.5
# via ipython
pip-sync-faster==0.0.3
# via -r requirements/dev.in
pip-tools==7.3.0
# via
# -r requirements/dev.in
# pip-sync-faster
pkgutil-resolve-name==1.3.10
# via
# -r requirements/prod.txt
# jsonschema
plaster==1.1.2
# via
# -r requirements/prod.txt
Expand Down Expand Up @@ -256,7 +243,7 @@ rsa==4.9
# -r requirements/prod.txt
# google-auth
# python-jose
sentry-sdk==1.39.1
sentry-sdk==1.39.2
# via
# -r requirements/prod.txt
# h-pyramid-sentry
Expand All @@ -275,11 +262,6 @@ stack-data==0.6.3
# via ipython
supervisor==4.2.5
# via -r requirements/dev.in
tomli==2.0.1
# via
# build
# pip-tools
# pyproject-hooks
traitlets==5.14.1
# via
# ipython
Expand All @@ -297,8 +279,6 @@ typing-extensions==4.9.0
# via
# -r requirements/prod.txt
# alembic
# faker
# ipython
# sqlalchemy
urllib3==2.1.0
# via
Expand Down Expand Up @@ -330,7 +310,6 @@ zipp==3.17.0
# via
# -r requirements/prod.txt
# importlib-metadata
# importlib-resources
zope-deprecation==5.0
# via
# -r requirements/prod.txt
Expand Down
14 changes: 2 additions & 12 deletions requirements/format.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --allow-unsafe requirements/format.in
Expand All @@ -13,9 +13,7 @@ click==8.1.7
# black
# pip-tools
importlib-metadata==7.0.1
# via
# build
# pip-sync-faster
# via pip-sync-faster
isort==5.13.2
# via -r requirements/format.in
mypy-extensions==1.0.0
Expand All @@ -36,14 +34,6 @@ platformdirs==4.1.0
# via black
pyproject-hooks==1.0.0
# via build
tomli==2.0.1
# via
# black
# build
# pip-tools
# pyproject-hooks
typing-extensions==4.9.0
# via black
wheel==0.42.0
# via pip-tools
zipp==3.17.0
Expand Down
Loading