Skip to content

chore: update to Python 3.9 #10809

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

Merged
merged 5 commits into from
Feb 23, 2022
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- uses: actions/setup-python@v2
if: ${{ matrix.needs-python }}
with:
python-version: 3.8.9
python-version: 3.9.10
- name: Cache Python dependencies
if: ${{ matrix.needs-python }}
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.9
3.9.10
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN gulp dist

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

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

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

# Setup some basic environment variables that are ~never going to change.
ENV PYTHONUNBUFFERED 1
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ default:
@exit 1

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

# install/upgrade general requirements
.state/env/bin/python -m pip install --upgrade pip setuptools wheel
Expand Down
4 changes: 2 additions & 2 deletions docs/development/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ Errors when executing ``make build``

snap install docker

* If you receive the error: ``python3.8: command not found``, ensure you have
Python 3.8 installed on your system.
* If you receive the error: ``python3.9: command not found``, ensure you have
Python 3.9 installed on your system.
This is the "base" Python version that Warehouse uses to create the rest of
the development environment.

Expand Down
2 changes: 1 addition & 1 deletion requirements/deploy.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.9
# To update, run:
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/deploy.txt requirements/deploy.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/docs.txt requirements/docs.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/lint.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/lint.txt requirements/lint.in
Expand Down
16 changes: 1 addition & 15 deletions requirements/main.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.9
# To update, run:
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/main.txt requirements/main.in
Expand Down Expand Up @@ -581,14 +581,6 @@ idna==3.3 \
# via
# email-validator
# requests
importlib-metadata==4.11.1 \
--hash=sha256:175f4ee440a0317f6e8d81b7f8d4869f93316170a65ad2b007d2929186c8052c \
--hash=sha256:e0bc84ff355328a4adfc5240c4f211e0ab386f80aa640d1b11f0618a1d282094
# via alembic
importlib-resources==5.4.0 \
--hash=sha256:33a95faed5fc19b4bc16b29a6eeae248a3fe69dd55d4d229d2b480e23eeaad45 \
--hash=sha256:d756e2f85dd4de2ba89be0b21dba2a3bbec2e871a42a3a16719258a11f87506b
# via alembic
itsdangerous==1.1.0 \
--hash=sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19 \
--hash=sha256:b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749
Expand Down Expand Up @@ -1306,12 +1298,6 @@ yara-python==4.1.3 \
--hash=sha256:ecfa95fa1e2cc4114e6043ee7760590eaf094bd83e0784bb0fd5d438899934c7 \
--hash=sha256:f89e514615b49998c27a92876a37cc57dc3c7fa9f163d5c2ea50176d7f9596b1
# via -r requirements/main.in
zipp==3.7.0 \
--hash=sha256:9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d \
--hash=sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375
# via
# importlib-metadata
# importlib-resources
zope-deprecation==4.4.0 \
--hash=sha256:0d453338f04bacf91bbfba545d8bcdf529aa829e67b705eac8c1a7fdce66e2df \
--hash=sha256:f1480b74995958b24ce37b0ef04d3663d2683e5d6debc96726eff18acf4ea113
Expand Down
2 changes: 1 addition & 1 deletion requirements/tests.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.9
# To update, run:
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/tests.txt requirements/tests.in
Expand Down
2 changes: 1 addition & 1 deletion warehouse/search/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def reindex(self, request):
raise
finally:
request.db.rollback()
request.db.close()
request.db.close() # pragma: no cover

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