Skip to content

Commit

Permalink
[RSPEED-420] Use Python 3.12 (#11)
Browse files Browse the repository at this point in the history
- Delete older requirements files
- Test on Python 3.12 and Python 3.13
- Change root level requirements.txt to symlink
- Update README
- Update containerfile
  • Loading branch information
samdoran authored Jan 10, 2025
1 parent 4131fcf commit 4e91299
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 104 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
fail-fast: true
matrix:
python-version:
- "3.9"
- "3.12"
- "3.13"

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LABEL version=0.0.1
ENV VENV=/opt/venvs/rhel_roadmap
ENV PYTHON="${VENV}/bin/python"
ENV PATH="${VENV}/bin:$PATH"
ENV PYTHON_VERSION="3.11"
ENV PYTHON_VERSION="3.12"

COPY LICENSE /licenses/Apache-2.0.txt

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ API server providing access to Red Hat Enterprise Linux roadmap information.

## Prerequisites

Python 3.9 or later.
Python 3.12 or later.
A container runtime such as `docker` or `podman`.


Expand Down Expand Up @@ -58,13 +58,13 @@ pre-commit run --all-files

### Updating requirements

Python 3.9, 3.11, and 3.12 must be available in order to generate requirements files.
Python 3.12 and 3.13 must be available in order to generate requirements files.

The following files are used for updating requiremetns:
The following files are used for updating requirements:

- `requiremetns.in` - Direct project dependencies
- `requiremetns-dev.in` - Requirements for development
- `requiremetns-test.in` - Requirements for running tests
- `requirements.in` - Direct project dependencies
- `requirements-dev.in` - Requirements for development
- `requirements-test.in` - Requirements for running tests
- `constraints.txt` - Indirect project dependencies

```
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ certifi==2024.12.14
click==8.1.7
dnspython==2.7.0
email_validator==2.2.0
exceptiongroup==1.2.2
fastapi==0.115.6
fastapi-cli==0.0.7
greenlet==3.1.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
annotated-types==0.7.0
anyio==4.7.0
anyio==4.8.0
certifi==2024.12.14
click==8.1.7
click==8.1.8
dnspython==2.7.0
email_validator==2.2.0
fastapi==0.115.6
Expand All @@ -12,14 +12,14 @@ httpcore==1.0.7
httptools==0.6.4
httpx==0.28.1
idna==3.10
Jinja2==3.1.4
Jinja2==3.1.5
markdown-it-py==3.0.0
MarkupSafe==3.0.2
mdurl==0.1.2
psycopg==3.2.3
pydantic==2.10.3
pydantic_core==2.27.1
Pygments==2.18.0
pydantic==2.10.4
pydantic_core==2.27.2
Pygments==2.19.1
python-dotenv==1.0.1
python-multipart==0.0.20
PyYAML==6.0.2
Expand Down
38 changes: 0 additions & 38 deletions requirements/requirements-3.9.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
-r requirements-3.11.txt
-r requirements-test-3.11.txt
-r requirements-3.13.txt
-r requirements-test-3.13.txt
asttokens==3.0.0
cfgv==3.4.0
decorator==5.1.1
distlib==0.3.9
executing==2.1.0
filelock==3.16.1
identify==2.6.3
identify==2.6.5
ipdb==0.13.13
ipython==8.30.0
ipython==8.31.0
jedi==0.19.2
matplotlib-inline==0.1.7
nodeenv==1.9.1
Expand All @@ -19,10 +19,9 @@ pre_commit==4.0.1
prompt_toolkit==3.0.48
ptyprocess==0.7.0
pure_eval==0.2.3
Pygments==2.18.0
Pygments==2.19.1
PyYAML==6.0.2
stack-data==0.6.3
traitlets==5.14.3
typing_extensions==4.12.2
virtualenv==20.28.0
virtualenv==20.28.1
wcwidth==0.2.13
30 changes: 0 additions & 30 deletions requirements/requirements-dev-3.9.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
coverage==7.6.9
coverage==7.6.10
iniconfig==2.0.0
packaging==24.2
pluggy==1.5.0
pytest==8.3.4
pytest-cov==6.0.0
ruff==0.8.3
ruff==0.8.6
9 changes: 0 additions & 9 deletions requirements/requirements-test-3.9.txt

This file was deleted.

7 changes: 4 additions & 3 deletions scripts/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def freeze(python_version: str, requirement: Path) -> str:

def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("--python-versions", default="3.9,3.11,3.12")
parser.add_argument("--python-versions", default="3.12,3.13")

return parser.parse_args()


def sort_versions(versions: list[str]) -> list[str]:
def sort_versions(versions: str) -> list[str]:
def list_of_parts(items):
return [int(n) for n in items.split(".")]

Expand All @@ -74,7 +74,8 @@ def main():
for future in as_completed(futures):
print(future.result())

target_python_version = "3.9"
# Put requirements for the main Python version in the repo root for convenience.
target_python_version = "3.12"
shutil.copy(repo_root / "requirements" / f"requirements-{target_python_version}.txt", "requirements.txt")


Expand Down

0 comments on commit 4e91299

Please sign in to comment.