Skip to content

Commit 416c47b

Browse files
authored
Misc: Django 6.0 upgrades (#10)
* Upgrade to Django 6.0, require Python 3.12-3.13 * make compatible with stripe 14.0 version
1 parent d6b2742 commit 416c47b

File tree

5 files changed

+18
-26
lines changed

5 files changed

+18
-26
lines changed

.github/workflows/tox.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,8 @@ jobs:
6060
runs-on: ubuntu-latest
6161
strategy:
6262
matrix:
63-
python: ["3.10", "3.11", "3.12"]
64-
django: ["42", "50", "52", "main"]
65-
exclude:
66-
- python: "3.10"
67-
django: "main"
68-
- python: "3.11"
69-
django: "main"
63+
python: ["3.12", "3.13"]
64+
django: ["52", "60", "main"]
7065

7166
env:
7267
TOXENV: django${{ matrix.django }}-py${{ matrix.python }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Provides a light-touch Django integration with Stripe.
55
We handle Stripe webhook security & persisting all events, while allowing your project to take care
66
of the business logic.
77

8-
Requires Python 3.8+ & Django 3.2+.
8+
Requires Python 3.12+ and Django 5.2-6.0.
99

1010
## Installation & Usage
1111

django_stripe/models/webhook_event.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ def create_from_event(
3737
remote_ip = get_client_ip(request)
3838

3939
stripe_request = event.get("request")
40-
request_id = stripe_request.id or ""
41-
request_idempotency_key = stripe_request.idempotency_key or ""
40+
request_id = (stripe_request.id or "") if stripe_request else ""
41+
request_idempotency_key = (
42+
(stripe_request.idempotency_key or "") if stripe_request else ""
43+
)
4244

4345
return self.create(
4446
stripe_id=event.id,

pyproject.toml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-stripe-lite"
3-
version = "0.7.0"
3+
version = "0.8.0"
44
description = "A library to aid Django integration with Stripe."
55
license = "MIT"
66
authors = ["YunoJuno <code@yunojuno.com>"]
@@ -12,24 +12,22 @@ documentation = "https://github.com/yunojuno/django-stripe-lite"
1212
classifiers = [
1313
"Environment :: Web Environment",
1414
"Framework :: Django",
15-
"Framework :: Django :: 4.2",
16-
"Framework :: Django :: 5.0",
1715
"Framework :: Django :: 5.2",
16+
"Framework :: Django :: 6.0",
1817
"License :: OSI Approved :: MIT License",
1918
"Operating System :: OS Independent",
2019
"Programming Language :: Python :: 3 :: Only",
21-
"Programming Language :: Python :: 3.10",
22-
"Programming Language :: Python :: 3.11",
2320
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
2422
]
2523
packages = [{ include = "django_stripe" }]
2624

2725
[tool.poetry.dependencies]
28-
python = "^3.10"
29-
django = "^4.2 || ^5.0 || ^5.2"
30-
stripe = "^5.0.0"
26+
python = "^3.12"
27+
django = ">=5.2,<7.0"
28+
stripe = ">=5.0.0,<15.0"
3129

32-
[tool.poetry.dev-dependencies]
30+
[tool.poetry.group.dev.dependencies]
3331
coverage = "*"
3432
freezegun = "*"
3533
mypy = "*"

tox.ini

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@ isolated_build = True
33
envlist =
44
fmt, lint, mypy,
55
django-checks,
6-
; https://docs.djangoproject.com/en/5.0/releases/
7-
django42-py{38,39,310,311}
8-
django50-py{310,311,312}
9-
django52-py{310,311,312}
10-
djangomain-py{312}
6+
django52-py{312,313}
7+
django60-py{312,313}
8+
djangomain-py{312,313}
119

1210
[testenv]
1311
deps =
1412
coverage
1513
pytest
1614
pytest-cov
1715
pytest-django
18-
django42: Django>=4.2,<4.3
19-
django50: Django>=5.0,<5.1
2016
django52: Django>=5.2,<5.3
17+
django60: Django>=6.0,<6.1
2118
djangomain: https://github.com/django/django/archive/main.tar.gz
2219

2320
commands =

0 commit comments

Comments
 (0)