From ad14f5f8ef0d4f5a21510e7bf7b4c32313c482f1 Mon Sep 17 00:00:00 2001 From: Alejandro Roiz Walss Date: Wed, 24 Jul 2024 08:31:41 -0600 Subject: [PATCH] Revert "upgrade to py3.10" This reverts commit 71b1905b90dfdd3dd1584f7803bce96072aa8ff9. --- .github/workflows/pull_request.yml | 12 +- .github/workflows/push.yml | 12 +- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 4 - Dockerfile | 9 +- actions_run_integration.sh | 2 +- docker-compose.integration.yml | 2 +- docker-compose.yml | 2 +- docs/build.sh | 4 +- docs/requirements3.txt | 2 +- piptools_requirements.txt | 2 +- piptools_requirements3.txt | 11 ++ requirements.in | 4 +- requirements.txt | 4 +- requirements3.txt | 215 +++++++++++++++++++++++++++++ 15 files changed, 255 insertions(+), 32 deletions(-) create mode 100644 piptools_requirements3.txt create mode 100644 requirements3.txt diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 86da400b..ed69e092 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -5,14 +5,14 @@ permissions: {} jobs: pre-commit: - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v1 - - name: Setup python 3.10 + - name: Setup python 3.8 uses: actions/setup-python@v1 with: - python-version: 3.10 + python-version: 3.8 - name: Install pre-commit run: pip install pre-commit - name: Run pre-commit @@ -40,10 +40,10 @@ jobs: # - name: Run license finder # run: license_finder test-unit: - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.8.x', '3.10.x'] + python-version: ['3.7.x', '3.8.x'] steps: - name: Checkout uses: actions/checkout@v1 @@ -54,7 +54,7 @@ jobs: - name: Install apt dependencies run: sudo apt-get update && sudo apt-get install -y python3-dev openssl libssl-dev gcc pkg-config libffi-dev libxml2-dev libxmlsec1-dev - name: Install dependencies - run: pip install -r piptools_requirements.txt && pip install -r requirements.txt + run: pip install -r piptools_requirements.txt && pip install -r piptools_requirements3.txt && pip install -r requirements3.txt - name: Run python unit tests run: make test_unit test-integration: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0b813533..06be3779 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -8,14 +8,14 @@ on: jobs: build-and-deploy-docs: name: Build and publish docs - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v1 - - name: Setup python 3.10 + - name: Setup python 3.8 uses: actions/setup-python@v1 with: - python-version: 3.10 + python-version: 3.8 - name: Install virtualenv run: pip install virtualenv - name: Install xmlsec @@ -33,14 +33,14 @@ jobs: FOLDER: generated/docs # The folder the action should deploy. build-and-publish-python-module: name: Build and publish python module to pypi - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v1 - - name: Setup python 3.10 + - name: Setup python 3.8 uses: actions/setup-python@v1 with: - python-version: 3.10 + python-version: 3.8 - name: Add wheel dependency run: pip install wheel - name: Generate dist diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fdcf3cb6..9f67dbc0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: mypy additional_dependencies: - --no-compile - - cffi==1.16.0 + - cffi==1.14.6 - cryptography==41.0.1 - pycparser==2.21 - types-pyopenssl==23.2.0.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index e7bb2b9b..0a774729 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,5 @@ # Changelog -## 6.5.7 - -* Upgraded to python 3.10 - ## 6.4.0 * Updated client with a new logo and updated CSS to match design style guide. The new CSS coloring should diff --git a/Dockerfile b/Dockerfile index a6da0e23..b8648f26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update \ make nodejs git-core \ # For backend gcc pkg-config \ - python3.10-dev virtualenv \ + python3.8-dev virtualenv \ libffi-dev libxml2-dev libxmlsec1-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* @@ -22,12 +22,13 @@ COPY package.json /srv/confidant/ RUN npm install grunt-cli && \ npm install -COPY piptools_requirements.txt requirements.txt /srv/confidant/ +COPY piptools_requirements.txt piptools_requirements3.txt requirements3.txt /srv/confidant/ ENV PATH=/venv/bin:$PATH -RUN virtualenv /venv --python=/usr/bin/python10 && \ +RUN virtualenv /venv --python=/usr/bin/python3.8 && \ pip install --no-cache -r piptools_requirements.txt && \ - pip install --no-cache -r requirements.txt + pip install --no-cache -r piptools_requirements3.txt && \ + pip install --no-cache -r requirements3.txt COPY .jshintrc Gruntfile.js /srv/confidant/ COPY confidant/public /srv/confidant/confidant/public diff --git a/actions_run_integration.sh b/actions_run_integration.sh index 183423fc..8aa42da6 100755 --- a/actions_run_integration.sh +++ b/actions_run_integration.sh @@ -2,5 +2,5 @@ cd /srv/confidant apt-get update && apt-get install -y python3-dev openssl libssl-dev gcc pkg-config libffi-dev libxml2-dev libxmlsec1-dev -pip install -r piptools_requirements.txt && pip install -r requirements.txt +pip install -r piptools_requirements.txt && pip install -r piptools_requirements3.txt && pip install -r requirements3.txt make test_integration diff --git a/docker-compose.integration.yml b/docker-compose.integration.yml index 03628040..b5213673 100644 --- a/docker-compose.integration.yml +++ b/docker-compose.integration.yml @@ -1,7 +1,7 @@ version: "3.8" services: confidant: - image: python:3.10 + image: python:3.8 init: true restart: "no" networks: diff --git a/docker-compose.yml b/docker-compose.yml index 3b963335..1babac0f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3.8" +version: "3.7" networks: confidant: name: confidant diff --git a/docs/build.sh b/docs/build.sh index 78a6b0ee..46827e64 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -8,7 +8,7 @@ source_venv() { VENV_DIR=$1 if [[ "$VIRTUAL_ENV" == "" ]]; then if [[ ! -d "${VENV_DIR}"/venv ]]; then - virtualenv "${VENV_DIR}"/venv --python=python3.10 + virtualenv "${VENV_DIR}"/venv --python=python3.8 fi source "${VENV_DIR}"/venv/bin/activate else @@ -56,7 +56,7 @@ rm -rf "${GENERATED_RST_DIR}" mkdir -p "${GENERATED_RST_DIR}" source_venv "$BUILD_DIR" -pip install -r "${SCRIPT_DIR}"/requirements.txt +pip install -r "${SCRIPT_DIR}"/requirements3.txt rsync -av "${SCRIPT_DIR}"/root/ "${SCRIPT_DIR}"/conf.py "${GENERATED_RST_DIR}" diff --git a/docs/requirements3.txt b/docs/requirements3.txt index fe6bb11c..6299a1f0 100644 --- a/docs/requirements3.txt +++ b/docs/requirements3.txt @@ -1,4 +1,4 @@ --r ../requirements.txt +-r ../requirements3.txt GitPython==2.0.8 Jinja2==2.11.3 Pygments==2.7.4 diff --git a/piptools_requirements.txt b/piptools_requirements.txt index 51301b50..bc733c2d 100644 --- a/piptools_requirements.txt +++ b/piptools_requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # cd ~/src/confidant && run-piptools diff --git a/piptools_requirements3.txt b/piptools_requirements3.txt new file mode 100644 index 00000000..bc733c2d --- /dev/null +++ b/piptools_requirements3.txt @@ -0,0 +1,11 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# cd ~/src/confidant && run-piptools +# + +pip==23.1.2 + # via -r /code/piptools/bootstrap_ins/requirements.in +setuptools==68.0.0 + # via -r /code/piptools/bootstrap_ins/requirements.in diff --git a/requirements.in b/requirements.in index f5fe3b33..90712173 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,4 @@ -# piptools: python3.10 +# piptools: python3.8 # Flask # License: BSD # Upstream url: http://github.com/mitsuhiko/flask/ @@ -49,7 +49,7 @@ cryptography>2.3.0 # Upstream url: https://bitbucket.org/cffi/cffi # Use: Required by cryptography package to be installed. This should be removed # once crytography updates their depenencies to require cffi>=1.10.0. -cffi>1.15.0 +cffi>1.10.0,<1.15.0 # License: BSD # Upstream url: https://github.com/fengsp/flask-session diff --git a/requirements.txt b/requirements.txt index d9adfc39..ee296dda 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # cd ~/src/confidant && run-piptools @@ -28,7 +28,7 @@ cerberus==1.3.4 # via -r requirements.in certifi==2023.5.7 # via requests -cffi==1.16.0 +cffi==1.14.6 # via # -r requirements.in # cryptography diff --git a/requirements3.txt b/requirements3.txt new file mode 100644 index 00000000..ee296dda --- /dev/null +++ b/requirements3.txt @@ -0,0 +1,215 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# cd ~/src/confidant && run-piptools +# +async-timeout==4.0.2 + # via redis +attrs==23.1.0 + # via toastedmarshmallow +authomatic==1.2.1 + # via -r requirements.in +blinker==1.6.2 + # via -r requirements.in +boto3==1.9.227 + # via + # -r requirements.in + # kmsauth +botocore==1.12.227 + # via + # -r requirements.in + # boto3 + # pynamodb + # s3transfer +cachetools==5.2.0 + # via -r requirements.in +cerberus==1.3.4 + # via -r requirements.in +certifi==2023.5.7 + # via requests +cffi==1.14.6 + # via + # -r requirements.in + # cryptography +charset-normalizer==3.1.0 + # via requests +click==7.1.2 + # via flask +coverage[toml]==7.2.7 + # via pytest-cov +cryptography==41.0.1 + # via + # -r requirements.in + # jwcrypto + # pyopenssl + # types-pyopenssl + # types-redis +deprecated==1.2.14 + # via jwcrypto +docutils==0.15.2 + # via botocore +exceptiongroup==1.1.1 + # via pytest +fakeredis==2.17.0 + # via -r requirements.in +flask==1.1.4 + # via + # -r requirements.in + # flask-script + # flask-session + # flask-sslify +flask-script==2.0.5 + # via -r requirements.in +flask-session==0.2.3 + # via -r requirements.in +flask-sslify==0.1.5 + # via -r requirements.in +gevent==22.10.2 + # via + # -r requirements.in + # pytest-gevent +greenlet==2.0.2 + # via + # -r requirements.in + # gevent +guard==1.0.1 + # via -r requirements.in +gunicorn==20.1.0 + # via -r requirements.in +idna==3.4 + # via requests +iniconfig==2.0.0 + # via pytest +isodate==0.6.1 + # via python3-saml +itsdangerous==1.1.0 + # via flask +jinja2==2.11.3 + # via flask +jmespath==0.10.0 + # via + # boto3 + # botocore +jwcrypto==1.5.0 + # via -r requirements.in +kmsauth==0.6.3 + # via -r requirements.in +lru-dict==1.2.0 + # via -r requirements.in +lxml==4.9.2 + # via + # python3-saml + # xmlsec +markupsafe==2.0.1 + # via jinja2 +mypy==1.4.1 + # via -r requirements.in +mypy-extensions==1.0.0 + # via mypy +ndg-httpsclient==0.5.1 + # via -r requirements.in +packaging==23.1 + # via pytest +pluggy==1.2.0 + # via pytest +pyasn1==0.5.0 + # via + # -r requirements.in + # ndg-httpsclient +pycparser==2.21 + # via cffi +pyjwt==2.7.0 + # via -r requirements.in +pynamodb==5.5.1 + # via -r requirements.in +pyopenssl==23.2.0 + # via + # -r requirements.in + # ndg-httpsclient +pytest==7.4.0 + # via + # -r requirements.in + # pytest-cov + # pytest-env + # pytest-gevent + # pytest-lazy-fixture + # pytest-mock +pytest-cov==4.1.0 + # via -r requirements.in +pytest-env==0.8.2 + # via -r requirements.in +pytest-gevent==1.1.0 + # via -r requirements.in +pytest-lazy-fixture==0.6.3 + # via -r requirements.in +pytest-mock==3.11.1 + # via -r requirements.in +python-dateutil==2.8.2 + # via botocore +python-json-logger==2.0.7 + # via -r requirements.in +python3-saml==1.15.0 + # via -r requirements.in +pytz==2023.3 + # via -r requirements.in +pyyaml==6.0 + # via -r requirements.in +redis==4.6.0 + # via + # -r requirements.in + # fakeredis +requests==2.31.0 + # via -r requirements.in +s3transfer==0.2.1 + # via boto3 +six==1.16.0 + # via + # isodate + # python-dateutil +sortedcontainers==2.4.0 + # via fakeredis +statsd==4.0.1 + # via -r requirements.in +toastedmarshmallow==2.15.2.post1 + # via -r requirements.in +tomli==2.0.1 + # via + # coverage + # mypy + # pytest +types-pyopenssl==23.2.0.1 + # via types-redis +types-pytz==2023.3.0.0 + # via -r requirements.in +types-pyyaml==6.0.12.10 + # via -r requirements.in +types-redis==4.6.0.0 + # via -r requirements.in +typing-extensions==4.7.0 + # via mypy +urllib3==1.25.11 + # via + # botocore + # requests +werkzeug==1.0.1 + # via flask +wrapt==1.15.0 + # via deprecated +xmlsec==1.3.13 + # via python3-saml +zope-event==5.0 + # via gevent +zope-interface==6.0 + # via gevent + +pip==23.1.2 + # via -r piptools_requirements.txt +setuptools==68.0.0 + # via + # -r piptools_requirements.txt + # cerberus + # gevent + # gunicorn + # zope-event + # zope-interface