Skip to content

Commit cbf031d

Browse files
committed
bump django to 5.2 and django-oscar to 4.0
1 parent 04b77bd commit cbf031d

File tree

7 files changed

+31
-48
lines changed

7 files changed

+31
-48
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
python-version: [3.6, 3.7, 3.8, 3.9]
18-
django-version: [2.2]
17+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
18+
django-version: ['4.2', '5.2']
19+
exclude:
20+
# Django 5.2(LTS) supports python 3.10 and up.
21+
- django-version: '5.2'
22+
python-version: '3.8'
23+
- django-version: '5.2'
24+
python-version: '3.9'
1925
services:
2026
postgres:
21-
image: postgres:10
27+
image: postgres:16
2228
ports:
2329
- 5432/tcp
2430
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
@@ -48,20 +54,21 @@ jobs:
4854
run: |
4955
coverage run --parallel -m pytest -x
5056
- name: Upload coverage to Codecov
51-
uses: codecov/codecov-action@v1
57+
uses: codecov/codecov-action@v5.4.3
5258
with:
5359
fail_ci_if_error: true
5460
lint_python:
5561
runs-on: ubuntu-latest
5662
steps:
57-
- uses: actions/checkout@v2
63+
- uses: actions/checkout@v4
5864
- name: Set up Python ${{ matrix.python-version }}
59-
uses: actions/setup-python@v2
65+
uses: actions/setup-python@v5
6066
with:
61-
python-version: 3.7
67+
python-version: 3.11
6268
- name: Install dependencies
6369
run: |
6470
python -m pip install --upgrade pip
71+
pip install -e .[test]
6572
pip install -r requirements.txt
6673
- name: Run linters
6774
run: |

paypal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '2.0.0'
1+
VERSION = '3.0.0'

requirements.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# Testing
2-
django-oscar>=2.0,<3.2
3-
django-webtest==1.9.10
4-
tox>=3.20<4
5-
pytest-django==4.5.2
6-
pytest-cov>=2.10<3
7-
django-widget-tweaks==1.4.9
2+
django-oscar==4.0
3+
django-webtest
4+
pytest-django
5+
pytest-cov
86
sorl-thumbnail
97
coverage
108

setup.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
packages=find_packages(exclude=['sandbox*', 'tests*']),
1818
include_package_data=True,
1919
install_requires=[
20-
'django>=2.2,<4.2',
20+
'django>=4.2',
2121
'paypal-checkout-serversdk>=1.0.1',
22-
'requests>=2.26.0',
22+
'requests',
2323
'django-localflavor'
2424
],
2525
extras_require={
26-
'oscar': ['django-oscar>=2.0,<4.0']
26+
'oscar': ['django-oscar==4.0']
2727
},
2828
# See http://pypi.python.org/pypi?%3Aaction=list_classifiers
2929
classifiers=[
@@ -35,9 +35,11 @@
3535
'Operating System :: Unix',
3636
'Programming Language :: Python',
3737
'Programming Language :: Python :: 3',
38-
'Programming Language :: Python :: 3.6',
39-
'Programming Language :: Python :: 3.7',
4038
'Programming Language :: Python :: 3.8',
4139
'Programming Language :: Python :: 3.9',
40+
'Programming Language :: Python :: 3.10',
41+
'Programming Language :: Python :: 3.11',
42+
'Programming Language :: Python :: 3.12',
43+
'Programming Language :: Python :: 3.13',
4244
'Topic :: Other/Nonlisted Topic'],
4345
)

tests/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@
118118
SITE_ID = 1
119119
ROOT_URLCONF = 'tests.urls'
120120

121-
STATIC_URL = '/'
122-
STATIC_ROOT = '/static/'
121+
STATIC_URL = '/static'
122+
MEDIA_URL = '/media'

tests/unit/express/view_tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from django.test import TestCase, override_settings
66
from django.test.client import Client
77
from django.urls import reverse
8-
from django.utils.encoding import force_text
8+
from django.utils.encoding import force_str
99
from oscar.apps.basket.models import Basket
1010
from oscar.apps.order.models import Order
1111
from oscar.core.loading import get_classes
@@ -185,9 +185,9 @@ def perform_action(self):
185185
def test_context(self):
186186
self.assertEqual(D('33.98'), self.response.context['paypal_amount'])
187187
self.assertEqual('Royal Mail Signed For™ 2nd Class',
188-
force_text(self.response.context['shipping_method'].name))
188+
force_str(self.response.context['shipping_method'].name))
189189
self.assertEqual('uk_rm_2ndrecorded',
190-
force_text(self.response.context['shipping_method'].code))
190+
force_str(self.response.context['shipping_method'].code))
191191

192192
def test_keys_in_context(self):
193193
keys = ('shipping_address', 'shipping_method',

tox.ini

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)