Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit c5b26df

Browse files
authored
Update for Django 4 (#89)
1 parent a76f4c3 commit c5b26df

File tree

13 files changed

+36
-33
lines changed

13 files changed

+36
-33
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [3.6, 3.7, 3.8, 3.9]
11+
python-version: ["3.9", "3.10", "3.11"]
1212

1313
steps:
1414
- uses: actions/checkout@v2
@@ -21,4 +21,4 @@ jobs:
2121
python -m pip install --upgrade pip
2222
pip install tox tox-gh-actions
2323
- name: Test with tox
24-
run: tox
24+
run: tox

CHANGELOG.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
##[0.12.0]
5+
### Removed
6+
- Removed support for Python <3.9
7+
### Added
8+
- Added support for Python 3.10 and 3.11
9+
- Added support for Django 4.2
10+
11+
412
##[0.11.0]
513
### Added
614
- Added support for python 3.9
@@ -9,7 +17,7 @@ All notable changes to this project will be documented in this file.
917

1018
##[0.10.0]
1119
### Removed
12-
- Added support for python 3.5
20+
- Removed support for python 3.5
1321
### Added
1422
- Added support for python 3.8
1523
- Added support for Django 3.0 and 3.1

aa_stripe/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
__title__ = "Ro Stripe"
3-
__version__ = "0.11.0"
3+
__version__ = "0.12.0"
44
__author__ = "Remigiusz Dymecki"
55
__license__ = "MIT"
66
__copyright__ = "Copyright 2019 Ro"

aa_stripe/api_urls.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# -*- coding: utf-8 -*-
2-
from django.conf.urls import url
2+
from django.urls import re_path
33
from rest_framework.routers import DefaultRouter
44

55
from aa_stripe.api import CouponDetailsAPI, CustomerDetailsAPI, CustomersAPI, WebhookAPI
66

77
urlpatterns = [
8-
url(r"^aa-stripe/coupons/(?P<coupon_id>.*)$", CouponDetailsAPI.as_view(), name="stripe-coupon-details"),
9-
url(r"^aa-stripe/customers$", CustomersAPI.as_view(), name="stripe-customers"),
10-
url(r"^aa-stripe/customers/(?P<stripe_customer_id>[\w\-]+)$", CustomerDetailsAPI.as_view(),
11-
name="stripe-customer-details"),
12-
url(r"^aa-stripe/webhooks$", WebhookAPI.as_view(), name="stripe-webhooks")
8+
re_path(r"^aa-stripe/coupons/(?P<coupon_id>.*)$", CouponDetailsAPI.as_view(), name="stripe-coupon-details"),
9+
re_path(r"^aa-stripe/customers$", CustomersAPI.as_view(), name="stripe-customers"),
10+
re_path(r"^aa-stripe/customers/(?P<stripe_customer_id>[\w\-]+)$", CustomerDetailsAPI.as_view(),
11+
name="stripe-customer-details"),
12+
re_path(r"^aa-stripe/webhooks$", WebhookAPI.as_view(), name="stripe-webhooks")
1313
]
1414

1515
router = DefaultRouter()

aa_stripe/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.utils.translation import ugettext_lazy as _
1+
from django.utils.translation import gettext_lazy as _
22

33

44
class StripeMethodNotAllowed(Exception):

aa_stripe/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django import forms
2-
from django.utils.translation import ugettext_lazy as _
2+
from django.utils.translation import gettext_lazy as _
33

44
from aa_stripe.models import StripeCoupon
55

aa_stripe/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from django.core.validators import MaxValueValidator, MinValueValidator
1616
from django.db import models
1717
from django.utils import dateformat, timezone
18-
from django.utils.translation import ugettext_lazy as _
18+
from django.utils.translation import gettext_lazy as _
1919
from django_extensions.db.fields.json import JSONField
2020

2121
from aa_stripe.exceptions import (StripeCouponAlreadyExists, StripeInternalError, StripeMethodNotAllowed,
@@ -29,7 +29,7 @@
2929
logger = logging.getLogger("aa-stripe")
3030

3131
# signals
32-
webhook_pre_parse = dispatch.Signal(providing_args=["instance", "event_type", "event_model", "event_action"])
32+
webhook_pre_parse = dispatch.Signal()
3333

3434

3535
class StripeBasicModel(models.Model):

aa_stripe/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33

44
import stripe
5-
from django.utils.translation import ugettext_lazy as _
5+
from django.utils.translation import gettext_lazy as _
66
from rest_framework import serializers
77
from rest_framework.exceptions import ValidationError
88
from rest_framework.serializers import JSONField, ModelSerializer

aa_stripe/signals.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import django.dispatch
33

4-
stripe_charge_succeeded = django.dispatch.Signal(providing_args=["instance"])
5-
stripe_charge_card_exception = django.dispatch.Signal(providing_args=["instance", "exception"])
6-
stripe_charge_refunded = django.dispatch.Signal(providing_args=["instance"])
4+
stripe_charge_succeeded = django.dispatch.Signal()
5+
stripe_charge_card_exception = django.dispatch.Signal()
6+
stripe_charge_refunded = django.dispatch.Signal()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
django>=2.2.14,<3.3
1+
django>=2.2.14,<4.3

0 commit comments

Comments
 (0)