Skip to content

Commit b583170

Browse files
authored
feat: Adding django 4.2 (#29)
* feat: Adding django 4.2 * fix: Added missing django4.2 requirements * ci: Remove site-packages from coverage paths
1 parent 03133a1 commit b583170

17 files changed

+202
-136
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
strategy:
1919
matrix:
2020
python-version:
21-
- 3.7
2221
- 3.8
2322
- 3.9
2423
- '3.10'

.github/workflows/publish-to-live-pypi.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ jobs:
99
build-n-publish:
1010
name: Build and publish Python 🐍 distributions 📦 to pypi
1111
runs-on: ubuntu-latest
12+
environment:
13+
name: pypi
14+
url: https://pypi.org/p/django-sys-indicator
15+
permissions:
16+
id-token: write
1217
steps:
1318
- uses: actions/checkout@v3
1419
- name: Set up Python 3.10
15-
uses: actions/setup-python@v1
20+
uses: actions/setup-python@v4
1621
with:
1722
python-version: '3.10'
1823

@@ -33,7 +38,4 @@ jobs:
3338
3439
- name: Publish distribution 📦 to PyPI
3540
if: startsWith(github.ref, 'refs/tags')
36-
uses: pypa/gh-action-pypi-publish@master
37-
with:
38-
user: __token__
39-
password: ${{ secrets.PYPI_API_TOKEN }}
41+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/publish-to-test-pypi.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ jobs:
99
build-n-publish:
1010
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
1111
runs-on: ubuntu-latest
12+
environment:
13+
name: test
14+
url: https://test.pypi.org/p/django-sys-indicator
15+
permissions:
16+
id-token: write
1217
steps:
1318
- uses: actions/checkout@v3
1419
- name: Set up Python 3.10
15-
uses: actions/setup-python@v1
20+
uses: actions/setup-python@v4
1621
with:
1722
python-version: '3.10'
1823

@@ -32,9 +37,7 @@ jobs:
3237
.
3338
3439
- name: Publish distribution 📦 to Test PyPI
35-
uses: pypa/gh-action-pypi-publish@master
40+
uses: pypa/gh-action-pypi-publish@release/v1
3641
with:
37-
user: __token__
38-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
39-
repository_url: https://test.pypi.org/legacy/
40-
skip_existing: true
42+
repository-url: https://test.pypi.org/legacy/
43+
skip-existing: true

.pre-commit-config.yaml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,8 @@ repos:
2020
- id: django-upgrade
2121
args: [--target-version, "3.2"]
2222

23-
- repo: https://github.com/PyCQA/flake8
24-
rev: 6.0.0
23+
- repo: https://github.com/charliermarsh/ruff-pre-commit
24+
rev: "v0.0.270"
2525
hooks:
26-
- id: flake8
27-
additional_dependencies:
28-
# - flake8-broken-line
29-
- flake8-bugbear
30-
- flake8-builtins
31-
- flake8-coding
32-
- flake8-commas
33-
- flake8-comprehensions
34-
- flake8-eradicate
35-
- flake8-quotes
36-
- flake8-tidy-imports
37-
- pep8-naming
38-
39-
- repo: https://github.com/pycqa/isort
40-
rev: 5.12.0
41-
hooks:
42-
- id: isort
26+
- id: ruff
27+
args: [--fix, --exit-non-zero-on-fix]

HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
History
33
=======
44

5+
2.1.0 (2023-06-30)
6+
------------------
7+
8+
* Added support for django 4.2
9+
510
2.0.0 (2022-11-24)
611
------------------
712

pyproject.toml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22
requires = ["setuptools >= 40.6.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

5-
[tool.isort]
6-
combine_as_imports = true
7-
include_trailing_comma = true
8-
known_django = "django"
9-
known_first_party = "django_sys_indicator"
10-
line_length = 119
11-
multi_line_output = 5
12-
sections = ["FUTURE","STDLIB","DJANGO","THIRDPARTY","FIRSTPARTY","LOCALFOLDER"]
13-
145
[tool.pytest.ini_options]
156
addopts = """\
167
--strict-config
178
--strict-markers
189
--ds=tests.settings
1910
"""
2011
django_find_project = false
12+
13+
[tool.ruff.per-file-ignores]
14+
"__init__.py" = [
15+
"F401" # unused-import
16+
]
17+
18+
[tool.ruff.isort]
19+
combine-as-imports = true

requirements.txt

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,54 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.9
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
44
#
55
# pip-compile
66
#
7-
--trusted-host pypi.python.org
8-
--trusted-host pypi.org
9-
--trusted-host files.pythonhosted.org
10-
11-
attrs==21.4.0
12-
# via pytest
7+
build==0.10.0
8+
# via pip-tools
139
cfgv==3.3.1
1410
# via pre-commit
15-
click==8.0.3
11+
click==8.1.3
1612
# via pip-tools
17-
coverage[toml]==6.3.1
13+
coverage[toml]==7.2.7
1814
# via pytest-cov
19-
distlib==0.3.4
15+
distlib==0.3.6
2016
# via virtualenv
21-
filelock==3.4.2
17+
filelock==3.12.2
2218
# via virtualenv
23-
identify==2.4.9
19+
identify==2.5.24
2420
# via pre-commit
25-
iniconfig==1.1.1
21+
iniconfig==2.0.0
2622
# via pytest
27-
nodeenv==1.6.0
23+
nodeenv==1.8.0
2824
# via pre-commit
29-
packaging==21.3
30-
# via pytest
31-
pep517==0.12.0
32-
# via pip-tools
33-
pip-tools==6.5.1
25+
packaging==23.1
26+
# via
27+
# build
28+
# pytest
29+
pip-tools==6.13.0
3430
# via -r requirements.in
35-
platformdirs==2.5.0
31+
platformdirs==3.8.0
3632
# via virtualenv
37-
pluggy==1.0.0
33+
pluggy==1.2.0
3834
# via pytest
39-
pre-commit==2.17.0
35+
pre-commit==3.3.3
4036
# via -r requirements.in
41-
py==1.11.0
42-
# via pytest
43-
pyparsing==3.0.7
44-
# via packaging
45-
pytest==7.0.1
37+
pyproject-hooks==1.0.0
38+
# via build
39+
pytest==7.4.0
4640
# via
4741
# pytest-cov
4842
# pytest-django
49-
pytest-cov==3.0.0
43+
pytest-cov==4.1.0
5044
# via -r requirements.in
5145
pytest-django==4.5.2
5246
# via -r requirements.in
5347
pyyaml==6.0
5448
# via pre-commit
55-
six==1.16.0
56-
# via virtualenv
57-
toml==0.10.2
58-
# via pre-commit
59-
tomli==2.0.1
60-
# via
61-
# coverage
62-
# pep517
63-
# pytest
64-
virtualenv==20.13.1
49+
virtualenv==20.23.1
6550
# via pre-commit
66-
wheel==0.37.1
51+
wheel==0.40.0
6752
# via pip-tools
6853

6954
# The following packages are considered to be unsafe in a requirements file:

requirements/compile.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,15 @@
7777
check=True,
7878
capture_output=True,
7979
)
80+
subprocess.run(
81+
[
82+
"python3.11",
83+
*common_args,
84+
"-P",
85+
"Django>=4.2,<4.3",
86+
"-o",
87+
"py311-django42.txt",
88+
],
89+
check=True,
90+
capture_output=True,
91+
)

requirements/py310-django32.txt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.10
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
44
#
55
# requirements/compile.py
66
#
7-
--trusted-host pypi.python.org
8-
--trusted-host pypi.org
9-
--trusted-host files.pythonhosted.org
10-
117
asgiref==3.5.2 \
128
--hash=sha256:1d2880b792ae8757289136f1db2b7b99100ce959b2aa57fd69dab783d05afac4 \
139
--hash=sha256:4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424
@@ -68,9 +64,9 @@ coverage==6.5.0 \
6864
--hash=sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84 \
6965
--hash=sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987
7066
# via -r requirements.in
71-
django==3.2.16 \
72-
--hash=sha256:18ba8efa36b69cfcd4b670d0fa187c6fe7506596f0ababe580e16909bcdec121 \
73-
--hash=sha256:3adc285124244724a394fa9b9839cc8cd116faf7d159554c43ecdaa8cdf0b94d
67+
django==3.2.19 \
68+
--hash=sha256:031365bae96814da19c10706218c44dff3b654cc4de20a98bd2d29b9bde469f0 \
69+
--hash=sha256:21cc991466245d659ab79cb01204f9515690f8dae00e5eabde307f14d24d4d7d
7470
# via -r requirements.in
7571
exceptiongroup==1.0.4 \
7672
--hash=sha256:542adf9dea4055530d6e1279602fa5cb11dab2395fa650b8674eaec35fc4a828 \

requirements/py310-django40.txt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.10
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
44
#
55
# requirements/compile.py
66
#
7-
--trusted-host pypi.python.org
8-
--trusted-host pypi.org
9-
--trusted-host files.pythonhosted.org
10-
117
asgiref==3.5.2 \
128
--hash=sha256:1d2880b792ae8757289136f1db2b7b99100ce959b2aa57fd69dab783d05afac4 \
139
--hash=sha256:4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424
@@ -68,9 +64,9 @@ coverage==6.5.0 \
6864
--hash=sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84 \
6965
--hash=sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987
7066
# via -r requirements.in
71-
django==4.0.8 \
72-
--hash=sha256:07e6433f263c3839939cfabeb6d7557841e0419e47759a7b7d37f6d44d40adcb \
73-
--hash=sha256:27cb08fa6458c1eff8b97c4c2d03774646fb26feeaa4587dca10c49e6d4fc6a3
67+
django==4.0.10 \
68+
--hash=sha256:2c2f73c16b11cb272c6d5e3b063f0d1be06f378d8dc6005fbe8542565db659cc \
69+
--hash=sha256:4496eb4f65071578b703fdc6e6f29302553c7440e3f77baf4cefa4a4e091fc3d
7470
# via -r requirements.in
7571
exceptiongroup==1.0.4 \
7672
--hash=sha256:542adf9dea4055530d6e1279602fa5cb11dab2395fa650b8674eaec35fc4a828 \

0 commit comments

Comments
 (0)