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

Support django 4 #4

Merged
merged 6 commits into from
Aug 14, 2023
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
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>=3.2',
]
install_requires=INSTALL_REQUIRES
)
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ commands = coverage run -p django_js_reverse/tests/unit_tests.py
deps=
coverage>=5.3
js2py==0.74
packaging==21.3
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
Expand Down
Loading