Merge branch 'master' into email-only

This commit is contained in:
Bruno Alla 2023-04-15 11:45:33 +01:00 committed by GitHub
commit 027288f021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 83 additions and 46 deletions

View File

@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
@ -100,7 +100,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
cache: pip
cache-dependency-path: |
requirements.txt

View File

@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip

View File

@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Install pre-commit
run: pip install pre-commit
@ -37,7 +37,7 @@ jobs:
run: pre-commit autoupdate
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-autoupdate

View File

@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip

View File

@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip

View File

@ -12,7 +12,7 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py310-plus]
args: [--py311-plus]
exclude: hooks/
- repo: https://github.com/psf/black

View File

@ -3,6 +3,43 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
<!-- GENERATOR_PLACEHOLDER -->
## 2023.04.13
### Updated
- Update tox to 4.4.12 ([#4271](https://github.com/cookiecutter/cookiecutter-django/pull/4271))
## 2023.04.10
### Updated
- Update pytest-sugar to 0.9.7 ([#4269](https://github.com/cookiecutter/cookiecutter-django/pull/4269))
- Update pytest to 7.3.0 ([#4268](https://github.com/cookiecutter/cookiecutter-django/pull/4268))
## 2023.04.07
### Updated
- Upgrade traefik to 2.9.10 ([#4267](https://github.com/cookiecutter/cookiecutter-django/pull/4267))
## 2023.04.05
### Changed
- Update indent for nginx config file ([#4260](https://github.com/cookiecutter/cookiecutter-django/pull/4260))
### Updated
- Update tox to 4.4.11 ([#4262](https://github.com/cookiecutter/cookiecutter-django/pull/4262))
- Update django to 4.1.8 ([#4258](https://github.com/cookiecutter/cookiecutter-django/pull/4258))
- Update pre-commit to 3.2.2 ([#4259](https://github.com/cookiecutter/cookiecutter-django/pull/4259))
## 2023.04.04
### Changed
- Upgrade to Django 4.1 ([#4028](https://github.com/cookiecutter/cookiecutter-django/pull/4028))
- Remove deprecated security setting ([#4247](https://github.com/cookiecutter/cookiecutter-django/pull/4247))
### Fixed
- Replace `runserver_plus` with `runserver` ([#4255](https://github.com/cookiecutter/cookiecutter-django/pull/4255))
- Fix traefik rule priority for media router ([#4244](https://github.com/cookiecutter/cookiecutter-django/pull/4244))
### Updated
- Update sentry-sdk to 1.19.0 ([#4254](https://github.com/cookiecutter/cookiecutter-django/pull/4254))
- Update django-debug-toolbar to 4.0.0 ([#4251](https://github.com/cookiecutter/cookiecutter-django/pull/4251))
## 2023.04.03
### Changed

View File

@ -33,9 +33,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 py310
$ tox -e py311
This will run pytest with the python3.10 interpreter, for example.
This will run pytest with the python3.11 interpreter, for example.
To run a particular test with tox for against your current Python version:

View File

@ -20,7 +20,7 @@ production-ready Django projects quickly.
## Features
- For Django 4.1
- Works with Python 3.10
- Works with Python 3.11
- 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)

View File

@ -37,6 +37,7 @@ Make sure your project is fully committed and pushed up to Bitbucket or Github o
mkvirtualenv --python=/usr/bin/python3.10 my-project-name
pip install -r requirements/production.txt # may take a few minutes
.. note:: We're creating the virtualenv using Python 3.10 (``--python=/usr/bin/python3.10```), although Cookiecutter Django generates a project for Python 3.11. This is because, at time of writing, PythonAnywhere only supports Python 3.10. It shouldn't be a problem, but if is, you may try changing the Python version to 3.11 and see if it works. If it does, please let us know, or even better, submit a pull request to update this section.
Setting environment variables in the console
--------------------------------------------

View File

@ -9,7 +9,7 @@ Setting Up Development Environment
Make sure to have the following on your host:
* Python 3.10
* Python 3.11
* PostgreSQL_.
* Redis_, if using Celery
* Cookiecutter_
@ -18,7 +18,7 @@ First things first.
#. Create a virtualenv: ::
$ python3.10 -m venv <virtual env path>
$ python3.11 -m venv <virtual env path>
#. Activate the virtualenv you have just created: ::

View File

@ -44,7 +44,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.10+. Do you want to proceed (y/n)? " + TERMINATOR
"project requires Python 3.11+. Do you want to proceed (y/n)? " + TERMINATOR
)
yes_options, no_options = frozenset(["y"]), frozenset(["n"])
while True:

View File

@ -8,12 +8,12 @@ black==23.3.0
isort==5.12.0
flake8==6.0.0
flake8-isort==6.0.0
pre-commit==3.2.1
pre-commit==3.2.2
# Testing
# ------------------------------------------------------------------------------
tox==4.4.8
pytest==7.2.2
tox==4.4.12
pytest==7.3.1
pytest-cookies==0.7.0
pytest-instafail==0.5.0
pyyaml==6.0

View File

@ -5,7 +5,7 @@ except ImportError:
from distutils.core import setup
# We use calendar versioning
version = "2023.04.03"
version = "2023.04.13"
with open("README.rst") as readme_file:
long_description = readme_file.read()
@ -33,7 +33,7 @@ setup(
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development",
],

View File

@ -1,6 +1,6 @@
[tox]
skipsdist = true
envlist = py310,black-template
envlist = py311,black-template
[testenv]
deps = -rrequirements.txt

View File

@ -22,6 +22,6 @@ trim_trailing_whitespace = false
[Makefile]
indent_style = tab
[nginx.conf]
[default.conf]
indent_style = space
indent_size = 2

View File

@ -29,7 +29,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
{%- if cookiecutter.open_source_license != 'Not open source' %}
# Consider using pre-commit.ci for open source project
@ -86,7 +86,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
cache: pip
cache-dependency-path: |
requirements/base.txt

View File

@ -13,7 +13,7 @@ variables:
precommit:
stage: lint
image: python:3.10
image: python:3.11
variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
cache:
@ -40,7 +40,7 @@ pytest:
script:
- docker-compose -f local.yml run django pytest
{%- else %}
image: python:3.10
image: python:3.11
tags:
- python
services:

View File

@ -13,7 +13,7 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py310-plus]
args: [--py311-plus]
- repo: https://github.com/psf/black
rev: 23.3.0

View File

@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.11"
# Build documentation in the docs/ directory with Sphinx
sphinx:

View File

@ -2,7 +2,7 @@ dist: focal
language: python
python:
- "3.10"
- "3.11"
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.10"
- "3.11"
install:
- pip install -r requirements/local.txt
script:

View File

@ -1,5 +1,5 @@
# define an alias for the specfic python version used in this file.
FROM python:3.10.10-slim-bullseye as python
FROM python:3.11.3-slim-bullseye as python
# Python build stage
FROM python as python-build-stage

View File

@ -1,5 +1,5 @@
# define an alias for the specfic python version used in this file.
FROM python:3.10.10-slim-bullseye as python
FROM python:3.11.3-slim-bullseye as python
# Python build stage

View File

@ -24,9 +24,8 @@ ENV DJANGO_AZURE_ACCOUNT_NAME=${DJANGO_AZURE_ACCOUNT_NAME}
RUN npm run build
{%- endif %}
# define an alias for the specfic python version used in this file.
FROM python:3.10.10-slim-bullseye as python
FROM python:3.11.3-slim-bullseye as python
# Python build stage
FROM python as python-build-stage

View File

@ -1,4 +1,4 @@
FROM traefik:2.9.9
FROM traefik:2.9.10
RUN mkdir -p /etc/traefik/acme \
&& touch /etc/traefik/acme/acme.json \
&& chmod 600 /etc/traefik/acme/acme.json

View File

@ -29,7 +29,7 @@ uvicorn[standard]==0.21.1 # https://github.com/encode/uvicorn
# Django
# ------------------------------------------------------------------------------
django==4.1.7 # pyup: < 4.2 # https://www.djangoproject.com/
django==4.1.8 # pyup: < 4.2 # https://www.djangoproject.com/
django-environ==0.10.0 # https://github.com/joke2k/django-environ
django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils
django-allauth==0.54.0 # https://github.com/pennersr/django-allauth

View File

@ -15,8 +15,8 @@ watchfiles==0.19.0 # https://github.com/samuelcolvin/watchfiles
# ------------------------------------------------------------------------------
mypy==1.1.1 # https://github.com/python/mypy
django-stubs==1.16.0 # https://github.com/typeddjango/django-stubs
pytest==7.2.2 # https://github.com/pytest-dev/pytest
pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar
pytest==7.3.1 # https://github.com/pytest-dev/pytest
pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar
{%- if cookiecutter.use_drf == "y" %}
djangorestframework-stubs==1.10.0 # https://github.com/typeddjango/djangorestframework-stubs
{%- endif %}
@ -36,7 +36,7 @@ pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django
{%- if cookiecutter.use_celery == 'y' %}
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
{%- endif %}
pre-commit==3.2.1 # https://github.com/pre-commit/pre-commit
pre-commit==3.2.2 # https://github.com/pre-commit/pre-commit
# Django
# ------------------------------------------------------------------------------

View File

@ -1 +1 @@
python-3.10.8
python-3.11.3

View File

@ -18,7 +18,7 @@ force_grid_wrap = 0
use_parentheses = true
[mypy]
python_version = 3.10
python_version = 3.11
check_untyped_defs = True
ignore_missing_imports = True
warn_unused_ignores = True