Skip to content

Commit 1cc15ad

Browse files
committed
Fixing jsonschema test issue. Dropping python 3.7 support
1 parent 3bf00cb commit 1cc15ad

File tree

7 files changed

+170
-111
lines changed

7 files changed

+170
-111
lines changed

.travis.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,23 @@ language: python
1111
matrix:
1212
fast_finish: true
1313
include:
14-
- python: 3.7
14+
- python: 3.8
1515
dist: xenial
1616
sudo: true
17-
- python: 3.8-dev
17+
18+
- python: 3.9
19+
dist: xenial
20+
sudo: true
21+
22+
- python: 3.10
1823
dist: xenial
1924
sudo: true
20-
- python: 3.7
25+
26+
- python: 3.11
27+
dist: xenial
28+
sudo: true
29+
30+
- python: 3.8
2131
dist: trusty
2232
sudo: false
2333
env: TOXENV=docs

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Lightbus Changelog
22

3+
## 1.3.0
4+
5+
* Enhancement: Python 3.10 & 3.11 now supported
6+
* Vendored aioredis due to compatibility issues
7+
* Breaking: Python 3.7 no longer supported
8+
39
## 1.2.0
410

511
* Updating @uses_django_db helper to use django's built-in db connection cleaning up facilities.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ and expose internal APIs.
3434
Lightbus uses Redis as its underlying transport, although support
3535
for other platforms may eventually be added.
3636

37-
Lightbus requires Python 3.7 or above.
37+
Lightbus requires Python 3.8 or above.
3838

3939
**Full documentation can be found at https://lightbus.org**
4040

lightbus/schema/hints_to_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def python_type_to_json_schemas(type_):
201201
"type": "array",
202202
"maxItems": len(hint_args),
203203
"minItems": len(hint_args),
204-
"items": [
204+
"prefixItems": [
205205
wrap_with_any_of(python_type_to_json_schemas(sub_type))
206206
for sub_type in hint_args
207207
],

poetry.lock

Lines changed: 146 additions & 102 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
# dephell deps convert
4343
# black setup.py
4444
# See the release process docs for more information
45-
python = ">=3.7"
46-
jsonschema = ">=3.2"
45+
python = ">=3.8"
46+
jsonschema = "^4.19.0"
4747
pyyaml = ">=3.12"
4848
redis = ">=4.2.0,<5"
4949
pytest-asyncio = "0.21.1"

tests/schema/test_hints_to_schema.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ def func(user: User):
166166

167167

168168
def test_named_tuple_using_function():
169-
170169
User = namedtuple("User", ("username", "password"))
171170

172171
def func(user: User):
@@ -221,7 +220,7 @@ def func(username) -> Tuple[str, int, bool]:
221220

222221
schema = make_response_schema("api_name", "rpc_name", func)
223222
assert schema["type"] == "array"
224-
assert schema["items"] == [{"type": "string"}, {"type": "integer"}, {"type": "boolean"}]
223+
assert schema["prefixItems"] == [{"type": "string"}, {"type": "integer"}, {"type": "boolean"}]
225224

226225

227226
def test_response_named_tuple():

0 commit comments

Comments
 (0)