Skip to content

Commit 6fba262

Browse files
authored
Merge pull request #21 from maykinmedia/pyproject
Switch to `pyproject.toml`, add support for Python 3.12
2 parents 121eda2 + ba89d4a commit 6fba262

26 files changed

+549
-341
lines changed

.coveragerc

-11
This file was deleted.

.flake8

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
max-line-length=88
3+
exclude=env,.tox,doc
4+
ignore=E203,W503,E501

.github/workflows/ci.yml

+14-15
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python: ['3.8', '3.9', '3.10', '3.11']
19-
django: ['3.2', '4.1', '4.2']
18+
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19+
django: ["3.2", "4.2"]
2020
exclude:
21-
- python: '3.11'
22-
django: '3.2'
21+
- python: "3.11"
22+
django: "3.2"
23+
- python: "3.12"
24+
django: "3.2"
2325

2426
steps:
25-
- uses: actions/checkout@v3
26-
- uses: actions/setup-python@v4
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-python@v5
2729
with:
2830
python-version: ${{ matrix.python }}
2931

@@ -48,18 +50,15 @@ jobs:
4850
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
4951

5052
steps:
51-
- uses: actions/checkout@v3
52-
- uses: actions/setup-python@v4
53+
- uses: actions/checkout@v4
54+
- uses: actions/setup-python@v5
5355
with:
54-
python-version: '3.10'
56+
python-version: "3.10"
5557

56-
- name: Build sdist and wheel
58+
- name: Build wheel
5759
run: |
58-
pip install pip setuptools wheel --upgrade
59-
python setup.py sdist bdist_wheel
60+
pip install build --upgrade
61+
python -m build
6062
6163
- name: Publish a Python distribution to PyPI
6264
uses: pypa/gh-action-pypi-publish@release/v1
63-
with:
64-
user: __token__
65-
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/code-quality.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ jobs:
2222
matrix:
2323
toxenv:
2424
- isort
25+
- black
26+
- flake8
2527
steps:
26-
- uses: actions/checkout@v3
27-
- uses: actions/setup-python@v4
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-python@v5
2830
with:
29-
python-version: '3.10'
31+
python-version: "3.10"
3032
- name: Install dependencies
3133
run: pip install tox
3234
- run: tox
3335
env:
34-
TOXENV: ${{ matrix.toxenv }}
36+
TOXENV: ${{ matrix.toxenv }}

.gitignore

+104-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,106 @@
1-
*.log
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
reports/
50+
51+
# Translations
52+
# *.mo -> we want to package these along
253
*.pot
3-
*.pyc
54+
55+
# Django stuff:
56+
*.log
457
local_settings.py
5-
.tox
6-
.coverage
58+
db.sqlite3
59+
testapp/log_outgoing_requests.db
60+
61+
# Flask stuff:
62+
instance/
63+
.webassets-cache
64+
65+
# Scrapy stuff:
66+
.scrapy
67+
68+
# Sphinx documentation
69+
docs/_build/
70+
71+
# PyBuilder
72+
target/
73+
74+
# Jupyter Notebook
75+
.ipynb_checkpoints
76+
77+
# pyenv
78+
.python-version
79+
80+
# celery beat schedule file
81+
celerybeat-schedule
82+
83+
# SageMath parsed files
84+
*.sage.py
85+
86+
# Environments
87+
.env
88+
.venv
89+
env/
90+
venv/
91+
ENV/
92+
env.bak/
93+
venv.bak/
94+
95+
# Spyder project settings
96+
.spyderproject
97+
.spyproject
98+
99+
# Rope project settings
100+
.ropeproject
101+
102+
# mkdocs documentation
103+
/site
104+
105+
# mypy
106+
.mypy_cache/

.travis.yml

-40
This file was deleted.

README.md

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
django-regex-redirects [![Build Status](https://travis-ci.org/maykinmedia/django-regex-redirects.svg?branch=master)](https://travis-ci.org/maykinmedia/django-regex-redirects)
1+
django-regex-redirects
22
======================
33

44
Django redirects, with regular expressions. It is a modified version of django.contrib.redirects.
@@ -10,34 +10,30 @@ Features
1010
* Configurable via the admin
1111
* Redirects are exportable as .csv
1212

13-
https://pypi.python.org/pypi/django-regex-redirects
13+
https://pypi.org/pypi/django-regex-redirects
1414

1515
Install
1616
=======
1717

18-
```pip install django-regex-redirects``` or ```python setup.py install```
18+
`pip install django-regex-redirects`
1919

20-
Add regex_redirects to your INSTALLED_APPS:
20+
Add `regex_redirects` to your `INSTALLED_APPS`:
2121

22-
```
22+
```python
2323
INSTALLED_APPS = (
2424
...
25-
'regex_redirects',
25+
"regex_redirects",
2626
...
2727
)
2828
```
2929

30-
Add the middleware to your MIDDLEWARE:
30+
Add the middleware to your `MIDDLEWARE`:
3131

32-
```
32+
```python
3333
MIDDLEWARE = [
34-
'regex_redirects.middleware.RedirectFallbackMiddleware'
34+
"regex_redirects.middleware.RedirectFallbackMiddleware"
3535
...
3636
]
3737
```
3838

39-
Run manage.py migrate and you're good to go!
40-
41-
42-
43-
39+
Run `manage.py migrate` and you're good to go!

django_regex_redirects.egg-info/PKG-INFO

-9
This file was deleted.

django_regex_redirects.egg-info/SOURCES.txt

-19
This file was deleted.

django_regex_redirects.egg-info/dependency_links.txt

-1
This file was deleted.

django_regex_redirects.egg-info/top_level.txt

-1
This file was deleted.

manage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import os
33
import sys
44

5-
if __name__ == '__main__':
6-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testsettings')
5+
if __name__ == "__main__":
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testsettings")
77

88
from django.core.management import execute_from_command_line
99

0 commit comments

Comments
 (0)