Skip to content

Commit b26deed

Browse files
mikethemandi
andauthored
chore: update to Python 3.9 (#10809)
* chore: update local/CI execution to Python 3.9 For the development (outer) environment, update to Python 3.9.10 - latest as of this writing. Signed-off-by: Mike Fiedler <[email protected]> * chore: upgrade python version Move us to 3.9.10 - latest release. Signed-off-by: Mike Fiedler <[email protected]> * chore: update requrements hashes for python3.9 * test: exclude statement from coverage report In the move to Python 3.9, we are subject to a coverage behavior that has yet to be corrected. In the interest of keeping the coverage report to 100%, we exclude the statement that coverage.py reports as not being executed, despite it being executed via tests. Refs: nedbat/coveragepy#1041 Signed-off-by: Mike Fiedler <[email protected]> Co-authored-by: Dustin Ingram <[email protected]>
1 parent c57752e commit b26deed

File tree

11 files changed

+14
-28
lines changed

11 files changed

+14
-28
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- uses: actions/setup-python@v2
6666
if: ${{ matrix.needs-python }}
6767
with:
68-
python-version: 3.8.9
68+
python-version: 3.9.10
6969
- name: Cache Python dependencies
7070
if: ${{ matrix.needs-python }}
7171
uses: actions/cache@v2

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.8.9
1+
3.9.10

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ RUN gulp dist
4444

4545
# Now we're going to build our actual application, but not the actual production
4646
# image that it gets deployed into.
47-
FROM python:3.8.9-slim-buster as build
47+
FROM python:3.9.10-slim-buster as build
4848

4949
# Define whether we're building a production or a development image. This will
5050
# generally be used to control whether or not we install our development and
@@ -112,7 +112,7 @@ RUN set -x \
112112

113113
# Now we're going to build our actual application image, which will eventually
114114
# pull in the static files that were built above.
115-
FROM python:3.8.9-slim-buster
115+
FROM python:3.9.10-slim-buster
116116

117117
# Setup some basic environment variables that are ~never going to change.
118118
ENV PYTHONUNBUFFERED 1

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ default:
4545
@exit 1
4646

4747
.state/env/pyvenv.cfg: requirements/dev.txt requirements/docs.txt requirements/lint.txt requirements/ipython.txt
48-
# Create our Python 3.8 virtual environment
48+
# Create our Python 3.9 virtual environment
4949
rm -rf .state/env
50-
python3.8 -m venv .state/env
50+
python3.9 -m venv .state/env
5151

5252
# install/upgrade general requirements
5353
.state/env/bin/python -m pip install --upgrade pip setuptools wheel

docs/development/getting-started.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ Errors when executing ``make build``
344344
345345
snap install docker
346346
347-
* If you receive the error: ``python3.8: command not found``, ensure you have
348-
Python 3.8 installed on your system.
347+
* If you receive the error: ``python3.9: command not found``, ensure you have
348+
Python 3.9 installed on your system.
349349
This is the "base" Python version that Warehouse uses to create the rest of
350350
the development environment.
351351

requirements/deploy.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.8
2+
# This file is autogenerated by pip-compile with python 3.9
33
# To update, run:
44
#
55
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/deploy.txt requirements/deploy.in

requirements/docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile
2+
# This file is autogenerated by pip-compile with python 3.9
33
# To update, run:
44
#
55
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/docs.txt requirements/docs.in

requirements/lint.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile
2+
# This file is autogenerated by pip-compile with python 3.9
33
# To update, run:
44
#
55
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/lint.txt requirements/lint.in

requirements/main.txt

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.8
2+
# This file is autogenerated by pip-compile with python 3.9
33
# To update, run:
44
#
55
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/main.txt requirements/main.in
@@ -581,14 +581,6 @@ idna==3.3 \
581581
# via
582582
# email-validator
583583
# requests
584-
importlib-metadata==4.11.1 \
585-
--hash=sha256:175f4ee440a0317f6e8d81b7f8d4869f93316170a65ad2b007d2929186c8052c \
586-
--hash=sha256:e0bc84ff355328a4adfc5240c4f211e0ab386f80aa640d1b11f0618a1d282094
587-
# via alembic
588-
importlib-resources==5.4.0 \
589-
--hash=sha256:33a95faed5fc19b4bc16b29a6eeae248a3fe69dd55d4d229d2b480e23eeaad45 \
590-
--hash=sha256:d756e2f85dd4de2ba89be0b21dba2a3bbec2e871a42a3a16719258a11f87506b
591-
# via alembic
592584
itsdangerous==1.1.0 \
593585
--hash=sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19 \
594586
--hash=sha256:b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749
@@ -1306,12 +1298,6 @@ yara-python==4.1.3 \
13061298
--hash=sha256:ecfa95fa1e2cc4114e6043ee7760590eaf094bd83e0784bb0fd5d438899934c7 \
13071299
--hash=sha256:f89e514615b49998c27a92876a37cc57dc3c7fa9f163d5c2ea50176d7f9596b1
13081300
# via -r requirements/main.in
1309-
zipp==3.7.0 \
1310-
--hash=sha256:9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d \
1311-
--hash=sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375
1312-
# via
1313-
# importlib-metadata
1314-
# importlib-resources
13151301
zope-deprecation==4.4.0 \
13161302
--hash=sha256:0d453338f04bacf91bbfba545d8bcdf529aa829e67b705eac8c1a7fdce66e2df \
13171303
--hash=sha256:f1480b74995958b24ce37b0ef04d3663d2683e5d6debc96726eff18acf4ea113

requirements/tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.8
2+
# This file is autogenerated by pip-compile with python 3.9
33
# To update, run:
44
#
55
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/tests.txt requirements/tests.in

warehouse/search/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def reindex(self, request):
196196
raise
197197
finally:
198198
request.db.rollback()
199-
request.db.close()
199+
request.db.close() # pragma: no cover
200200

201201
# Now that we've finished indexing all of our data we can update the
202202
# replicas and refresh intervals.

0 commit comments

Comments
 (0)