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

feat: add python312 support #69

Merged
merged 1 commit into from
Mar 20, 2024
Merged
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
39 changes: 21 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Python CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches:
- '**'
- '**'


jobs:
Expand All @@ -15,23 +15,26 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: ["py38", "quality"]

python-version:
- '3.8'
- '3.12'
toxenv:
- "quality"
- "unittests"
steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install pip
run: pip install -r requirements/pip.txt
- name: Install pip
run: pip install -r requirements/pip.txt

- name: Install Dependencies
run: pip install -r requirements/ci.txt
- name: Install Dependencies
run: pip install -r requirements/ci.txt

- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ Change Log
Unreleased
**********

[0.4.2]
*******
* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is
deprecated
* Add python 3.12 support

[0.4.1]
*******
Expand Down
2 changes: 1 addition & 1 deletion edx_enterprise_subsidy_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Client for interacting with the enterprise-subsidy service..
"""

__version__ = '0.4.1'
__version__ = '0.4.2'

from .client import EnterpriseSubsidyAPIClient, EnterpriseSubsidyAPIClientV2, get_enterprise_subsidy_api_client
8 changes: 5 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
#
asgiref==3.7.2
# via django
backports-zoneinfo==0.2.1
# via django
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# django
certifi==2024.2.2
# via requests
cffi==1.16.0
Expand All @@ -32,7 +34,7 @@ edx-rest-api-client==5.6.1
# via -r requirements/base.in
idna==3.6
# via requests
newrelic==9.7.0
newrelic==9.7.1
# via edx-django-utils
pbr==6.0.0
# via stevedore
Expand Down
1 change: 1 addition & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@

# Common constraints for edx repos
-c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
backports.zoneinfo;python_version<"3.9"
14 changes: 8 additions & 6 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ astroid==3.1.0
# -r requirements/quality.txt
# pylint
# pylint-celery
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/quality.txt
# django
build==1.1.1
Expand Down Expand Up @@ -122,14 +123,15 @@ idna==3.6
# via
# -r requirements/quality.txt
# requests
importlib-metadata==7.0.2
importlib-metadata==6.11.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/pip-tools.txt
# -r requirements/quality.txt
# build
# keyring
# twine
importlib-resources==6.1.3
importlib-resources==6.3.0
# via
# -r requirements/quality.txt
# keyring
Expand Down Expand Up @@ -179,7 +181,7 @@ more-itertools==10.2.0
# via
# -r requirements/quality.txt
# jaraco-classes
newrelic==9.7.0
newrelic==9.7.1
# via
# -r requirements/quality.txt
# edx-django-utils
Expand Down Expand Up @@ -378,11 +380,11 @@ virtualenv==20.25.1
# via
# -r requirements/ci.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.0
# via
# -r requirements/pip-tools.txt
# -r requirements/quality.txt
Expand Down
12 changes: 7 additions & 5 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ babel==2.14.0
# via
# pydata-sphinx-theme
# sphinx
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# django
beautifulsoup4==4.12.3
Expand Down Expand Up @@ -87,13 +88,14 @@ idna==3.6
# requests
imagesize==1.4.1
# via sphinx
importlib-metadata==7.0.2
importlib-metadata==6.11.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# build
# keyring
# sphinx
# twine
importlib-resources==6.1.3
importlib-resources==6.3.0
# via keyring
iniconfig==2.0.0
# via
Expand All @@ -117,7 +119,7 @@ mdurl==0.1.2
# via markdown-it-py
more-itertools==10.2.0
# via jaraco-classes
newrelic==9.7.0
newrelic==9.7.1
# via
# -r requirements/test.txt
# edx-django-utils
Expand Down Expand Up @@ -253,7 +255,7 @@ urllib3==2.2.1
# -r requirements/test.txt
# requests
# twine
zipp==3.17.0
zipp==3.18.0
# via
# importlib-metadata
# importlib-resources
10 changes: 6 additions & 4 deletions requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ build==1.1.1
# via pip-tools
click==8.1.7
# via pip-tools
importlib-metadata==7.0.2
# via build
importlib-metadata==6.11.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# build
packaging==24.0
# via build
pip-tools==7.4.1
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.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
Expand Down
2 changes: 1 addition & 1 deletion requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# 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:
Expand Down
12 changes: 7 additions & 5 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ astroid==3.1.0
# via
# pylint
# pylint-celery
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# django
certifi==2024.2.2
Expand Down Expand Up @@ -81,11 +82,12 @@ idna==3.6
# via
# -r requirements/test.txt
# requests
importlib-metadata==7.0.2
importlib-metadata==6.11.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# keyring
# twine
importlib-resources==6.1.3
importlib-resources==6.3.0
# via keyring
iniconfig==2.0.0
# via
Expand Down Expand Up @@ -115,7 +117,7 @@ mdurl==0.1.2
# via markdown-it-py
more-itertools==10.2.0
# via jaraco-classes
newrelic==9.7.0
newrelic==9.7.1
# via
# -r requirements/test.txt
# edx-django-utils
Expand Down Expand Up @@ -243,7 +245,7 @@ urllib3==2.2.1
# -r requirements/test.txt
# requests
# twine
zipp==3.17.0
zipp==3.18.0
# via
# importlib-metadata
# importlib-resources
5 changes: 3 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ asgiref==3.7.2
# via
# -r requirements/base.txt
# django
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# django
certifi==2024.2.2
Expand Down Expand Up @@ -59,7 +60,7 @@ idna==3.6
# requests
iniconfig==2.0.0
# via pytest
newrelic==9.7.0
newrelic==9.7.1
# via
# -r requirements/base.txt
# edx-django-utils
Expand Down
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist = py{38}
envlist = py{38, 312}

[doc8]
; D001 = Line too long
ignore=D001
ignore = D001

[pycodestyle]
exclude = .git,.tox
Expand Down Expand Up @@ -31,19 +31,19 @@ max-doc-length = 120
; D414 = Section has no content (numpy style)
ignore = D101,D200,D203,D204,D212,D215,D401,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414


[pytest]
DJANGO_SETTINGS_MODULE = test_settings
setenv =
DJANGO_SETTINGS_MODULE = test_settings
addopts = --cov edx_enterprise_subsidy_client --cov-report term-missing --cov-report xml
norecursedirs = .* docs requirements site-packages

[testenv]
[testenv:unittests]
setenv =
DJANGO_SETTINGS_MODULE = test_settings
deps =
-r{toxinidir}/requirements/test.txt
setuptools
commands =
pytest {posargs}

Expand Down Expand Up @@ -72,6 +72,7 @@ allowlist_externals =
touch
deps =
-r{toxinidir}/requirements/quality.txt
setuptools
wheel
commands =
make quality

Loading