Skip to content

Commit

Permalink
Added explicit python3.9 and 3.10 support (#224)
Browse files Browse the repository at this point in the history
* Added python3.9 and 3.10 support;
- Added python3.9 and 3.10 tests to CI;
- Added python3.9 and 3.10 classifiers to `setup.py`;
- Changed `quart` python version constraint;
- Adjusted tests to reflect the former;

* Fixed `Quart` import conditions in `test_lifespan.py`;

Co-authored-by: Ramazan Elsunkaev <[email protected]>
  • Loading branch information
relsunkaev and Ramazan Elsunkaev authored Jan 29, 2022
1 parent fad70a2 commit e978887
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pytest-cov
black
flake8
starlette
quart; python_version == '3.7'
quart; python_version >= '3.7'
moto[server]
mypy
brotli
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ def get_long_description():
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
)
8 changes: 2 additions & 6 deletions tests/test_lifespan.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
from mangum import Mangum
from mangum.exceptions import LifespanFailure

# One (or more) of Quart's dependencies does not support Python 3.8, ignore this case.
IS_PY38 = sys.version_info[:2] == (3, 8)
# Quart no longer support python3.6.
IS_PY36 = sys.version_info[:2] == (3, 6)

if not (IS_PY38 or IS_PY36):
if not IS_PY36:
from quart import Quart
else:
Quart = None
Expand Down Expand Up @@ -269,9 +268,6 @@ def homepage(request):
}


@pytest.mark.skipif(
IS_PY38, reason="One (or more) of Quart's dependencies does not support Python 3.8."
)
@pytest.mark.skipif(IS_PY36, reason="Quart does not support Python 3.6.")
@pytest.mark.parametrize(
"mock_aws_api_gateway_event", [["GET", None, None]], indirect=True
Expand Down

0 comments on commit e978887

Please sign in to comment.