Skip to content

Commit

Permalink
Python 3.10 / Django 4.0 Support
Browse files Browse the repository at this point in the history
Allow deprecated Django 3.2
  • Loading branch information
rh0dium committed Dec 7, 2021
1 parent 720adda commit d593b1b
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 23 deletions.
12 changes: 12 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[flake8]
ignore = E203, E266, E501, W503, F403, F401
max-line-length = 120
max-complexity = 18
select = B,C,E,F,W,T4,B9
exclude =
.venv/*
demo_app/*
*/migrations/*
*/tests/*
manage.py
setup.py
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: "3.10"

- name: Install dependencies
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
pip install -r requirements_dev.txt --user
- name: outdated
run: pip list --outdated --not-required --user | grep . && echo "There are outdated packages" && exit 1 || echo "All packages up to date"
run: pip list --outdated --not-required --exclude=django --user | grep . && echo "There are outdated packages" && exit 1 || echo "All packages up to date"

black:
name: Black
Expand All @@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: "3.10"

- name: Install dependencies
run: |
Expand All @@ -59,7 +59,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: "3.10"

- name: Install dependencies
run: |
Expand All @@ -79,7 +79,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: "3.10"

- name: Install dependencies
run: |
Expand Down Expand Up @@ -108,8 +108,8 @@ jobs:
max-parallel: 4
matrix:
db: [ sqlite, mysql ]
django-version: [ "~=3.2" ]
python-version: [ 3.8, 3.9, "3.10"]
django-version: [ "~=3.2", "~=4.0" ]
python-version: [ "3.10" ]
experimental: [ false ]

services:
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: "3.10"

- name: Install dependencies
run: |
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: "3.10"

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .idea/django-datatable-view.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/watcherTasks.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
default_language_version:
python: python3.10
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.0.1
hooks:
- id: check-added-large-files
args: [ '--maxkb=500' ]
Expand All @@ -19,10 +21,11 @@ repos:
exclude: .idea/.*
- id: check-json
- repo: https://github.com/ambv/black
rev: stable
rev: 21.12b0
hooks:
- id: black
language_version: python3.10
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
rev: 4.0.1
hooks:
- id: flake8
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 100
target-version = ['py38']
target-version = ['py310']
include = '\.pyi?$'
exclude = '''
/(
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
python-decouple
python-dateutil~=2.8.1
python-dateutil
six

Django~=3.2
pytz~=2020.5
Django
pytz
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,20 @@
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.0",
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development",
],
python_requires=">=3.8.*",
python_requires=">=3.9.*",
install_requires=["django>=3.2", "python-dateutil"],
packages=find_packages(),
package_data={"datatableview": ["static/js/*.js", "templates/datatableview/*.html"]},
include_package_data=True,
install_requires=["django>=3.0", "python-dateutil"],
)

0 comments on commit d593b1b

Please sign in to comment.