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
WhyNotHugo committed Aug 14, 2023
1 parent 8006e35 commit c8f0927
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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']
django-version: ['2.2', '3.2', '4.1', '4.2', 'main']

steps:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
rev: v3.4.0
hooks:
- id: pyupgrade
args: [--py3-plus]
args: [--py38-plus]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.3.0"
hooks:
Expand Down
2 changes: 1 addition & 1 deletion payments/coinbase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def get_checkout_code(self, payment):

def get_action(self, payment):
checkout_url = self.checkout_url % {"endpoint": self.endpoint}
return "{}/{}".format(checkout_url, self.get_checkout_code(payment))
return f"{checkout_url}/{self.get_checkout_code(payment)}"

def get_hidden_fields(self, payment):
return {}
Expand Down
4 changes: 1 addition & 3 deletions payments/coinbase/test_coinbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
COINBASE_REQUEST = {
"order": {
"transaction": {"id": "123456"},
"custom": hashlib.md5(
("coinbase-{}-{}".format(PAYMENT_TOKEN, KEY)).encode("utf-8")
).hexdigest(),
"custom": hashlib.md5((f"coinbase-{PAYMENT_TOKEN}-{KEY}").encode()).hexdigest(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion payments/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def _default_provider_factory(variant: str, payment: Optional["BasePayment"] = N
variants = getattr(settings, "PAYMENT_VARIANTS", PAYMENT_VARIANTS)
handler, config = variants.get(variant, (None, None))
if not handler:
raise ValueError("Payment variant does not exist: {}".format(variant))
raise ValueError(f"Payment variant does not exist: {variant}")
if variant not in PROVIDER_CACHE:
module_path, class_name = handler.rsplit(".", 1)
module = __import__(str(module_path), globals(), locals(), [str(class_name)])
Expand Down
2 changes: 1 addition & 1 deletion payments/stripe/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def status(self, payment):

def get_line_items(self, payment) -> list:
order_no = payment.token if self.use_token else payment.pk
product_data = StripeProductData(name="Order #{}".format(order_no))
product_data = StripeProductData(name=f"Order #{order_no}")

price_data = StripePriceData(
currency=payment.currency.lower(),
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{37,38,39}-dj{22,30,31,32}
py{38,39}-dj{22,30,31,32}
py{38,39,310}-dj40
py{38,39,310,311}-dj{41,42}
py{310,311,312}-djmain
Expand Down Expand Up @@ -39,7 +39,6 @@ commands=

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

0 comments on commit c8f0927

Please sign in to comment.