Skip to content

Commit b4ba452

Browse files
authored
Add support for Python 3.11 and Django 4.1 (#786)
1 parent 413c921 commit b4ba452

File tree

5 files changed

+30
-8
lines changed

5 files changed

+30
-8
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.8']
13-
django-version: ['2.2', '3.0', '3.1', '3.2', '4.0', 'main']
12+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.8']
13+
django-version: ['2.2', '3.0', '3.1', '3.2', '4.0', '4.1', 'main']
1414
exclude:
1515
- python-version: '3.7'
1616
django-version: '4.0'
1717
- python-version: '3.7'
18+
django-version: '4.1'
19+
- python-version: '3.8'
20+
django-version: '4.1'
21+
- python-version: '3.7'
22+
django-version: 'main'
23+
- python-version: '3.8'
1824
django-version: 'main'
1925
- python-version: 'pypy-3.8'
2026
django-version: 'main'
@@ -26,6 +32,14 @@ jobs:
2632
django-version: '3.1'
2733
- python-version: '3.10'
2834
django-version: '3.2'
35+
- python-version: '3.11'
36+
django-version: '2.2'
37+
- python-version: '3.11'
38+
django-version: '3.0'
39+
- python-version: '3.11'
40+
django-version: '3.1'
41+
- python-version: '3.11'
42+
django-version: '3.2'
2943

3044
steps:
3145
- uses: actions/checkout@v3

HISTORY.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Unreleased
99
* Update README.rst and add Pipeline overview image.
1010
* Add TypeScript compiler support.
1111
* Drop support for ``manifesto`` package.
12+
* Add support for Python 3.11 and Django 4.1
1213

1314

1415
2.0.9

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'Framework :: Django :: 3.1',
3131
'Framework :: Django :: 3.2',
3232
'Framework :: Django :: 4.0',
33+
'Framework :: Django :: 4.1',
3334
'Intended Audience :: Developers',
3435
'License :: OSI Approved :: MIT License',
3536
'Operating System :: OS Independent',
@@ -40,6 +41,7 @@
4041
'Programming Language :: Python :: 3.8',
4142
'Programming Language :: Python :: 3.9',
4243
'Programming Language :: Python :: 3.10',
44+
'Programming Language :: Python :: 3.11',
4345
'Programming Language :: Python :: Implementation :: PyPy',
4446
'Topic :: Utilities',
4547
'Topic :: Software Development :: Libraries :: Python Modules',

tests/tests/test_forms.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class MyMedia(PipelineFormMedia):
7676
})
7777
self.assertEqual(MyMedia.css, media._css)
7878
expected_regex = [
79-
r'<link href="%s" type="text/css" media="all" '
79+
r'<link href="%s"( type="text/css")? media="all" '
8080
'rel="stylesheet"( /)?>' % path
8181
for path in (
8282
'/static/extra1.css',
@@ -85,7 +85,7 @@ class MyMedia(PipelineFormMedia):
8585
'/static/styles2.min.css',
8686
)
8787
] + [
88-
r'<link href="/static/print.min.css" type="text/css" '
88+
r'<link href="/static/print.min.css" (type="text/css" )?'
8989
'media="print" rel="stylesheet"( /)?>'
9090
]
9191
for rendered_node, expected_node in zip(
@@ -123,7 +123,7 @@ class MyMedia(PipelineFormMedia):
123123
self.assertEqual(MyMedia.css, media._css)
124124

125125
expected_regex = [
126-
'<link href="%s" type="text/css" media="all" '
126+
'<link href="%s"( type="text/css")? media="all" '
127127
'rel="stylesheet"( /)?>' % path
128128
for path in (
129129
'/static/extra1.css',
@@ -133,7 +133,7 @@ class MyMedia(PipelineFormMedia):
133133
'/static/pipeline/css/unicode.css',
134134
)
135135
] + [
136-
'<link href="/static/pipeline/css/urls.css" type="text/css" '
136+
'<link href="/static/pipeline/css/urls.css" (type="text/css" )?'
137137
'media="print" rel="stylesheet"( /)?>'
138138
]
139139
for rendered_node, expected_node in zip(

tox.ini

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
envlist =
33
pypy3-dj{22,30,31,32}
44
py{37,38,39}-dj{22,30,31}
5-
py{37,38,39,10}-dj32
6-
py{38,39,310}-dj{40,main}
5+
py{37,38,39,310,311}-dj32
6+
py{38,39,310,311}-dj40
7+
py{39,310,311}-dj{41,main}
78
docs
89

910
[gh-actions]
@@ -12,6 +13,7 @@ python =
1213
3.8: py38, docs
1314
3.9: py39
1415
3.10: py310
16+
3.11: py311
1517
pypy3: pypy3
1618

1719
[gh-actions:env]
@@ -21,6 +23,7 @@ DJANGO =
2123
3.1: dj31
2224
3.2: dj32
2325
4.0: dj40
26+
4.1: dj41
2427
main: djmain
2528

2629
[testenv]
@@ -30,13 +33,15 @@ basepython =
3033
py38: python3.8
3134
py39: python3.9
3235
py310: python3.10
36+
py311: python3.11
3337
deps =
3438
pypy3: mock
3539
dj22: Django>=2.2.1,<2.3
3640
dj30: Django>=3.0,<3.1
3741
dj31: Django>=3.1,<3.2
3842
dj32: Django>=3.2,<3.3
3943
dj40: Django>=4.0,<4.1
44+
dj41: Django>=4.1,<4.2
4045
djmain: https://github.com/django/django/archive/main.tar.gz
4146
jinja2
4247
coverage

0 commit comments

Comments
 (0)