mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-10 19:57:09 +03:00
Update from Python3.8 to Python3.9
This commit is contained in:
parent
5376fef305
commit
a1d551d067
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -12,14 +12,14 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
tox-env:
|
||||
- py38
|
||||
- py39
|
||||
- black-template
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
|
@ -46,7 +46,7 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
- name: Docker ${{ matrix.script.name }}
|
||||
run: sh tests/test_docker.sh ${{ matrix.script.args }}
|
||||
|
||||
|
@ -80,6 +80,6 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
- name: Bare Metal ${{ matrix.script.name }}
|
||||
run: sh tests/test_bare.sh ${{ matrix.script.args }}
|
||||
|
|
2
.github/workflows/pre-commit-autoupdate.yml
vendored
2
.github/workflows/pre-commit-autoupdate.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
|
||||
- name: Install pre-commit
|
||||
run: pip install pre-commit
|
||||
|
|
2
.github/workflows/update-changelog.yml
vendored
2
.github/workflows/update-changelog.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
|||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
|
2
.github/workflows/update-contributors.yml
vendored
2
.github/workflows/update-contributors.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
|||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
|
|
@ -38,9 +38,9 @@ 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 py38
|
||||
$ tox -e py39
|
||||
|
||||
This will run py.test with the python3.8 interpreter, for example.
|
||||
This will run py.test with the python3.9 interpreter, for example.
|
||||
|
||||
To run a particular test with tox for against your current Python version::
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ Features
|
|||
---------
|
||||
|
||||
* For Django 3.0
|
||||
* Works with Python 3.8
|
||||
* Works with Python 3.9
|
||||
* Renders Django projects with 100% starting test coverage
|
||||
* Twitter Bootstrap_ v4 (`maintained Foundation fork`_ also available)
|
||||
* 12-Factor_ based settings via django-environ_
|
||||
|
|
|
@ -35,7 +35,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.8 my-project-name
|
||||
mkvirtualenv --python=/usr/bin/python3.9 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.8
|
||||
* Python 3.9
|
||||
* PostgreSQL_.
|
||||
* Redis_, if using Celery
|
||||
* Cookiecutter_
|
||||
|
@ -18,7 +18,7 @@ First things first.
|
|||
|
||||
#. Create a virtualenv: ::
|
||||
|
||||
$ python3.8 -m venv <virtual env path>
|
||||
$ python3.9 -m venv <virtual env path>
|
||||
|
||||
#. Activate the virtualenv you have just created: ::
|
||||
|
||||
|
|
|
@ -35,7 +35,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.8+. Do you want to proceed (y/n)? " + TERMINATOR
|
||||
"project requires Python 3.9+. Do you want to proceed (y/n)? " + TERMINATOR
|
||||
)
|
||||
yes_options, no_options = frozenset(["y"]), frozenset(["n"])
|
||||
while True:
|
||||
|
|
2
setup.py
2
setup.py
|
@ -40,7 +40,7 @@ setup(
|
|||
"License :: OSI Approved :: BSD License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Topic :: Software Development",
|
||||
],
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -1,6 +1,6 @@
|
|||
[tox]
|
||||
skipsdist = true
|
||||
envlist = py38,black-template
|
||||
envlist = py39,black-template
|
||||
|
||||
[testenv]
|
||||
deps = -rrequirements.txt
|
||||
|
|
|
@ -23,10 +23,10 @@ jobs:
|
|||
- name: Checkout Code Repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python 3.8
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
|
||||
- name: Install flake8
|
||||
run: |
|
||||
|
@ -62,10 +62,10 @@ jobs:
|
|||
|
||||
{%- else %}
|
||||
|
||||
- name: Set up Python 3.8
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-location
|
||||
|
|
|
@ -13,7 +13,7 @@ variables:
|
|||
|
||||
flake8:
|
||||
stage: lint
|
||||
image: python:3.8-alpine
|
||||
image: python:3.9-alpine
|
||||
before_script:
|
||||
- pip install -q flake8
|
||||
script:
|
||||
|
@ -21,7 +21,7 @@ flake8:
|
|||
|
||||
pytest:
|
||||
stage: test
|
||||
image: python:3.8
|
||||
image: python:3.9
|
||||
{% if cookiecutter.use_docker == 'y' -%}
|
||||
image: docker/compose:latest
|
||||
tags:
|
||||
|
|
|
@ -4,6 +4,6 @@ sphinx:
|
|||
configuration: docs/conf.py
|
||||
|
||||
python:
|
||||
version: 3.8
|
||||
version: 3.9
|
||||
install:
|
||||
- requirements: requirements/local.txt
|
||||
|
|
|
@ -2,7 +2,7 @@ dist: focal
|
|||
|
||||
language: python
|
||||
python:
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
|
||||
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.8"
|
||||
- "3.9"
|
||||
install:
|
||||
- pip install -r requirements/local.txt
|
||||
script:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.8-slim-buster
|
||||
FROM python:3.9-slim-buster
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.8-slim-buster
|
||||
FROM python:3.9-slim-buster
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
|
|
|
@ -9,7 +9,7 @@ RUN npm run build
|
|||
|
||||
# Python build stage
|
||||
{%- endif %}
|
||||
FROM python:3.8-slim-buster
|
||||
FROM python:3.9-slim-buster
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
python-3.8.7
|
||||
python-3.9.1
|
||||
|
|
|
@ -7,7 +7,7 @@ max-line-length = 120
|
|||
exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv
|
||||
|
||||
[mypy]
|
||||
python_version = 3.8
|
||||
python_version = 3.9
|
||||
check_untyped_defs = True
|
||||
ignore_missing_imports = True
|
||||
warn_unused_ignores = True
|
||||
|
|
Loading…
Reference in New Issue
Block a user