Skip to content

Commit

Permalink
Drop support for Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani committed Jul 13, 2023
1 parent 875c6b7 commit 28b16fe
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']

services:
postgres:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
language_version: python3.8
args:
- "--target-version"
- "py37"
- "py38"
- repo: https://github.com/PyCQA/flake8
rev: "6.0.0"
hooks:
Expand All @@ -21,7 +21,7 @@ repos:
rev: v3.8.0
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py38-plus]
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.14.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#### Breaking Changes

- feat: Change `LogEntry.change` field type to `JSONField` rather than `TextField`. This change include a migration that may take time to run depending on the number of records on your `LogEntry` table ([#407](https://github.com/jazzband/django-auditlog/pull/407))
- Python: Drop support for Python 3.7 ([#546](https://github.com/jazzband/django-auditlog/pull/546))

#### Improvements

Expand Down
16 changes: 2 additions & 14 deletions auditlog/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
try:
from importlib.metadata import version # New in Python 3.8
except ImportError:
from pkg_resources import ( # from setuptools, deprecated
DistributionNotFound,
get_distribution,
)
from importlib.metadata import version

try:
__version__ = get_distribution("django-auditlog").version
except DistributionNotFound:
# package is not installed
pass
else:
__version__ = version("django-auditlog")
__version__ = version("django-auditlog")
6 changes: 3 additions & 3 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ The repository can be found at https://github.com/jazzband/django-auditlog/.

**Requirements**

- Python 3.7 or higher
- Django 3.2 or higher
- Python 3.8 or higher
- Django 3.2, 4.1 and 4.2

Auditlog is currently tested with Python 3.7+ and Django 3.2 and 4.0. The latest test report can be found
Auditlog is currently tested with Python 3.8+ and Django 3.2, 4.1 and 4.2. The latest test report can be found
at https://github.com/jazzband/django-auditlog/actions.

Adding Auditlog to your Django application
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.black]
target-version = ["py37"]
target-version = ["py38"]

[tool.isort]
profile = "black"
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@
description="Audit log app for Django",
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.7",
python_requires=">=3.8",
install_requires=["Django>=3.2", "python-dateutil>=2.7.0"],
zip_safe=False,
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
8 changes: 3 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist =
{py37,py38,py39,py310}-django32
{py38,py39,py310}-django32
{py38,py39,py310,py311}-django{41,42}
{py310,py311}-djangomain
py37-docs
py38-docs
py38-lint

[testenv]
Expand Down Expand Up @@ -34,9 +34,8 @@ basepython =
py310: python3.10
py39: python3.9
py38: python3.8
py37: python3.7

[testenv:py37-docs]
[testenv:py38-docs]
changedir = docs/source
deps = -rdocs/requirements.txt
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
Expand All @@ -48,7 +47,6 @@ commands =

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
Expand Down

0 comments on commit 28b16fe

Please sign in to comment.