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 from 3.9 to 3.10 #3913

Merged
merged 1 commit into from Oct 24, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
cache: pip
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
Expand All @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
Expand All @@ -62,7 +62,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
cache: pip
cache-dependency-path: |
requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/django-issue-checker.yml
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-autoupdate.yml
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"

- name: Install pre-commit
run: pip install pre-commit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-changelog.yml
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-contributors.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -12,7 +12,7 @@ repos:
rev: v3.1.0
hooks:
- id: pyupgrade
args: [--py39-plus]
args: [--py310-plus]
exclude: hooks/

- repo: https://github.com/psf/black
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -33,7 +33,7 @@ To run all tests using various versions of python in virtualenvs defined in tox.
It is possible to test with a specific version of python. To do this, the command
is:

$ tox -e py39
$ tox -e py310

This will run pytest with the python3.9 interpreter, for example.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -18,7 +18,7 @@ production-ready Django projects quickly.
## Features

- For Django 4.0
- Works with Python 3.9
- Works with Python 3.10
- Renders Django projects with 100% starting test coverage
- Twitter [Bootstrap](https://github.com/twbs/bootstrap) v5
- [12-Factor](http://12factor.net/) based settings via [django-environ](https://github.com/joke2k/django-environ)
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment-on-pythonanywhere.rst
Expand Up @@ -34,7 +34,7 @@ Make sure your project is fully committed and pushed up to Bitbucket or Github o

git clone <my-repo-url> # you can also use hg
cd my-project-name
mkvirtualenv --python=/usr/bin/python3.9 my-project-name
mkvirtualenv --python=/usr/bin/python3.10 my-project-name
pip install -r requirements/production.txt # may take a few minutes


Expand Down
4 changes: 2 additions & 2 deletions docs/developing-locally.rst
Expand Up @@ -9,7 +9,7 @@ Setting Up Development Environment

Make sure to have the following on your host:

* Python 3.9
* Python 3.10
* PostgreSQL_.
* Redis_, if using Celery
* Cookiecutter_
Expand All @@ -18,7 +18,7 @@ First things first.

#. Create a virtualenv: ::

$ python3.9 -m venv <virtual env path>
$ python3.10 -m venv <virtual env path>

#. Activate the virtualenv you have just created: ::

Expand Down
2 changes: 1 addition & 1 deletion hooks/pre_gen_project.py
Expand Up @@ -36,7 +36,7 @@
if python_major_version == 2:
print(
WARNING + "You're running cookiecutter under Python 2, but the generated "
"project requires Python 3.9+. Do you want to proceed (y/n)? " + TERMINATOR
"project requires Python 3.10+. Do you want to proceed (y/n)? " + TERMINATOR
)
yes_options, no_options = frozenset(["y"]), frozenset(["n"])
while True:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -33,7 +33,7 @@
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development",
],
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,6 +1,6 @@
[tox]
skipsdist = true
envlist = py39,black-template
envlist = py310,black-template

[testenv]
deps = -rrequirements.txt
Expand Down
4 changes: 2 additions & 2 deletions {{cookiecutter.project_slug}}/.github/workflows/ci.yml
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
python-version: "3.10"
cache: pip
cache-dependency-path: |
requirements/base.txt
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
python-version: "3.10"
cache: pip
cache-dependency-path: |
requirements/base.txt
Expand Down
4 changes: 2 additions & 2 deletions {{cookiecutter.project_slug}}/.gitlab-ci.yml
Expand Up @@ -13,7 +13,7 @@ variables:

flake8:
stage: lint
image: python:3.9-alpine
image: python:3.10-alpine
before_script:
- pip install -q flake8
script:
Expand All @@ -35,7 +35,7 @@ pytest:
script:
- docker-compose -f local.yml run django pytest
{%- else -%}
image: python:3.9
image: python:3.10
tags:
- python
services:
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/.pre-commit-config.yaml
Expand Up @@ -13,7 +13,7 @@ repos:
rev: v3.1.0
hooks:
- id: pyupgrade
args: [--py39-plus]
args: [--py310-plus]

- repo: https://github.com/psf/black
rev: 22.10.0
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/.readthedocs.yml
Expand Up @@ -7,6 +7,6 @@ build:
image: testing

python:
version: 3.9
version: 3.10
install:
- requirements: requirements/local.txt
4 changes: 2 additions & 2 deletions {{cookiecutter.project_slug}}/.travis.yml
Expand Up @@ -2,7 +2,7 @@ dist: focal

language: python
python:
- "3.9"
- "3.10"

services:
- {% if cookiecutter.use_docker == 'y' %}docker{% else %}postgresql{% endif %}
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
- sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm
language: python
python:
- "3.9"
- "3.10"
install:
- pip install -r requirements/local.txt
script:
Expand Down
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.9-slim-bullseye
ARG PYTHON_VERSION=3.10-slim-bullseye

# define an alias for the specfic python version used in this file.
FROM python:${PYTHON_VERSION} as python
Expand Down
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.9-slim-bullseye
ARG PYTHON_VERSION=3.10-slim-bullseye

# define an alias for the specfic python version used in this file.
FROM python:${PYTHON_VERSION} as python
Expand Down
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.9-slim-bullseye
ARG PYTHON_VERSION=3.10-slim-bullseye

{% if cookiecutter.frontend_pipeline == 'Gulp' -%}
FROM node:16-bullseye-slim as client-builder
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/runtime.txt
@@ -1 +1 @@
python-3.9.13
python-3.10.8
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/setup.cfg
Expand Up @@ -18,7 +18,7 @@ force_grid_wrap = 0
use_parentheses = true

[mypy]
python_version = 3.9
python_version = 3.10
check_untyped_defs = True
ignore_missing_imports = True
warn_unused_ignores = True
Expand Down