Skip to content

Commit

Permalink
Merge pull request #1 from BITSOLVER/master
Browse files Browse the repository at this point in the history
Update to work with Django 4.0 and 4.1
  • Loading branch information
hugobessa authored Aug 14, 2023
2 parents ee2b318 + 071e304 commit ef59e70
Show file tree
Hide file tree
Showing 13 changed files with 68 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9, 3.10]
os: [macOS-latest, ubuntu-latest, windows-latest]

steps:
Expand Down
3 changes: 3 additions & 0 deletions .python-version
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
3.5.4
3.6.3
3.7.0
3.8.13
3.9.12
3.10.6
pypy2.7-5.9.0
pypy3-2.4.0
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ python:
- "3.4"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "pypy"
- "pypy3"
matrix:
Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ Contributors
* [kavdev](https://github.com/kavdev)
* [graingert](https://github.com/graingert)
* [LuukOost](https://github.com/LuukOost)
* [BITSOLVER](https://github/BITSOLVER)
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.10.1b1 (unreleased)
---------------------

- Update for Django 4.0 and 4.1, Python 3.8, 3.9, 3.10

0.10.1a1 (unreleased)
---------------------

Expand Down
30 changes: 17 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,23 @@ Result:
Requirements
------------

+----------------+------------------------------------------+
| Python version | Django versions |
+================+==========================================+
| 3.7 | 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8 |
+----------------+------------------------------------------+
| 3.6 | 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8 |
+----------------+------------------------------------------+
| 3.5 | 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8 |
+----------------+------------------------------------------+
| 3.4 | 2.0, 1.11, 1.10, 1.9, 1.8, 1.7, 1.6, 1.5 |
+----------------+------------------------------------------+
| 2.7 | 1.11, 1.10, 1.9, 1.8, 1.7, 1.6, 1.5 |
+----------------+------------------------------------------+
+----------------+-------------------------------------------------------------------+
| Python version | Django versions |
+================+===================================================================+
| 3.10 | 4.1, 4.0, 3.2, 3.1, 3.0, 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8 |
| 3.9 | 4.1, 4.0, 3.2, 3.1, 3.0, 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8 |
| 3.8 | 4.1, 4.0, 3.2, 3.1, 3.0, 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8 |
+----------------+-------------------------------------------------------------------+
| 3.7 | 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8 |
+----------------+-------------------------------------------------------------------+
| 3.6 | 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8 |
+----------------+-------------------------------------------------------------------+
| 3.5 | 2.2, 2.1, 2.0, 1.11, 1.10, 1.9, 1.8 |
+----------------+-------------------------------------------------------------------+
| 3.4 | 2.0, 1.11, 1.10, 1.9, 1.8, 1.7, 1.6, 1.5 |
+----------------+-------------------------------------------------------------------+
| 2.7 | 1.11, 1.10, 1.9, 1.8, 1.7, 1.6, 1.5 |
+----------------+-------------------------------------------------------------------+


Installation
Expand Down
5 changes: 4 additions & 1 deletion django_js_reverse/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import json
import re
import sys
from distutils.version import LooseVersion
if sys.version_info < (3, 7):
from distutils.version import LooseVersion
else:
from packaging.version import parse as LooseVersion

import django
from django.conf import settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
except ImportError:
from django.core.urlresolvers import get_resolver

REQUIRES_SYSTEM_CHECKS = [False]


class Command(BaseCommand):
help = 'Creates a static urls-js file for django-js-reverse'
requires_system_checks = False
requires_system_checks = REQUIRES_SYSTEM_CHECKS
def get_location(self):
output_path = getattr(settings, 'JS_REVERSE_OUTPUT_PATH', JS_OUTPUT_PATH)
if output_path:
Expand Down
5 changes: 4 additions & 1 deletion django_js_reverse/tests/test_urlconf_urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from django.conf.urls import url
try:
from django.conf.urls import url
except ImportError:
from django.urls import re_path as url
from django.views.generic import View

urlpatterns = [
Expand Down
5 changes: 4 additions & 1 deletion django_js_reverse/tests/test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
from copy import copy

from django.conf.urls import include as django_include
from django.conf.urls import url
try:
from django.conf.urls import url
except ImportError:
from django.urls import re_path as url
from django.views.generic import View
from django_js_reverse.tests.helper import is_django_ver_gte_2
from django_js_reverse.views import urls_js
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "0.10.1-a-dev.1.0"
"version": "0.10.1-b-dev.1.0"
}
18 changes: 13 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
# -*- coding: utf-8 -*-
import codecs
import os

import sys
from setuptools import setup, find_packages

if sys.version_info < (3, 7):
INSTALL_REQUIRES = [
'Django>=1.5',
]
else:
INSTALL_REQUIRES = [
'Django>=1.5',
'packaging>=21.3'
]


def read(*parts):
filename = os.path.join(os.path.dirname(__file__), *parts)
Expand All @@ -14,7 +24,7 @@ def read(*parts):

setup(
name='django-js-reverse',
version='0.10.1a1.dev0',
version='0.10.1b1.dev0',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3',
Expand All @@ -36,7 +46,5 @@ def read(*parts):
'templates/django_js_reverse/*',
]
},
install_requires=[
'Django>=1.5',
]
install_requires=INSTALL_REQUIRES
)
9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
envlist =
py{27}-django{111,110,19,18,17,16,15},
py34-django{20,111,110,19,18,17,16,15},
py{35,36,37}-django{22,21,20,111,110,19,18},
py{35,36,37}-django{32,31,30,22,21,20,111,110,19,18},
py{38,39,310}-django{22,30,31,32,40,41}
lint,
prepare_npm

Expand All @@ -13,6 +14,7 @@ commands = coverage run -p django_js_reverse/tests/unit_tests.py
deps=
coverage==4.5.1
js2py==0.70
packaging==21.3
django15: Django>=1.5,<1.6
django16: Django>=1.6,<1.7
django17: Django>=1.7,<1.8
Expand All @@ -23,6 +25,11 @@ deps=
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
django22: Django>=2.2,<2.23
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<3.3
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2


[testenv:coveralls]
Expand Down

0 comments on commit ef59e70

Please sign in to comment.