Skip to content

Commit 1c3a3a1

Browse files
authored
Merge pull request kvesteri#647 from kvesteri/python-3.11
Support Python 3.11
2 parents 15e8c86 + 282212c commit 1c3a3a1

File tree

6 files changed

+12
-17
lines changed

6 files changed

+12
-17
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
9+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
1010
tox_env: ['sqlalchemy14']
1111
include:
1212
- python-version: '3.6'

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Here you can see the full list of changes between each SQLAlchemy-Utils release.
77
Unreleased
88
^^^^^^^^^^
99

10+
- Support Python 3.11.
1011
- Fix a crash that occurs if the ``colour-science`` package is installed,
1112
which shares the same import name as the ``colour`` package that sqlalchemy-utils supports.
1213
(`#637 <https://github.com/kvesteri/sqlalchemy-utils/pull/637>`_, courtesy of JayPalm)

tests/primitives/test_country.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,10 @@ def test_ordering(self, op, code_left, code_right, is_):
8585
assert op(code_left, country_right) is is_
8686

8787
def test_hash(self):
88-
return hash(Country('FI')) == hash('FI')
88+
assert hash(Country('FI')) == hash('FI')
8989

9090
def test_repr(self):
91-
return repr(Country('FI')) == "Country('FI')"
92-
93-
def test_unicode(self):
94-
country = Country('FI')
95-
assert str(country) == 'Finland'
91+
assert repr(Country('FI')) == "Country('FI')"
9692

9793
def test_str(self):
9894
country = Country('FI')

tests/primitives/test_ltree.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,11 @@ def test_non_equality_operator(self):
189189
assert not (Ltree('path.path') != 'path.path')
190190

191191
def test_hash(self):
192-
return hash(Ltree('path')) == hash('path')
192+
assert hash(Ltree('path')) == hash('path')
193193

194194
def test_repr(self):
195-
return repr(Ltree('path')) == "Ltree('path')"
195+
assert repr(Ltree('path')) == "Ltree('path')"
196196

197-
def test_unicode(self):
197+
def test_str(self):
198198
ltree = Ltree('path.path')
199199
assert str(ltree) == 'path.path'
200-
201-
def test_str(self):
202-
ltree = Ltree('path')
203-
assert str(ltree) == 'path'

tests/test_path.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ def test_iter(self):
140140
@pytest.mark.parametrize(('path', 'length'), (
141141
(Path('s.s2.s3'), 3),
142142
(Path('s.s2'), 2),
143-
(Path(''), 0)
143+
(Path(''), 1),
144144
))
145145
def test_len(self, path, length):
146-
return len(path) == length
146+
assert len(path) == length
147147

148148
def test_reversed(self):
149149
path = Path('s.s2.s3')

tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{36, 37, 38, 39, 310}-sqlalchemy{13, 14}
3+
py{36, 37, 38, 39, 310, 311}-sqlalchemy{13, 14}
44
lint
55

66
[testenv]
@@ -53,3 +53,5 @@ filterwarnings =
5353
ignore:distutils Version classes are deprecated.:DeprecationWarning
5454
; Ignore cryptography deprecation warnings (Python 3.6).
5555
ignore:Python 3.6 is no longer supported:UserWarning
56+
; Ignore warnings about passlib's use of the crypt module (Python 3.11).
57+
ignore:'crypt' is deprecated and slated for removal:DeprecationWarning

0 commit comments

Comments
 (0)