mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 01:26:57 +03:00
Upgrade Python version from 3.9 to 3.10 (#3913)
This commit is contained in:
parent
7fca0e9d98
commit
4ea0e98f3f
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
|
2
.github/workflows/django-issue-checker.yml
vendored
2
.github/workflows/django-issue-checker.yml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/pre-commit-autoupdate.yml
vendored
2
.github/workflows/pre-commit-autoupdate.yml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/update-changelog.yml
vendored
2
.github/workflows/update-changelog.yml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/update-contributors.yml
vendored
2
.github/workflows/update-contributors.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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_
|
||||
|
@ -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: ::
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ if "{{ cookiecutter.use_docker }}".lower() == "n":
|
|||
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:
|
||||
|
|
2
setup.py
2
setup.py
|
@ -33,7 +33,7 @@ setup(
|
|||
"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",
|
||||
],
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -1,6 +1,6 @@
|
|||
[tox]
|
||||
skipsdist = true
|
||||
envlist = py39,black-template
|
||||
envlist = py310,black-template
|
||||
|
||||
[testenv]
|
||||
deps = -rrequirements.txt
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7,6 +7,6 @@ build:
|
|||
image: testing
|
||||
|
||||
python:
|
||||
version: 3.9
|
||||
version: 3.10
|
||||
install:
|
||||
- requirements: requirements/local.txt
|
||||
|
|
|
@ -2,7 +2,7 @@ dist: focal
|
|||
|
||||
language: python
|
||||
python:
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
|
||||
services:
|
||||
- {% if cookiecutter.use_docker == 'y' %}docker{% else %}postgresql{% endif %}
|
||||
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
python-3.9.13
|
||||
python-3.10.8
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user