Skip to content

Commit 36912e5

Browse files
committed
Update purldb to support Python 3.13
- Add Python 3.10, 3.11, 3.12, 3.13 version classifiers in setup.cfg - Add python_requires >= 3.10 in setup.cfg - Update pypi-release workflow to use Python 3.13 - Update pypi-release-minecode-pipeline workflow to use Python 3.13 - Add CI test workflow to run tests across Python 3.10-3.13 All 633 existing tests pass on Python 3.13 with no new failures. Signed-off-by: Kareem Samy <karim.elsayed401@eng-st.cu.edu.eg>
1 parent 3423a33 commit 36912e5

File tree

4 files changed

+90
-2
lines changed

4 files changed

+90
-2
lines changed

.github/workflows/pypi-release-minecode-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v5
2121
with:
22-
python-version: 3.11
22+
python-version: 3.13
2323

2424
- name: Install flot
2525
run: python -m pip install flot --user

.github/workflows/pypi-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Set up Python
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: 3.12
31+
python-version: 3.13
3232

3333
- name: Install pypa/build and twine
3434
run: python -m pip install --user --upgrade build twine pkginfo
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: CI Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
name: Python ${{ matrix.python-version }} - Tests
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
python-version: ["3.10", "3.11", "3.12", "3.13"]
22+
23+
services:
24+
postgres:
25+
image: postgres:16
26+
env:
27+
POSTGRES_DB: packagedb
28+
POSTGRES_USER: packagedb
29+
POSTGRES_PASSWORD: packagedb
30+
ports:
31+
- 5432:5432
32+
options: >-
33+
--health-cmd pg_isready
34+
--health-interval 10s
35+
--health-timeout 5s
36+
--health-retries 5
37+
38+
env:
39+
DJANGO_SETTINGS_MODULE: purldb_project.settings
40+
DATABASE_URL: postgres://packagedb:packagedb@localhost:5432/packagedb
41+
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
46+
- name: Set up Python ${{ matrix.python-version }}
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: ${{ matrix.python-version }}
50+
51+
- name: Install system dependencies
52+
run: |
53+
sudo apt-get update
54+
sudo apt-get install -y \
55+
bzip2 \
56+
xz-utils \
57+
zlib1g \
58+
libxml2-dev \
59+
libxslt1-dev \
60+
libgomp1 \
61+
libsqlite3-0 \
62+
libgcrypt20 \
63+
libpopt0 \
64+
libzstd1 \
65+
git \
66+
universal-ctags \
67+
gettext \
68+
tar \
69+
unzip \
70+
zip \
71+
libsasl2-dev \
72+
libldap-dev \
73+
openssl
74+
75+
- name: Install Python dependencies
76+
run: |
77+
python -m pip install --upgrade pip setuptools wheel
78+
pip install -e .[dev]
79+
80+
- name: Run purldb tests
81+
run: |
82+
pytest -vvs minecode packagedb purl2vcs purldb_project purldb_public_project \
83+
--ignore packagedb/tests/test_throttling.py

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ classifiers =
1919
Intended Audience :: Developers
2020
Programming Language :: Python :: 3
2121
Programming Language :: Python :: 3 :: Only
22+
Programming Language :: Python :: 3.10
23+
Programming Language :: Python :: 3.11
24+
Programming Language :: Python :: 3.12
25+
Programming Language :: Python :: 3.13
2226
Topic :: Utilities
2327

2428
keywords =
@@ -34,6 +38,7 @@ keywords =
3438
packages = find:
3539
include_package_data = true
3640
zip_safe = false
41+
python_requires = >=3.10
3742
install_requires =
3843
aboutcode.pipeline >= 0.2.1
3944
arrow >= 1.3.0

0 commit comments

Comments
 (0)