Initial updates to remove 3.9 support

This commit is contained in:
Trenton Holmes 2024-09-24 07:52:08 -07:00
parent 5e687d9a93
commit 0d4195e6e7
8 changed files with 818 additions and 877 deletions

View File

@ -16,9 +16,9 @@ on:
env:
# This is the version of pipenv all the steps will use
# If changing this, change Dockerfile
DEFAULT_PIP_ENV_VERSION: "2024.0.1"
DEFAULT_PIP_ENV_VERSION: "2024.0.3"
# This is the default version of Python to use in most steps which aren't specific
DEFAULT_PYTHON_VERSION: "3.10"
DEFAULT_PYTHON_VERSION: "3.11"
jobs:
pre-commit:
@ -100,7 +100,7 @@ jobs:
- pre-commit
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12']
fail-fast: false
steps:
-

View File

@ -1 +1 @@
3.9.19
3.10.15

View File

@ -2,7 +2,7 @@ fix = true
line-length = 88
respect-gitignore = true
src = ["src"]
target-version = "py39"
target-version = "py310"
output-format = "grouped"
show-fixes = true

View File

@ -11,7 +11,7 @@ If you want to implement something big:
## Python
Paperless supports python 3.9 - 3.11 at this time. We format Python code with [ruff](https://docs.astral.sh/ruff/formatter/).
Paperless supports python 3.10 - 3.12 at this time. We format Python code with [ruff](https://docs.astral.sh/ruff/formatter/).
## Branches

View File

@ -39,7 +39,7 @@ COPY Pipfile* ./
RUN set -eux \
&& echo "Installing pipenv" \
&& python3 -m pip install --no-cache-dir --upgrade pipenv==2024.0.1 \
&& python3 -m pip install --no-cache-dir --upgrade pipenv==2024.0.3 \
&& echo "Generating requirement.txt" \
&& pipenv requirements > requirements.txt

1674
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -250,7 +250,7 @@ a minimal installation of Debian/Buster, which is the current stable
release at the time of writing. Windows is not and will never be
supported.
Paperless requires Python 3. At this time, 3.9 - 3.11 are tested versions.
Paperless requires Python 3. At this time, 3.10 - 3.12 are tested versions.
Newer versions may work, but some dependencies may not fully support newer versions.
Support for older Python versions may be dropped as they reach end of life or as newer versions
are released, dependency support is confirmed, etc.

View File

@ -1638,9 +1638,8 @@ class RemoteVersionView(GenericAPIView):
try:
remote_json = json.loads(remote)
remote_version = remote_json["tag_name"]
# Basically PEP 616 but that only went in 3.9
if remote_version.startswith("ngx-"):
remote_version = remote_version[len("ngx-") :]
# Some early tags used ngx-x.y.z
remote_version = remote_version.removeprefix("ngx-")
except ValueError:
logger.debug("An error occurred parsing remote version json")
except urllib.error.URLError: