From a1d551d0679b54b2f57bf9ba17e07c854171566a Mon Sep 17 00:00:00 2001 From: areski Date: Tue, 26 Jan 2021 16:13:27 +0100 Subject: [PATCH 1/2] Update from Python3.8 to Python3.9 --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/pre-commit-autoupdate.yml | 2 +- .github/workflows/update-changelog.yml | 2 +- .github/workflows/update-contributors.yml | 2 +- CONTRIBUTING.rst | 4 ++-- README.rst | 2 +- docs/deployment-on-pythonanywhere.rst | 2 +- docs/developing-locally.rst | 4 ++-- hooks/pre_gen_project.py | 2 +- setup.py | 2 +- tox.ini | 2 +- {{cookiecutter.project_slug}}/.github/workflows/ci.yml | 8 ++++---- {{cookiecutter.project_slug}}/.gitlab-ci.yml | 4 ++-- {{cookiecutter.project_slug}}/.readthedocs.yml | 2 +- {{cookiecutter.project_slug}}/.travis.yml | 4 ++-- .../compose/local/django/Dockerfile | 2 +- .../compose/local/docs/Dockerfile | 2 +- .../compose/production/django/Dockerfile | 2 +- {{cookiecutter.project_slug}}/runtime.txt | 2 +- {{cookiecutter.project_slug}}/setup.cfg | 2 +- 20 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd966845..cd1389c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index a0ad17ab..71738d62 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -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 diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index ea4ddf61..f05f99d6 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -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 diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml index f849484f..835000b2 100644 --- a/.github/workflows/update-contributors.yml +++ b/.github/workflows/update-contributors.yml @@ -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 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 5d88bf5b..d4412b7f 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -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:: diff --git a/README.rst b/README.rst index dbc510a4..105497c4 100644 --- a/README.rst +++ b/README.rst @@ -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_ diff --git a/docs/deployment-on-pythonanywhere.rst b/docs/deployment-on-pythonanywhere.rst index 16dba5a2..67da158b 100644 --- a/docs/deployment-on-pythonanywhere.rst +++ b/docs/deployment-on-pythonanywhere.rst @@ -35,7 +35,7 @@ Make sure your project is fully committed and pushed up to Bitbucket or Github o git clone # 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 diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 2b7806ce..c8b54ea5 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -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 + $ python3.9 -m venv #. Activate the virtualenv you have just created: :: diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index 8eaf4983..70c29557 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -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: diff --git a/setup.py b/setup.py index c72ba1c9..44ffae96 100644 --- a/setup.py +++ b/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", ], diff --git a/tox.ini b/tox.ini index cecc7435..0afe3931 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] skipsdist = true -envlist = py38,black-template +envlist = py39,black-template [testenv] deps = -rrequirements.txt diff --git a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml index 57add2c0..15eb3daa 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml @@ -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 diff --git a/{{cookiecutter.project_slug}}/.gitlab-ci.yml b/{{cookiecutter.project_slug}}/.gitlab-ci.yml index 60925b81..314aacb6 100644 --- a/{{cookiecutter.project_slug}}/.gitlab-ci.yml +++ b/{{cookiecutter.project_slug}}/.gitlab-ci.yml @@ -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: diff --git a/{{cookiecutter.project_slug}}/.readthedocs.yml b/{{cookiecutter.project_slug}}/.readthedocs.yml index b193a85e..1b6020f3 100644 --- a/{{cookiecutter.project_slug}}/.readthedocs.yml +++ b/{{cookiecutter.project_slug}}/.readthedocs.yml @@ -4,6 +4,6 @@ sphinx: configuration: docs/conf.py python: - version: 3.8 + version: 3.9 install: - requirements: requirements/local.txt diff --git a/{{cookiecutter.project_slug}}/.travis.yml b/{{cookiecutter.project_slug}}/.travis.yml index f478685e..a684da22 100644 --- a/{{cookiecutter.project_slug}}/.travis.yml +++ b/{{cookiecutter.project_slug}}/.travis.yml @@ -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: diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index 5473f114..210d14fa 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8-slim-buster +FROM python:3.9-slim-buster ENV PYTHONUNBUFFERED 1 ENV PYTHONDONTWRITEBYTECODE 1 diff --git a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile index 315fdd40..fbb5ce9d 100644 --- a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8-slim-buster +FROM python:3.9-slim-buster ENV PYTHONUNBUFFERED 1 ENV PYTHONDONTWRITEBYTECODE 1 diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 2e6a195b..45faa17e 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -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 diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index 3e4835ce..1a181794 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -python-3.8.7 +python-3.9.1 diff --git a/{{cookiecutter.project_slug}}/setup.cfg b/{{cookiecutter.project_slug}}/setup.cfg index 5bde75cf..c3ce2a0e 100644 --- a/{{cookiecutter.project_slug}}/setup.cfg +++ b/{{cookiecutter.project_slug}}/setup.cfg @@ -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 From 47f5b40ace3f845ea4e5498100cc610dd25c97d2 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Thu, 8 Apr 2021 18:53:14 +0100 Subject: [PATCH 2/2] Update Heroku to latest 3.9.x --- {{cookiecutter.project_slug}}/runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index 1a181794..87665291 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -python-3.9.1 +python-3.9.4