Skip to content

Commit

Permalink
feat: Added model field (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
marksweb and pre-commit-ci[bot] committed Nov 15, 2023
1 parent f68ebd5 commit 2e474c4
Show file tree
Hide file tree
Showing 31 changed files with 761 additions and 1,557 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ jobs:
strategy:
matrix:
python-version:
- 3.8
- 3.9
- '3.10'
- '3.11'
- '3.12'

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -55,7 +54,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'

- name: Install dependencies
run: python -m pip install --upgrade coverage[toml]
Expand Down Expand Up @@ -87,7 +86,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- run: |
python -m pip install --upgrade pip
pip install ruff
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repos:
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py310-plus]
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,15 @@ Changelog

unreleased
----------

0.0.2 - 2023-11-15
------------------

- Added model field with NH3 sanitization
- Added testing against django 5.0


0.0.1 - 2023-03-02
------------------

- Initial release offering a form field with NH3 sanitization
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Django integration with for nh3, Python binding to Ammonia HTML sanitizer Rust c
Requirements
------------

Python 3.7 to 3.11 supported.
Python 3.10 to 3.12 supported.

Django 3.2 to 4.2 supported.
Django 3.2 to 5.0 supported.


.. _nh3 docs: https://nh3.readthedocs.io/en/latest/?badge=latest
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ keep-runtime-typing = true

[tool.pytest]
DJANGO_SETTINGS_MODULE = "tests.settings"
django_find_project = false

[tool.pytest.ini_options]
addopts = """\
Expand Down
132 changes: 12 additions & 120 deletions requirements/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,114 +17,6 @@
"--generate-hashes",
"--allow-unsafe",
] + sys.argv[1:]
subprocess.run(
[
"/usr/local/bin/python3.7",
*common_args,
"-P",
"Django>=3.2a1,<3.3",
"-o",
"py37-django32.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.8",
*common_args,
"-P",
"Django>=3.2a1,<3.3",
"-o",
"py38-django32.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.8",
*common_args,
"-P",
"Django>=4.0a1,<4.1",
"-o",
"py38-django40.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.8",
*common_args,
"-P",
"Django>=4.1a1,<4.2",
"-o",
"py38-django41.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.8",
*common_args,
"-P",
"Django>=4.2a1,<5.0",
"-o",
"py38-django42.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.9",
*common_args,
"-P",
"Django>=3.2a1,<3.3",
"-o",
"py39-django32.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.9",
*common_args,
"-P",
"Django>=4.0a1,<4.1",
"-o",
"py39-django40.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.9",
*common_args,
"-P",
"Django>=4.1a1,<4.2",
"-o",
"py39-django41.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.9",
*common_args,
"-P",
"Django>=4.2a1,<5.0",
"-o",
"py39-django42.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.10",
Expand All @@ -142,57 +34,57 @@
"/usr/local/bin/python3.10",
*common_args,
"-P",
"Django>=4.0a1,<4.1",
"Django>=4.2a1,<5.0",
"-o",
"py310-django40.txt",
"py310-django42.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.10",
"/usr/local/bin/python3.11",
*common_args,
"-P",
"Django>=4.1a1,<4.2",
"-o",
"py310-django41.txt",
"py311-django41.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.10",
"/usr/local/bin/python3.11",
*common_args,
"-P",
"Django>=4.2a1,<5.0",
"-o",
"py310-django42.txt",
"py311-django42.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.11",
"/usr/local/bin/python3.12",
*common_args,
"-P",
"Django>=4.1a1,<4.2",
"Django>=4.2a1,<5.0",
"-o",
"py311-django41.txt",
"py312-django42.txt",
],
check=True,
capture_output=True,
)
subprocess.run(
[
"/usr/local/bin/python3.11",
"/usr/local/bin/python3.12",
*common_args,
"-P",
"Django>=4.2a1,<5.0",
"Django>=5.0a1,<5.1",
"-o",
"py311-django42.txt",
"py312-django50.txt",
],
check=True,
capture_output=True,
Expand Down
Loading

0 comments on commit 2e474c4

Please sign in to comment.