Skip to content

Commit 426c5f6

Browse files
committed
feat: add python 3.12 support
1 parent 9434bea commit 426c5f6

File tree

6 files changed

+77
-7
lines changed

6 files changed

+77
-7
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Python CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
77

88
jobs:
@@ -12,7 +12,9 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-20.04]
15-
python-version: ['3.8']
15+
python-version:
16+
- '3.8'
17+
- '3.12'
1618

1719
steps:
1820
- uses: actions/checkout@v3

edx_repo_tools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
__version__ = '0.8.5'
2+
__version__ = '0.8.6'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# The conventional_commits code needs some extra packages installed that are
2+
# large and unusual, so we keep them separate here.
3+
4+
-c ../../requirements/constraints.txt
5+
6+
dataset
7+
pandas
8+
matplotlib
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.12
3+
# by the following command:
4+
#
5+
# make upgrade
6+
#
7+
alembic==1.13.1
8+
# via dataset
9+
banal==1.0.6
10+
# via dataset
11+
contourpy==1.2.0
12+
# via matplotlib
13+
cycler==0.12.1
14+
# via matplotlib
15+
dataset==1.6.2
16+
# via -r edx_repo_tools/conventional_commits/extra-py312.in
17+
fonttools==4.49.0
18+
# via matplotlib
19+
greenlet==3.0.3
20+
# via
21+
# -c edx_repo_tools/conventional_commits/../../requirements/constraints.txt
22+
# sqlalchemy
23+
kiwisolver==1.4.5
24+
# via matplotlib
25+
mako==1.3.2
26+
# via alembic
27+
markupsafe==2.1.5
28+
# via mako
29+
matplotlib==3.8.3
30+
# via -r edx_repo_tools/conventional_commits/extra-py312.in
31+
numpy==1.26.4
32+
# via
33+
# contourpy
34+
# matplotlib
35+
# pandas
36+
packaging==23.2
37+
# via matplotlib
38+
pandas==2.2.1
39+
# via -r edx_repo_tools/conventional_commits/extra-py312.in
40+
pillow==10.2.0
41+
# via matplotlib
42+
pyparsing==3.1.2
43+
# via matplotlib
44+
python-dateutil==2.9.0.post0
45+
# via
46+
# matplotlib
47+
# pandas
48+
pytz==2024.1
49+
# via pandas
50+
six==1.16.0
51+
# via python-dateutil
52+
sqlalchemy==1.4.52
53+
# via
54+
# alembic
55+
# dataset
56+
typing-extensions==4.10.0
57+
# via alembic
58+
tzdata==2024.1
59+
# via pandas

requirements/development.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,3 @@ wheel==0.42.0
290290
# via pip-tools
291291
zipp==3.17.0
292292
# via importlib-metadata
293-
294-
# The following packages are considered to be unsafe in a requirements file:
295-
# pip
296-
# setuptools

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import glob
22
import os.path
33
import re
4+
import sys
45

56
import setuptools
67
from setuptools import setup
@@ -47,12 +48,16 @@ def is_requirement(line):
4748

4849
VERSION = get_version('edx_repo_tools', '__init__.py')
4950

51+
5052
# Find our extra requirements. A subdirectory of edx_repo_tools can have an
5153
# extra.in file. It will be pip-compiled to extra.txt. Here we find them all
5254
# and register them as extras.
5355
EXTRAS_REQUIRE = {}
5456
for fextra in glob.glob("edx_repo_tools/*/extra.txt"):
5557
slug = fextra.split("/")[1]
58+
if sys.version_info >= (3, 12) and glob.glob(f'edx_repo_tools/{slug}/extra-py312.txt'):
59+
fextra = f'edx_repo_tools/{slug}/extra-py312.txt'
60+
5661
EXTRAS_REQUIRE[slug] = load_requirements(fextra)
5762

5863
# To run tests & linting across the entire repo, we need to install the union

0 commit comments

Comments
 (0)