Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add testing against Python 3.13 #8716

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@ jobs:
if: matrix.toxenv == 'validate-translations'
run: sudo apt-get install gettext

- name: Install lxml dependencies
run: sudo apt-get install libxml2-dev libxslt-dev

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.13

- name: Set up Node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -98,7 +101,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.13

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.13

- name: Install dependencies
run: |
Expand Down
28 changes: 14 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ exclude: .+\/migrations\/.+\.py
default_language_version:
python: python3.8
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.4.5
hooks:
# Run the linter.
- id: ruff
args: ['--fix']
# Run the formatter.
- id: ruff-format
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
hooks:
- id: bandit
args: ['-c', 'pyproject.toml', '--recursive']
additional_dependencies: ['bandit[toml]']
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.4.5
hooks:
# Run the linter.
- id: ruff
args: ['--fix']
# Run the formatter.
- id: ruff-format
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
hooks:
- id: bandit
args: ['-c', 'pyproject.toml', '--recursive']
additional_dependencies: ['bandit[toml]']
4 changes: 2 additions & 2 deletions cfgov/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
# Regular expression format string that will match any tag <tag_name> (that is
# not self-closing) and group its contents.
TAG_RE = (
# Make '.' match new lines, ignore case
r"(?s)(?i)"
# Match an <tag_name[ attributes]>. If tag_name is not followed by a space
# and any characters except >, it must be followed by >.
r"<{tag_name}(?:\s+[^>]*?|)>"
# And match everything inside before the closing </tag>
r".+?(?=</{tag_name}>)"
# Then match the closing </tag>
r"</{tag_name}>"
# Make '.' match new lines, ignore case
r"(?s)(?i)"
)

# Match <body…>…</body>
Expand Down
5 changes: 3 additions & 2 deletions requirements/libraries.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These packages are installed from PyPI.
base36==0.1.1
backports.zoneinfo==0.2.1
backports.zoneinfo==0.2.1;python_version<"3.9"
beautifulsoup4==4.11.2
boto3==1.34.144
dj-database-url==2.2.0
Expand All @@ -26,7 +26,8 @@ mozilla-django-oidc==4.0.1
opensearch-py==2.6.0
# psycopg2 > 2.9.6 causes cf.gov to hang locally for people with on-network
# Macs, so we'll pin to 2.9.6 for now. See PR 8203 for details.
psycopg2-binary==2.9.6
psycopg2-binary==2.9.6;python_version<"3.13"
psycopg2-binary==2.9.10;python_version<"3.14"
python-dateutil==2.9.0
regdown==1.0.7
requests-aws4auth==1.2.3
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
coverage==7.4.3
diff_cover==8.0.3
django-slowtests==1.1.1
freezegun==1.4.0
freezegun==1.5.1
github3.py==4.0.1
model-bakery==1.17.0
moto==5.0.2
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ allowlist_externals=echo
changedir=
unittest: {[unittest-config]changedir}

basepython=python3.8
basepython=python3.13

deps=
lint: {[lint-config]deps}
Expand Down
Loading