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 20, 2024
1 parent 070304c commit 42541d7
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 49 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, django32, django42]
python-version: ['3.8', '3.12']
toxenv: [quality, django42]
exclude:
- python-version: '3.8'
toxenv: quality
Expand Down
2 changes: 1 addition & 1 deletion django_sites_extensions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
""" django_sites_extensions main module """
__version__ = '4.0.2'
__version__ = '4.1.0'
1 change: 0 additions & 1 deletion django_sites_extensions/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class DjangoSitesExtensionsConfig(AppConfig):
# noinspection PyUnresolvedReferences
def ready(self):
""" Set up for django_sites_extensions app """
# pylint: disable=unused-variable
# pylint: disable=unused-import
# pylint: disable=import-outside-toplevel
from django_sites_extensions import models
Expand Down
2 changes: 1 addition & 1 deletion django_sites_extensions/tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RedirectMiddlewareTestCase(TestCase):
def setUp(self):
super().setUp()
self.middleware = RedirectMiddleware(get_response=lambda request: None)
self.site = Site.objects.get(id=1) # pylint: disable=no-member
self.site = Site.objects.get(id=1)
self.redirect = Redirect.objects.create(site_id=1, old_path='/foo', new_path='http://example.com/bar')

def _make_request(self, path):
Expand Down
2 changes: 1 addition & 1 deletion django_sites_extensions/tests/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
""" ROOT_URLCONF for tests """

from django_sites_extensions.tests import views
from django.urls import path

from django_sites_extensions.tests import views

urlpatterns = [
path('home', views.test, name='home'),
Expand Down
4 changes: 2 additions & 2 deletions django_sites_extensions/tests/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
from django.http import HttpResponse


def test(request): # pylint: disable=unused-argument
def test(request):
""" Placeholder test view """
return HttpResponse("ok")


def login(request): # pylint: disable=unused-argument
def login(request):
""" Placeholder test view """
return HttpResponse("login require")
47 changes: 18 additions & 29 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,62 +1,51 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
certifi==2021.10.8
# via requests
charset-normalizer==2.0.12
# via requests
coverage==6.3.1
# via codecov
distlib==0.3.4
cachetools==5.3.2
# via
# -r requirements/tox.txt
# virtualenv
filelock==3.5.0
# tox
chardet==5.2.0
# via
# -r requirements/tox.txt
# tox
# virtualenv
idna==3.3
# via requests
packaging==21.3
colorama==0.4.6
# via
# -r requirements/tox.txt
# tox
platformdirs==2.5.0
distlib==0.3.8
# via
# -r requirements/tox.txt
# virtualenv
pluggy==1.0.0
filelock==3.13.1
# via
# -r requirements/tox.txt
# tox
py==1.11.0
# virtualenv
packaging==23.2
# via
# -r requirements/tox.txt
# pyproject-api
# tox
pyparsing==3.0.7
platformdirs==4.2.0
# via
# -r requirements/tox.txt
# packaging
requests==2.27.1
# via codecov
six==1.16.0
# tox
# virtualenv
pluggy==1.4.0
# via
# -r requirements/tox.txt
# tox
# virtualenv
toml==0.10.2
pyproject-api==1.6.1
# via
# -r requirements/tox.txt
# tox
tox==3.24.5
tox==4.13.0
# via -r requirements/tox.txt
urllib3==1.26.8
# via requests
virtualenv==20.13.1
virtualenv==20.25.0
# via
# -r requirements/tox.txt
# tox
14 changes: 6 additions & 8 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
wheel==0.37.1
wheel==0.42.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==22.0.3
pip==24.0
# via -r requirements/pip.in
setuptools==69.1.0
# via -r requirements/pip.in
setuptools==59.8.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/pip.in
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ def get_version(*file_paths):
'License :: OSI Approved :: GNU Affero General Public License v3',
'Programming Language :: Python',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.12',
'Topic :: Internet',
'Intended Audience :: Developers',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.2',
],
keywords='Django sites edx',
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[tox]
envlist = python{3.8}-django{32, 42},quality,docs
envlist = python{38,312}-django{42},quality,docs

[testenv]
setenv =
PYTHONPATH = {toxinidir}
DJANGO_SETTINGS_MODULE = test_settings
deps =
django32: -r requirements/django.txt
deps =
setuptools
wheel
django42: -r requirements/django42.txt
-r requirements/test.txt
commands =
Expand Down

0 comments on commit 42541d7

Please sign in to comment.