From e7b29b89f86ffbfa01ddcb18248be8f950239c0a Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Fri, 26 Jan 2024 11:22:38 +0100 Subject: [PATCH] :arrow_up: Upgrade to python 3.9 --- .github/workflows/ci.yml | 2 +- .github/workflows/code-quality.yml | 4 +- Dockerfile | 6 +- INSTALL.rst | 2 +- README.NL.rst | 2 +- README.rst | 2 +- requirements/base.txt | 90 +++++++++---------- requirements/ci.txt | 117 +++++++++++-------------- requirements/dev.txt | 135 +++++++++++++---------------- 9 files changed, 161 insertions(+), 199 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59ec0018..e6ae12ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: '3.7' + python-version: '3.9' - uses: actions/setup-node@v2-beta with: node-version: '12' diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 02c5db7c..d22f35a1 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: '3.7' + python-version: '3.9' - uses: isort/isort-action@v0.1.0 with: requirementsFiles: requirements/dev.txt @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: '3.7' + python-version: '3.9' - name: Install dependencies run: | pip install -r requirements/dev.txt diff --git a/Dockerfile b/Dockerfile index 9b41a4cd..ec4eef7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Stage 1 - Compile needed python dependencies -FROM python:3.7-buster AS build +FROM python:3.9-buster AS build RUN apt-get update && apt-get install -y --no-install-recommends \ libpq-dev \ @@ -29,7 +29,7 @@ RUN npm run build # Stage 3 - Build docker image suitable for execution and deployment -FROM python:3.7-buster AS production +FROM python:3.9-buster AS production # Stage 3.1 - Set up the needed production dependencies # install all the dependencies for GeoDjango @@ -40,7 +40,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libproj13 \ && rm -rf /var/lib/apt/lists/* -COPY --from=build /usr/local/lib/python3.7 /usr/local/lib/python3.7 +COPY --from=build /usr/local/lib/python3.9 /usr/local/lib/python3.9 COPY --from=build /usr/local/bin/uwsgi /usr/local/bin/uwsgi # Stage 3.2 - Copy source code diff --git a/INSTALL.rst b/INSTALL.rst index b9389cf2..3ae8380e 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -18,7 +18,7 @@ Prerequisites You need the following libraries and/or programs: -* `Python`_ 3.7 or above +* `Python`_ 3.9 or above * Python `Virtualenv`_ and `Pip`_ * `PostgreSQL`_ 12 or above with PostGIS extension * `Node.js`_ diff --git a/README.NL.rst b/README.NL.rst index 8163d377..3cd10a4d 100644 --- a/README.NL.rst +++ b/README.NL.rst @@ -140,7 +140,7 @@ Licensed under the EUPL_ :alt: Docker image :target: https://hub.docker.com/r/maykinmedia/objects-api -.. |python-versions| image:: https://img.shields.io/badge/python-3.7%2B-blue.svg +.. |python-versions| image:: https://img.shields.io/badge/python-3.9%2B-blue.svg :alt: Supported Python version .. |lint-oas| image:: https://github.com/maykinmedia/objects-api/workflows/lint-oas/badge.svg diff --git a/README.rst b/README.rst index 89738090..0198364f 100644 --- a/README.rst +++ b/README.rst @@ -138,7 +138,7 @@ Licensed under the EUPL_ :alt: Docker image :target: https://hub.docker.com/r/maykinmedia/objects-api -.. |python-versions| image:: https://img.shields.io/badge/python-3.7%2B-blue.svg +.. |python-versions| image:: https://img.shields.io/badge/python-3.9%2B-blue.svg :alt: Supported Python version .. |lint-oas| image:: https://github.com/maykinmedia/objects-api/workflows/lint-oas/badge.svg diff --git a/requirements/base.txt b/requirements/base.txt index c75e8312..c6102f4b 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile -# To update, run: +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: # # pip-compile --no-emit-index-url requirements/base.in # @@ -32,6 +32,31 @@ cryptography==3.4.8 # josepy # mozilla-django-oidc # pyopenssl +django==2.2.28 + # via + # -r requirements/base.in + # django-axes + # django-choices + # django-filter + # django-formtools + # django-hijack + # django-markup + # django-otp + # django-phonenumber-field + # django-redis + # django-relativedelta + # django-rest-framework-condition + # django-rosetta + # django-sniplates + # djangorestframework + # drf-nested-routers + # drf-spectacular + # drf-yasg + # maykin-django-two-factor-auth + # mozilla-django-oidc + # mozilla-django-oidc-db + # vng-api-common + # zgw-consumers django-admin-index==1.5.0 # via -r requirements/base.in django-axes==5.14.0 @@ -51,12 +76,12 @@ django-filter==2.4.0 # vng-api-common django-formtools==2.3 # via maykin-django-two-factor-auth -django-hijack-admin==2.1.10 - # via -r requirements/base.in django-hijack==2.3.0 # via # -r requirements/base.in # django-hijack-admin +django-hijack-admin==2.1.10 + # via -r requirements/base.in django-ipware==3.0.2 # via django-axes django-markup==1.3 @@ -82,43 +107,18 @@ django-solo==1.1.5 # mozilla-django-oidc-db # vng-api-common # zgw-consumers -django==2.2.28 +djangorestframework==3.12.4 # via # -r requirements/base.in - # django-axes - # django-choices - # django-filter - # django-formtools - # django-hijack - # django-markup - # django-otp - # django-phonenumber-field - # django-redis - # django-relativedelta - # django-rest-framework-condition - # django-rosetta - # django-sniplates - # djangorestframework + # djangorestframework-gis # drf-nested-routers # drf-spectacular # drf-yasg - # maykin-django-two-factor-auth - # mozilla-django-oidc - # mozilla-django-oidc-db # vng-api-common - # zgw-consumers djangorestframework-camel-case==1.2.0 # via vng-api-common djangorestframework-gis==0.17 # via -r requirements/base.in -djangorestframework==3.12.4 - # via - # -r requirements/base.in - # djangorestframework-gis - # drf-nested-routers - # drf-spectacular - # drf-yasg - # vng-api-common drf-nested-routers==0.93.3 # via vng-api-common drf-spectacular==0.16.0 @@ -139,10 +139,6 @@ glom==20.11.0 # via -r requirements/base.in idna==2.10 # via requests -importlib-metadata==4.8.1 - # via - # jsonschema - # markdown inflection==0.5.1 # via # drf-spectacular @@ -167,10 +163,10 @@ markupsafe==1.1.1 # via jinja2 maykin-django-two-factor-auth[phonenumbers]==2.0.3 # via -r requirements/base.in -mozilla-django-oidc-db==0.7.2 - # via -r requirements/base.in mozilla-django-oidc==1.2.4 # via mozilla-django-oidc-db +mozilla-django-oidc-db==0.7.2 + # via -r requirements/base.in oyaml==1.0 # via vng-api-common packaging==23.2 @@ -217,8 +213,6 @@ qrcode==6.1 # via maykin-django-two-factor-auth redis==3.5.3 # via django-redis -requests-mock==1.8.0 - # via zgw-consumers requests==2.25.1 # via # coreapi @@ -228,10 +222,12 @@ requests==2.25.1 # requests-mock # vng-api-common # zgw-consumers -ruamel.yaml.clib==0.2.7 - # via ruamel.yaml -ruamel.yaml==0.17.4 +requests-mock==1.8.0 + # via zgw-consumers +ruamel-yaml==0.17.4 # via drf-yasg +ruamel-yaml-clib==0.2.7 + # via ruamel-yaml sentry-sdk==1.0.0 # via -r requirements/base.in six==1.15.0 @@ -251,8 +247,6 @@ sqlparse==0.4.2 # via django text-unidecode==1.3 # via faker -typing-extensions==4.7.1 - # via importlib-metadata unidecode==1.2.0 # via vng-api-common uritemplate==3.0.1 @@ -267,12 +261,12 @@ urllib3==1.26.6 # sentry-sdk uwsgi==2.0.21 # via -r requirements/base.in -vng-api-common[markdown_docs]==1.6.4 - # via -r requirements/base.in +vng-api-common[markdown-docs]==1.6.4 + # via + # -r requirements/base.in + # vng-api-common zgw-consumers==0.15.2 # via -r requirements/base.in -zipp==3.5.0 - # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/ci.txt b/requirements/ci.txt index f5c8fa80..de3701ae 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile -# To update, run: +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: # # pip-compile --no-emit-index-url --output-file=requirements/ci.txt requirements/base.txt requirements/test-tools.in # @@ -49,6 +49,33 @@ cryptography==3.4.8 # pyopenssl cssselect==1.1.0 # via pyquery +django==2.2.28 + # via + # -r requirements/base.txt + # django-axes + # django-capture-on-commit-callbacks + # django-choices + # django-filter + # django-formtools + # django-hijack + # django-jenkins + # django-markup + # django-otp + # django-phonenumber-field + # django-redis + # django-relativedelta + # django-rest-framework-condition + # django-rosetta + # django-sniplates + # djangorestframework + # drf-nested-routers + # drf-spectacular + # drf-yasg + # maykin-django-two-factor-auth + # mozilla-django-oidc + # mozilla-django-oidc-db + # vng-api-common + # zgw-consumers django-admin-index==1.5.0 # via -r requirements/base.txt django-axes==5.14.0 @@ -76,12 +103,12 @@ django-formtools==2.3 # via # -r requirements/base.txt # maykin-django-two-factor-auth -django-hijack-admin==2.1.10 - # via -r requirements/base.txt django-hijack==2.3.0 # via # -r requirements/base.txt # django-hijack-admin +django-hijack-admin==2.1.10 + # via -r requirements/base.txt django-ipware==3.0.2 # via # -r requirements/base.txt @@ -89,9 +116,7 @@ django-ipware==3.0.2 django-jenkins==0.110.0 # via -r requirements/test-tools.in django-markup==1.3 - # via - # -r requirements/base.txt - # vng-api-common + # via -r requirements/base.txt django-ordered-model==3.4.1 # via # -r requirements/base.txt @@ -126,47 +151,20 @@ django-solo==1.1.5 # zgw-consumers django-webtest==1.9.7 # via -r requirements/test-tools.in -django==2.2.28 +djangorestframework==3.12.4 # via # -r requirements/base.txt - # django-axes - # django-capture-on-commit-callbacks - # django-choices - # django-filter - # django-formtools - # django-hijack - # django-jenkins - # django-markup - # django-otp - # django-phonenumber-field - # django-redis - # django-relativedelta - # django-rest-framework-condition - # django-rosetta - # django-sniplates - # djangorestframework + # djangorestframework-gis # drf-nested-routers # drf-spectacular # drf-yasg - # maykin-django-two-factor-auth - # mozilla-django-oidc - # mozilla-django-oidc-db # vng-api-common - # zgw-consumers djangorestframework-camel-case==1.2.0 # via # -r requirements/base.txt # vng-api-common djangorestframework-gis==0.17 # via -r requirements/base.txt -djangorestframework==3.12.4 - # via - # -r requirements/base.txt - # djangorestframework-gis - # drf-nested-routers - # drf-spectacular - # drf-yasg - # vng-api-common drf-nested-routers==0.93.3 # via # -r requirements/base.txt @@ -203,11 +201,6 @@ idna==2.10 # via # -r requirements/base.txt # requests -importlib-metadata==4.8.1 - # via - # -r requirements/base.txt - # jsonschema - # markdown inflection==0.5.1 # via # -r requirements/base.txt @@ -240,21 +233,21 @@ jsonschema==3.2.0 lxml==4.7.1 # via pyquery markdown==3.3.4 - # via - # -r requirements/base.txt - # vng-api-common + # via -r requirements/base.txt markupsafe==1.1.1 # via # -r requirements/base.txt # jinja2 maykin-django-two-factor-auth[phonenumbers]==2.0.3 - # via -r requirements/base.txt -mozilla-django-oidc-db==0.7.2 - # via -r requirements/base.txt + # via + # -r requirements/base.txt + # maykin-django-two-factor-auth mozilla-django-oidc==1.2.4 # via # -r requirements/base.txt # mozilla-django-oidc-db +mozilla-django-oidc-db==0.7.2 + # via -r requirements/base.txt oyaml==1.0 # via # -r requirements/base.txt @@ -325,11 +318,6 @@ redis==3.5.3 # via # -r requirements/base.txt # django-redis -requests-mock==1.8.0 - # via - # -r requirements/base.txt - # -r requirements/test-tools.in - # zgw-consumers requests==2.25.1 # via # -r requirements/base.txt @@ -340,14 +328,19 @@ requests==2.25.1 # requests-mock # vng-api-common # zgw-consumers -ruamel.yaml.clib==0.2.7 +requests-mock==1.8.0 # via # -r requirements/base.txt - # ruamel.yaml -ruamel.yaml==0.17.4 + # -r requirements/test-tools.in + # zgw-consumers +ruamel-yaml==0.17.4 # via # -r requirements/base.txt # drf-yasg +ruamel-yaml-clib==0.2.7 + # via + # -r requirements/base.txt + # ruamel-yaml sentry-sdk==1.0.0 # via -r requirements/base.txt six==1.15.0 @@ -377,10 +370,6 @@ text-unidecode==1.3 # via # -r requirements/base.txt # faker -typing-extensions==4.7.1 - # via - # -r requirements/base.txt - # importlib-metadata unidecode==1.2.0 # via # -r requirements/base.txt @@ -399,8 +388,10 @@ urllib3==1.26.6 # sentry-sdk uwsgi==2.0.21 # via -r requirements/base.txt -vng-api-common[markdown_docs]==1.6.4 - # via -r requirements/base.txt +vng-api-common[markdown-docs]==1.6.4 + # via + # -r requirements/base.txt + # vng-api-common waitress==2.1.1 # via webtest webob==1.8.7 @@ -409,10 +400,6 @@ webtest==2.0.35 # via django-webtest zgw-consumers==0.15.2 # via -r requirements/base.txt -zipp==3.5.0 - # via - # -r requirements/base.txt - # importlib-metadata # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/dev.txt b/requirements/dev.txt index 94c5f487..f4abc7ce 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile -# To update, run: +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: # # pip-compile --no-emit-index-url --output-file=requirements/dev.txt requirements/ci.txt requirements/dev.in # @@ -69,6 +69,35 @@ cssselect==1.1.0 # via # -r requirements/ci.txt # pyquery +django==2.2.28 + # via + # -r requirements/ci.txt + # django-axes + # django-capture-on-commit-callbacks + # django-choices + # django-debug-toolbar + # django-extensions + # django-filter + # django-formtools + # django-hijack + # django-jenkins + # django-markup + # django-otp + # django-phonenumber-field + # django-redis + # django-relativedelta + # django-rest-framework-condition + # django-rosetta + # django-sniplates + # djangorestframework + # drf-nested-routers + # drf-spectacular + # drf-yasg + # maykin-django-two-factor-auth + # mozilla-django-oidc + # mozilla-django-oidc-db + # vng-api-common + # zgw-consumers django-admin-index==1.5.0 # via -r requirements/ci.txt django-axes==5.14.0 @@ -100,12 +129,12 @@ django-formtools==2.3 # via # -r requirements/ci.txt # maykin-django-two-factor-auth -django-hijack-admin==2.1.10 - # via -r requirements/ci.txt django-hijack==2.3.0 # via # -r requirements/ci.txt # django-hijack-admin +django-hijack-admin==2.1.10 + # via -r requirements/ci.txt django-ipware==3.0.2 # via # -r requirements/ci.txt @@ -113,9 +142,7 @@ django-ipware==3.0.2 django-jenkins==0.110.0 # via -r requirements/ci.txt django-markup==1.3 - # via - # -r requirements/ci.txt - # vng-api-common + # via -r requirements/ci.txt django-ordered-model==3.4.1 # via # -r requirements/ci.txt @@ -150,49 +177,20 @@ django-solo==1.1.5 # zgw-consumers django-webtest==1.9.7 # via -r requirements/ci.txt -django==2.2.28 +djangorestframework==3.12.4 # via # -r requirements/ci.txt - # django-axes - # django-capture-on-commit-callbacks - # django-choices - # django-debug-toolbar - # django-extensions - # django-filter - # django-formtools - # django-hijack - # django-jenkins - # django-markup - # django-otp - # django-phonenumber-field - # django-redis - # django-relativedelta - # django-rest-framework-condition - # django-rosetta - # django-sniplates - # djangorestframework + # djangorestframework-gis # drf-nested-routers # drf-spectacular # drf-yasg - # maykin-django-two-factor-auth - # mozilla-django-oidc - # mozilla-django-oidc-db # vng-api-common - # zgw-consumers djangorestframework-camel-case==1.2.0 # via # -r requirements/ci.txt # vng-api-common djangorestframework-gis==0.17 # via -r requirements/ci.txt -djangorestframework==3.12.4 - # via - # -r requirements/ci.txt - # djangorestframework-gis - # drf-nested-routers - # drf-spectacular - # drf-yasg - # vng-api-common docutils==0.16 # via # recommonmark @@ -238,14 +236,6 @@ idna==2.10 # requests imagesize==1.2.0 # via sphinx -importlib-metadata==4.8.1 - # via - # -r requirements/ci.txt - # click - # flake8 - # jsonschema - # markdown - # pep517 inflection==0.5.1 # via # -r requirements/ci.txt @@ -283,23 +273,23 @@ lxml==4.7.1 # -r requirements/ci.txt # pyquery markdown==3.3.4 - # via - # -r requirements/ci.txt - # vng-api-common + # via -r requirements/ci.txt markupsafe==1.1.1 # via # -r requirements/ci.txt # jinja2 maykin-django-two-factor-auth[phonenumbers]==2.0.3 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # maykin-django-two-factor-auth mccabe==0.6.1 # via flake8 -mozilla-django-oidc-db==0.7.2 - # via -r requirements/ci.txt mozilla-django-oidc==1.2.4 # via # -r requirements/ci.txt # mozilla-django-oidc-db +mozilla-django-oidc-db==0.7.2 + # via -r requirements/ci.txt mypy-extensions==0.4.3 # via black oyaml==1.0 @@ -393,10 +383,6 @@ redis==3.5.3 # via # -r requirements/ci.txt # django-redis -requests-mock==1.8.0 - # via - # -r requirements/ci.txt - # zgw-consumers requests==2.25.1 # via # -r requirements/ci.txt @@ -408,14 +394,18 @@ requests==2.25.1 # sphinx # vng-api-common # zgw-consumers -ruamel.yaml.clib==0.2.7 +requests-mock==1.8.0 # via # -r requirements/ci.txt - # ruamel.yaml -ruamel.yaml==0.17.4 + # zgw-consumers +ruamel-yaml==0.17.4 # via # -r requirements/ci.txt # drf-yasg +ruamel-yaml-clib==0.2.7 + # via + # -r requirements/ci.txt + # ruamel-yaml sentry-sdk==1.0.0 # via -r requirements/ci.txt six==1.15.0 @@ -439,16 +429,16 @@ soupsieve==2.2.1 # via # -r requirements/ci.txt # beautifulsoup4 -sphinx-rtd-theme==0.5.2 - # via -r requirements/dev.in -sphinx-tabs==2.1.0 - # via -r requirements/dev.in sphinx==3.5.4 # via # -r requirements/dev.in # recommonmark # sphinx-rtd-theme # sphinx-tabs +sphinx-rtd-theme==0.5.2 + # via -r requirements/dev.in +sphinx-tabs==2.1.0 + # via -r requirements/dev.in sphinxcontrib-applehelp==1.0.2 # via sphinx sphinxcontrib-devhelp==1.0.2 @@ -476,14 +466,8 @@ toml==0.10.2 # via pep517 tomli==2.0.1 # via black -typed-ast==1.4.3 - # via black typing-extensions==4.7.1 - # via - # -r requirements/ci.txt - # black - # importlib-metadata - # platformdirs + # via black unidecode==1.2.0 # via # -r requirements/ci.txt @@ -502,8 +486,10 @@ urllib3==1.26.6 # sentry-sdk uwsgi==2.0.21 # via -r requirements/ci.txt -vng-api-common[markdown_docs]==1.6.4 - # via -r requirements/ci.txt +vng-api-common[markdown-docs]==1.6.4 + # via + # -r requirements/ci.txt + # vng-api-common waitress==2.1.1 # via # -r requirements/ci.txt @@ -518,11 +504,6 @@ webtest==2.0.35 # django-webtest zgw-consumers==0.15.2 # via -r requirements/ci.txt -zipp==3.5.0 - # via - # -r requirements/ci.txt - # importlib-metadata - # pep517 # The following packages are considered to be unsafe in a requirements file: # pip