Skip to content

Commit

Permalink
feat: add support for python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
irtazaakram committed Feb 21, 2024
1 parent ee87b93 commit 7ccfe5d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ jobs:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, docs, pii_check, django32, django40, django42]
python-version: ['3.8', '3.12']
toxenv: [quality, docs, pii_check, django42]

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Unreleased

* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is
deprecated
* Add support for Python 3.12

[2.4.0] - 2023-06-21
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion edx_when/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Central source of course block dates for the LMS.
"""

__version__ = '2.4.0'
__version__ = '2.5.0'
2 changes: 1 addition & 1 deletion edx_when/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def clean(self):

schedule = get_schedule_for_user(self.user.id, self.content_date.course_id) # pylint: disable=no-member
policy_date = self.content_date.policy.actual_date(schedule=schedule)
if self.rel_date is not None and self.rel_date.total_seconds() < 0:
if self.rel_date is not None and self.rel_date.total_seconds() < 0: # pylint: disable=no-member
raise ValidationError(_("Override date must be later than policy date"))
if self.abs_date is not None and isinstance(policy_date, datetime) and self.abs_date < policy_date:
raise ValidationError(_("Override date must be later than policy date"))
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,13 @@ def is_requirement(line):
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.12',
],
entry_points={
'lms.djangoapp': [
Expand Down
13 changes: 7 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,40,42}, pii_check, quality, docs
envlist = py{38,312}-django{42}, pii_check, quality, docs

[doc8]
max-line-length = 120
Expand All @@ -18,10 +18,9 @@ addopts = --cov edx_when --cov-report term-missing --cov-report xml
norecursedirs = .* docs requirements

[testenv]
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django42: Django>=4.2,<4.3
deps =
wheel
django42: Django>=4.2,<5.0
-r{toxinidir}/requirements/test.txt
commands =
python -Wd -m pytest {posargs}
Expand All @@ -35,6 +34,7 @@ allowlist_externals =
rm
twine
deps =
wheel
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build README.rst docs
Expand All @@ -54,6 +54,7 @@ allowlist_externals =
rm
touch
deps =
wheel
-r{toxinidir}/requirements/quality.txt
commands =
touch tests/__init__.py
Expand All @@ -69,7 +70,7 @@ setenv =
DJANGO_SETTINGS_MODULE = test_settings
deps =
-r{toxinidir}/requirements/test.txt
django32: Django>=3.2,<4.0
django42: Django>=4.2,<5.0
commands =
code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage

0 comments on commit 7ccfe5d

Please sign in to comment.