Skip to content

Commit

Permalink
feat: add python312 support
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq committed Mar 21, 2024
1 parent 18383e0 commit 35d3313
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 32 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ jobs:
matrix:
os:
- ubuntu-20.04
python-version:
- 3.8
toxenv: [ py38, quality ]
python-version: ['3.8', '3.12']
toxenv: [ unittest, quality ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -35,7 +34,7 @@ jobs:
run: tox

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='py38'
if: matrix.python-version == '3.8' && matrix.toxenv=='unittest'
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with
pip-compile --rebuild --upgrade -o requirements/test.txt requirements/test.in
pip-compile --rebuild --upgrade -o requirements/ci.txt requirements/ci.in
pip-compile --rebuild --upgrade -o requirements/dev.txt requirements/dev.in
pip-compile --rebuild --upgrade -o requirements/quality.txt requirements/quality.in
4 changes: 2 additions & 2 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ filelock==3.13.1
# via
# tox
# virtualenv
packaging==23.2
packaging==24.0
# via
# pyproject-api
# tox
Expand All @@ -32,7 +32,7 @@ tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.13.0
tox==4.14.1
# via -r requirements/ci.in
virtualenv==20.25.1
# via tox
9 changes: 9 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ elasticsearch<7.14.0

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0

# opentelemetry requires version 6.x at the moment:
# https://github.com/open-telemetry/opentelemetry-python/issues/3570
# Normally this could be added as a constraint in edx-django-utils, where we're
# adding the opentelemetry dependency. However, when we compile pip-tools.txt,
# that uses version 7.x, and then there's no undoing that when compiling base.txt.
# So we need to pin it globally, for now.
# Ticket for unpinning: https://github.com/openedx/edx-lint/issues/407
importlib-metadata<7
19 changes: 10 additions & 9 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ click-log==0.4.0
# via
# -r requirements/test.txt
# edx-lint
code-annotations==1.6.0
code-annotations==1.7.0
# via
# -r requirements/test.txt
# edx-lint
Expand All @@ -44,7 +44,7 @@ colorama==0.4.6
# -r requirements/ci.txt
# -r requirements/test.txt
# tox
coverage==7.4.3
coverage==7.4.4
# via -r requirements/test.txt
ddt==1.7.2
# via -r requirements/test.txt
Expand All @@ -71,8 +71,9 @@ filelock==3.13.1
# -r requirements/test.txt
# tox
# virtualenv
importlib-metadata==7.0.1
importlib-metadata==6.11.0
# via
# -c requirements/common_constraints.txt
# -r requirements/pip-tools.txt
# build
iniconfig==2.0.0
Expand All @@ -99,7 +100,7 @@ mccabe==0.7.0
# pylint
mock==5.1.0
# via -r requirements/test.txt
packaging==23.2
packaging==24.0
# via
# -r requirements/ci.txt
# -r requirements/pip-tools.txt
Expand All @@ -112,7 +113,7 @@ pbr==6.0.0
# via
# -r requirements/test.txt
# stevedore
pip-tools==7.4.0
pip-tools==7.4.1
# via -r requirements/pip-tools.txt
platformdirs==4.2.0
# via
Expand Down Expand Up @@ -163,7 +164,7 @@ pyproject-hooks==1.0.0
# -r requirements/pip-tools.txt
# build
# pip-tools
pytest==8.1.0
pytest==8.1.1
# via -r requirements/test.txt
python-slugify==8.0.4
# via
Expand Down Expand Up @@ -202,7 +203,7 @@ tomlkit==0.12.4
# via
# -r requirements/test.txt
# pylint
tox==4.13.0
tox==4.14.1
# via
# -r requirements/ci.txt
# -r requirements/test.txt
Expand All @@ -217,11 +218,11 @@ virtualenv==20.25.1
# -r requirements/ci.txt
# -r requirements/test.txt
# tox
wheel==0.42.0
wheel==0.43.0
# via
# -r requirements/pip-tools.txt
# pip-tools
zipp==3.17.0
zipp==3.18.1
# via
# -r requirements/pip-tools.txt
# importlib-metadata
Expand Down
14 changes: 8 additions & 6 deletions requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ build==1.1.1
# via pip-tools
click==8.1.7
# via pip-tools
importlib-metadata==7.0.1
# via build
packaging==23.2
importlib-metadata==6.11.0
# via
# -c requirements/common_constraints.txt
# build
packaging==24.0
# via build
pip-tools==7.4.0
pip-tools==7.4.1
# via -r requirements/pip-tools.in
pyproject-hooks==1.0.0
# via
Expand All @@ -23,9 +25,9 @@ tomli==2.0.1
# build
# pip-tools
# pyproject-hooks
wheel==0.42.0
wheel==0.43.0
# via pip-tools
zipp==3.17.0
zipp==3.18.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
Expand Down
4 changes: 2 additions & 2 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
# make upgrade
#
wheel==0.42.0
wheel==0.43.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
# via -r requirements/pip.in
setuptools==69.1.1
setuptools==69.2.0
# via -r requirements/pip.in
4 changes: 4 additions & 0 deletions requirements/quality.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-c constraints.txt

pycodestyle
pylint
28 changes: 28 additions & 0 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
#
astroid==3.1.0
# via pylint
dill==0.3.8
# via pylint
isort==5.13.2
# via pylint
mccabe==0.7.0
# via pylint
platformdirs==4.2.0
# via pylint
pycodestyle==2.11.1
# via -r requirements/quality.in
pylint==3.1.0
# via -r requirements/quality.in
tomli==2.0.1
# via pylint
tomlkit==0.12.4
# via pylint
typing-extensions==4.10.0
# via
# astroid
# pylint
10 changes: 5 additions & 5 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ click==8.1.7
# edx-lint
click-log==0.4.0
# via edx-lint
code-annotations==1.6.0
code-annotations==1.7.0
# via edx-lint
colorama==0.4.6
# via tox
coverage==7.4.3
coverage==7.4.4
# via -r requirements/test.in
ddt==1.7.2
# via -r requirements/test.in
Expand Down Expand Up @@ -55,7 +55,7 @@ mccabe==0.7.0
# via pylint
mock==5.1.0
# via -r requirements/test.in
packaging==23.2
packaging==24.0
# via
# pyproject-api
# pytest
Expand Down Expand Up @@ -95,7 +95,7 @@ pymongo==3.13.0
# edx-opaque-keys
pyproject-api==1.6.1
# via tox
pytest==8.1.0
pytest==8.1.1
# via -r requirements/test.in
python-slugify==8.0.4
# via code-annotations
Expand All @@ -120,7 +120,7 @@ tomli==2.0.1
# tox
tomlkit==0.12.4
# via pylint
tox==4.13.0
tox==4.14.1
# via -r requirements/test.in
typing-extensions==4.10.0
# via
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def get_version(file_path):
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.12',
],
packages=[
'ccx_keys',
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist = py38,quality
envlist = unittest, quality

[testenv]
[testenv:unittest]
deps =
-r{toxinidir}/requirements/test.txt
commands =
Expand All @@ -10,6 +10,8 @@ commands =
coverage xml

[testenv:quality]
deps =
-r{toxinidir}/requirements/quality.txt
commands =
pycodestyle --config=.pep8 ccx_keys
pylint --rcfile=pylintrc ccx_keys

0 comments on commit 35d3313

Please sign in to comment.