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

Python 3.11 upgrade #329

Merged
merged 2 commits into from
Jan 11, 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 @@ -17,7 +17,7 @@
"package_name": "report",
"slug": "report",
"short_description": "The internal global reporting product for Hypothesis.",
"python_version": "3.8.16",
"python_version": "3.11.7",
"github_owner": "hypothesis",
"visibility": "public",
"copyright_holder": "Hypothesis",
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,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 @@ -48,7 +48,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 @@ -77,7 +77,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 @@ -104,7 +104,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 @@ -137,7 +137,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.16
3.11.7
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# We need to match the version inside the metabase image in order for the
# libraries which Python is built against to exist
FROM python:3.8.18-alpine3.17 as python
FROM python:3.11.7-alpine3.19 as python

# We'll build/install all python dependencies in the python image
COPY requirements/prod.txt ./
Expand All @@ -20,11 +20,11 @@ FROM metabase/metabase:v0.45.4.3
# The metabase image is based on a newer alpine and the python package there
# won't point to the exact version we need.
COPY --from=python /usr/local/bin/python3 /usr/local/bin/python3
COPY --from=python /usr/local/bin/python3.8 /usr/local/bin/python3.8
COPY --from=python /usr/local/bin/python3.11 /usr/local/bin/python3.11
COPY --from=python /usr/local/bin/python /usr/local/bin/python

COPY --from=python /usr/local/lib/python3.8 /usr/local/lib/python3.8
COPY --from=python /usr/local/lib/libpython3.8.so.1.0 /usr/local/lib/libpython3.8.so.1.0
COPY --from=python /usr/local/lib/python3.11 /usr/local/lib/python3.11
COPY --from=python /usr/local/lib/libpython3.11.so.1.0 /usr/local/lib/libpython3.11.so.1.0
COPY --from=python /usr/local/lib/libpython3.so /usr/local/lib/libpython3.so

# Make sure various scripts we use from Python packages are available
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/report/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/hypothesis/report/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/report/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/pyapp"><img src="https://img.shields.io/badge/cookiecutter-pyapp-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.16; 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
38 changes: 15 additions & 23 deletions requirements/checkformatting.txt
Original file line number Diff line number Diff line change
@@ -1,54 +1,46 @@
#
# 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
#
black==23.7.0
black==23.12.1
# via -r requirements/checkformatting.in
build==0.9.0
build==1.0.3
# via pip-tools
click==8.1.3
click==8.1.7
# via
# black
# pip-tools
importlib-metadata==6.6.0
importlib-metadata==7.0.1
# via pip-sync-faster
isort==5.13.2
# via -r requirements/checkformatting.in
mypy-extensions==0.4.3
mypy-extensions==1.0.0
# via black
packaging==23.0
packaging==23.2
# via
# black
# build
pathspec==0.10.2
pathspec==0.12.1
# via black
pep517==0.13.0
# via build
pip-sync-faster==0.0.3
# via -r requirements/checkformatting.in
pip-tools==7.3.0
# via
# -r requirements/checkformatting.in
# pip-sync-faster
platformdirs==2.5.4
platformdirs==4.1.0
# via black
tomli==2.0.1
# via
# black
# build
# pep517
# pip-tools
typing-extensions==4.4.0
# via black
wheel==0.38.4
pyproject-hooks==1.0.0
# via build
wheel==0.42.0
# via pip-tools
zipp==3.15.0
zipp==3.17.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
pip==23.3
pip==23.3.2
# via pip-tools
setuptools==67.8.0
setuptools==69.0.3
# via pip-tools
36 changes: 13 additions & 23 deletions requirements/coverage.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,34 @@
#
# 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
#
build==0.9.0
build==1.0.3
# via pip-tools
click==8.1.3
click==8.1.7
# via pip-tools
coverage[toml]==7.3.2
# via
# -r requirements/coverage.in
# coverage
importlib-metadata==6.6.0
coverage[toml]==7.4.0
# via -r requirements/coverage.in
importlib-metadata==7.0.1
# via pip-sync-faster
packaging==21.3
# via build
pep517==0.13.0
packaging==23.2
# via build
pip-sync-faster==0.0.3
# via -r requirements/coverage.in
pip-tools==7.3.0
# via
# -r requirements/coverage.in
# pip-sync-faster
pyparsing==3.0.9
# via packaging
tomli==2.0.1
# via
# build
# coverage
# pep517
# pip-tools
wheel==0.38.4
pyproject-hooks==1.0.0
# via build
wheel==0.42.0
# via pip-tools
zipp==3.15.0
zipp==3.17.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
pip==23.3
pip==23.3.2
# via pip-tools
setuptools==67.8.0
setuptools==69.0.3
# via pip-tools
Loading