From 7a0d3a480b8e7b6ec5de53a69e304da54e1e88a4 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Thu, 25 Jan 2024 07:19:02 -0500 Subject: [PATCH] Revert "move to python 3.11" We're pinned to an ancient sphinx version that doesn't work with 3.11; ugprading Python is going to be a significant task, which I'll undertake later. --- .github/workflows/release.yml | 2 +- .github/workflows/run-tox-suite.yml | 19 ++++++++++--------- CHANGES.rst | 2 -- README.rst | 6 +++--- biweeklybudget/tests/docker_build.py | 8 ++++---- biweeklybudget/version.py | 2 +- docs/source/getting_started.rst | 6 +++--- setup.py | 4 ---- tox.ini | 16 ++++++++-------- 9 files changed, 30 insertions(+), 35 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5994998..75c7968 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - name: Install dependencies run: python -m pip install --upgrade pip && pip install tox build - name: Get Version diff --git a/.github/workflows/run-tox-suite.yml b/.github/workflows/run-tox-suite.yml index daf8541..d0c046e 100644 --- a/.github/workflows/run-tox-suite.yml +++ b/.github/workflows/run-tox-suite.yml @@ -1,7 +1,7 @@ name: Run Tox Suite on: [push, pull_request, workflow_dispatch] jobs: - py311: + py310: runs-on: ubuntu-latest strategy: fail-fast: false @@ -27,7 +27,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - name: Install dependencies run: python -m pip install --upgrade pip && pip install tox pymysql - name: Setup test DB @@ -58,7 +58,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - name: Install dependencies run: python -m pip install --upgrade pip && pip install tox - name: Run tests @@ -72,7 +72,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - name: Install dependencies run: python -m pip install --upgrade pip && pip install tox && npm install -g jsdoc - name: Run tests @@ -103,7 +103,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - name: Install dependencies run: python -m pip install --upgrade pip && pip install tox pymysql - name: Setup test DB @@ -136,7 +136,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - name: Install dependencies run: python -m pip install --upgrade pip && pip install tox pymysql - name: Setup test DB @@ -192,7 +192,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - name: Install dependencies run: python -m pip install --upgrade pip && pip install tox pymysql - name: Setup test DB @@ -233,7 +233,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - name: Install dependencies run: python -m pip install --upgrade pip && pip install tox pymysql - name: Setup test DB @@ -287,7 +287,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - name: Install dependencies run: python -m pip install --upgrade pip && pip install tox pymysql - name: Setup test DB @@ -304,3 +304,4 @@ jobs: results/ coverage.xml htmlcov/ + diff --git a/CHANGES.rst b/CHANGES.rst index 5801360..0d2f0a3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,8 +6,6 @@ Changelog * Add tracking of sales tax paid on each transaction. * Minor build fixes to get this building again. -* Various test fixes -* Move build, test, development, and Docker image to Python 3.11. 1.1.1 (2022-12-30) ------------------ diff --git a/README.rst b/README.rst index dff06d8..345435b 100644 --- a/README.rst +++ b/README.rst @@ -77,7 +77,7 @@ Requirements Using the dockerized version will eliminate all of these dependencies aside from MySQL (which you can run in another container) and Vault (if you choose to take advantage of the OFX downloading), which you can also run in another container. -* Python 3.7+ (currently tested and developed with 3.11). +* Python 3.7+ (currently tested and developed with 3.10). * Python `VirtualEnv `_ and ``pip`` (recommended installation method; your OS/distribution should have packages for these) * MySQL, or a compatible database (e.g. `MariaDB `_). biweeklybudget uses `SQLAlchemy `_ for database abstraction, but currently specifies some MySQL-specific options, and is only tested with MySQL. * To use the automated Plaid transaction downloading functionality, a valid `Plaid `__ account. @@ -90,12 +90,12 @@ Installation ------------ It's recommended that you run from the Docker image, as that's what I do. If you -don't want to do that, you can also install in a virtualenv using Python 3.11: +don't want to do that, you can also install in a virtualenv using Python 3.10: .. code-block:: bash mkdir biweeklybudget - python3.11 -mvenv venv + python3.10 -mvenv venv source venv/bin/activate pip install biweeklybudget diff --git a/biweeklybudget/tests/docker_build.py b/biweeklybudget/tests/docker_build.py index ffd1f35..9fd6f5d 100755 --- a/biweeklybudget/tests/docker_build.py +++ b/biweeklybudget/tests/docker_build.py @@ -74,11 +74,11 @@ _log.setLevel(logging.CRITICAL) _log.propagate = True -if sys.version_info[0:2] < (3, 7): - raise SystemExit('ERROR: Docker build can only run under py >= 3.7') +if sys.version_info[0:2] < (3, 6): + raise SystemExit('ERROR: Docker build can only run under py >= 3.6') -DOCKER_IMG = 'python:3.11-alpine3.18' -PY_VERSION = '3.11' +DOCKER_IMG = 'python:3.10-alpine3.16' +PY_VERSION = '3.10' ACCEPTANCE_ENV = 'acceptance' DOCKERFILE_TEMPLATE = """ diff --git a/biweeklybudget/version.py b/biweeklybudget/version.py index 4e31bab..f59ef12 100644 --- a/biweeklybudget/version.py +++ b/biweeklybudget/version.py @@ -35,5 +35,5 @@ ################################################################################ """ -VERSION = '1.2.0' +VERSION = '1.1.1' PROJECT_URL = 'https://github.com/jantman/biweeklybudget' diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index bf92bae..8a33e24 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -12,7 +12,7 @@ Requirements Using the dockerized version will eliminate all of these dependencies aside from MySQL and Vault (the latter only if you choose to take advantage of the OFX downloading), both of which you can also run in containers. -* Python 3.7+ (currently tested and developed with 3.11). +* Python 3.6+ (currently tested with 3.6, 3.7, 3.8 and developed with 3.8). **Python 2 is not supported.** * Python `VirtualEnv `_ and ``pip`` (recommended installation method; your OS/distribution should have packages for these) * MySQL, or a compatible database (e.g. `MariaDB `_ ). biweeklybudget uses `SQLAlchemy `_ for database abstraction, but currently specifies some MySQL-specific options, and is only tested with MySQL. * To use the new :ref:`Plaid ` automated transaction downloading functionality, a valid Plaid account. @@ -28,12 +28,12 @@ It's recommended that you install into a virtual environment (virtualenv / venv). See the `virtualenv usage documentation `_ for information on how to create a venv. -This app is developed against Python 3.11 and requires at least Python 3.7. +This app is developed against Python 3.8. It does not support Python3 < 3.4. .. code-block:: bash mkdir biweeklybudget - virtualenv --python=python3.11 . + virtualenv --python=python3.8 . source bin/activate pip install biweeklybudget diff --git a/setup.py b/setup.py index ef56ef4..fbad101 100644 --- a/setup.py +++ b/setup.py @@ -64,11 +64,7 @@ 'Programming Language :: Python', 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', 'Topic :: Office/Business :: Financial' ] diff --git a/tox.ini b/tox.ini index 41a1ba9..c38e50d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py311,docs,jsdoc,screenshots,acceptance,docker,migrations,plaid +envlist = py310,docs,jsdoc,screenshots,acceptance,docker,migrations,plaid [testenv] deps = @@ -57,7 +57,7 @@ deps = pygments==2.6.1 sphinx==1.5.5 sphinx_rtd_theme==0.5.0 -basepython = python3.11 +basepython = python3.10 commands = python --version pip --version @@ -82,7 +82,7 @@ deps = sphinx==1.5.5 sphinx_rtd_theme==0.5.0 sphinx-js==1.5.2 -basepython = python3.11 +basepython = python3.10 commands = python --version pip --version @@ -97,7 +97,7 @@ deps = Pillow==9.3.0 passenv = {[testenv]passenv} setenv = {[testenv]setenv} -basepython = python3.11 +basepython = python3.10 sitepackages = False allowlist_externals = env test commands = @@ -112,7 +112,7 @@ deps = docker>=7.0.0,<8.0.0 passenv = {[testenv]passenv},DOCKER_TEST_TAG,DOCKER_BUILD_VER,TEST_DOCKER,GITHUB_OUTPUT setenv = {[testenv]setenv} -basepython = python3.11 +basepython = python3.10 sitepackages = False allowlist_externals = env,test package = sdist @@ -142,7 +142,7 @@ deps = retrying passenv = {[testenv]passenv} setenv = {[testenv]setenv} -basepython = python3.11 +basepython = python3.10 sitepackages = False allowlist_externals = env test commands = @@ -174,7 +174,7 @@ setenv = TOXINIDIR={toxinidir} SETTINGS_MODULE=biweeklybudget.tests.fixtures.test_settings BIWEEKLYBUDGET_LOG_FILE={env_dir}/liveserver.log -basepython = python3.11 +basepython = python3.10 sitepackages = False allowlist_externals = env test commands = @@ -197,7 +197,7 @@ deps = retrying passenv=CI,CONTINUOUS_INTEGRATION,NO_REFRESH_DB,NO_CLASS_REFRESH_DB,MYSQL_*,SQL_ECHO setenv = {[testenv]setenv} -basepython = python3.11 +basepython = python3.10 sitepackages = False allowlist_externals = env test commands =