Skip to content

Commit

Permalink
Update Python and Django versions (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani authored Jul 11, 2024
1 parent 4f18769 commit 50a98d0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
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: "7.1.0"
hooks:
Expand All @@ -21,7 +21,7 @@ repos:
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py38-plus]
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.19.0
hooks:
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"]

# black compatible isort
[tool.isort]
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
setup_requires=[
"setuptools_scm",
],
python_requires=">=3.7",
python_requires=">=3.8",
install_requires=[
"Django >=3.2",
],
Expand All @@ -25,19 +25,19 @@
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Utilities",
],
)
6 changes: 3 additions & 3 deletions src/voting/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pkg_resources import DistributionNotFound, get_distribution
from importlib.metadata import version

try:
__version__ = get_distribution("django-voting").version
except DistributionNotFound:
__version__ = version("django-voting")
except Exception:
# package is not installed
__version__ = None
17 changes: 8 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[tox]
envlist =
py{37,38,39,310}-dj32
py{38,39,310}-dj40
py{38,39,310,311}-dj41
py{310,311}-djmain
py{38,39,310}-dj32
py{38,39,310,311}-dj42
py{310,311,312}-dj{50,main}
py38-lint

[testenv]
Expand All @@ -14,8 +13,8 @@ deps =
pytest-django
pytest-flake8
dj32: Django>=3.2,<4.0
dj40: Django>=4.0,<4.1
dj41: Django>=4.1,<4.2
dj42: Django>=4.2,<4.3
dj50: Django>=5.0,<5.1
djmain: https://github.com/django/django/archive/main.tar.gz
setenv =
DJANGO_SETTINGS_MODULE = test_settings
Expand All @@ -28,17 +27,17 @@ ignore_outcome =

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[gh-actions:env]
DJANGO =
3.2: dj32
4.0: dj40
4.1: dj41
4.2: dj42
5.0: dj50
main: djmain

[testenv:py38-lint]
Expand Down

0 comments on commit 50a98d0

Please sign in to comment.