Skip to content

Commit 445b065

Browse files
Merge pull request #14 from yunojuno/misc/django-52-upgrades
# Django 5.2 Compatibility Update This PR introduces compatibility for Django 5.2 and makes several maintenance improvements to the project. ## Changes 1. Dependency Updates 2. Added support for Django 5.2 3. Dropped support for Django versions before 4.2 (3.2, 4.0, 4.1) 4. Updated dependency specifiers in pyproject.toml ## Testing and CI Improvements 1. Updated tox.ini to test against Django 4.2, 5.0, 5.2, and main 2. Modified GitHub Action workflow to only test Django main branch on Python 3.12 3. Adjusted Python/Django compatibility matrix ## Code Quality 1. Updated ruff commands to use the modern "ruff check" syntax 2. Ran code formatting tools (black and ruff) on the codebase ## Documentation 1. Updated CHANGELOG with version 0.5 details 2. Updated supported Django versions in project metadata ## Versioning Bumped project version to 0.5
2 parents 0d90a8d + 754f360 commit 445b065

File tree

6 files changed

+24
-19
lines changed

6 files changed

+24
-19
lines changed

.github/workflows/tox.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,24 @@ jobs:
6262
matrix:
6363
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
6464
# build LTS version, next version, HEAD
65-
django: ["32", "42", "50", "main"]
65+
django: ["42", "50", "52", "main"]
6666
exclude:
6767
- python: "3.8"
6868
django: "50"
69+
- python: "3.8"
70+
django: "52"
6971
- python: "3.8"
7072
django: "main"
7173
- python: "3.9"
7274
django: "50"
75+
- python: "3.9"
76+
django: "52"
7377
- python: "3.9"
7478
django: "main"
7579
- python: "3.10"
7680
django: "main"
7781
- python: "3.11"
78-
django: "32"
79-
- python: "3.12"
80-
django: "32"
82+
django: "main"
8183

8284
env:
8385
TOXENV: django${{ matrix.django }}-py${{ matrix.python }}

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ repos:
1010
rev: "v0.1.5"
1111
hooks:
1212
- id: ruff
13+
name: ruff check
1314
args: [--fix, --exit-non-zero-on-fix]
1415

1516
# python static type checking

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
# v0.5
6+
7+
- Adds Django 5.2 support
8+
- Drops support for Django versions before 4.2 (3.2, 4.0, 4.1)
9+
- Updates test workflows to ensure Django main branch is only tested with Python 3.12
10+
- Updates ruff command to use modern "ruff check" syntax
11+
- Applies code formatting with black and ruff
12+
513
# v0.4
614

715
- Adds Django 5.0 to build matrix

charidfield/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__all__ = ["CharIDField"]
44

55
__title__ = "django-charid-field"
6-
__version__ = "0.2.2"
6+
__version__ = "0.5"
77
__author__ = "YunoJuno"
88
__license__ = "MIT License"
99
__copyright__ = "Copyright YunoJuno"

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-charid-field"
3-
version = "0.4"
3+
version = "0.5"
44
description = "Provides a char-based, prefixable ID field for your Django models. Supports cuid, ksuid, ulid, et al."
55
license = "MIT"
66
authors = ["YunoJuno <code@yunojuno.com>"]
@@ -10,11 +10,9 @@ repository = "https://github.com/yunojuno/django-charid-field"
1010
documentation = "https://github.com/yunojuno/django-charid-field/blob/master/README"
1111
classifiers = [
1212
"Environment :: Web Environment",
13-
"Framework :: Django :: 3.2",
14-
"Framework :: Django :: 4.0",
15-
"Framework :: Django :: 4.1",
1613
"Framework :: Django :: 4.2",
1714
"Framework :: Django :: 5.0",
15+
"Framework :: Django :: 5.2",
1816
"License :: OSI Approved :: MIT License",
1917
"Operating System :: OS Independent",
2018
"Programming Language :: Python :: 3 :: Only",
@@ -28,7 +26,7 @@ packages = [{ include = "charidfield" }]
2826

2927
[tool.poetry.dependencies]
3028
python = "^3.8"
31-
django = "^3.2 || ^4.0 || ^5.0"
29+
django = "^4.2 || ^5.0"
3230

3331
[tool.poetry.group.test.dependencies]
3432
coverage = "*"

tox.ini

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,20 @@ envlist =
44
fmt, lint, mypy,
55
django-checks,
66
; https://docs.djangoproject.com/en/5.0/releases/
7-
django32-py{38,39,310}
8-
django40-py{38,39,310}
9-
django41-py{38,39,310,311}
107
django42-py{38,39,310,311}
118
django50-py{310,311,312}
12-
djangomain-py{311,312}
9+
django52-py{310,311,312}
10+
djangomain-py312
1311

1412
[testenv]
1513
deps =
1614
coverage
1715
pytest
1816
pytest-cov
1917
pytest-django
20-
django32: Django>=3.2,<3.3
21-
django40: Django>=4.0,<4.1
22-
django41: Django>=4.1,<4.2
2318
django42: Django>=4.2,<4.3
24-
django50: https://github.com/django/django/archive/stable/5.0.x.tar.gz
19+
django50: Django>=5.0,<5.1
20+
django52: Django>=5.2,<5.3
2521
djangomain: https://github.com/django/django/archive/main.tar.gz
2622

2723
commands =
@@ -48,7 +44,7 @@ deps =
4844
ruff
4945

5046
commands =
51-
ruff charidfield
47+
ruff check charidfield
5248

5349
[testenv:mypy]
5450
description = Python source code type hints (mypy)

0 commit comments

Comments
 (0)