diff --git a/.travis.yml b/.travis.yml index ee2c2fc..940489c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - "3.7" - "3.8" - "3.9" install: pip install tox-travis diff --git a/pyproject.toml b/pyproject.toml index 8a54903..2a9d5cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,8 +12,8 @@ packages = [ ] [tool.poetry.dependencies] -python = "^3.7" -tornado = "^4 || ^5 || ^6" +python = "^3.9" +tornado = "^5 || ^6" openapi-core = "^0.14.2" ietfparse = "^1.8.0" typing-extensions = "^4.0.1" @@ -23,7 +23,7 @@ black = { version = "*", allow-prereleases = true } coverage = "*" mypy = "*" hypothesis = "*" -flake8 = "*" +flake8 = "^3.7.9" pytest = "*" pytest-black = "*" pytest-cov = "*" diff --git a/tests/test_handler.py b/tests/test_handler.py index 11b9ee1..fea4503 100644 --- a/tests/test_handler.py +++ b/tests/test_handler.py @@ -4,9 +4,9 @@ import re import unittest.mock from openapi_core.exceptions import OpenAPIError # type: ignore -import tornado.httpclient # type: ignore -import tornado.web # type: ignore -import tornado.testing # type: ignore +import tornado.httpclient +import tornado.web +import tornado.testing from tornado_openapi3.handler import OpenAPIRequestHandler diff --git a/tests/test_requests.py b/tests/test_requests.py index 20a8e79..d5a5f06 100644 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -15,10 +15,10 @@ from openapi_core.validation.request.datatypes import ( # type: ignore RequestParameters, OpenAPIRequest, ) -from tornado.httpclient import HTTPRequest # type: ignore -from tornado.httputil import HTTPHeaders, HTTPServerRequest # type: ignore -from tornado.testing import AsyncHTTPTestCase # type: ignore -from tornado.web import Application, RequestHandler # type: ignore +from tornado.httpclient import HTTPRequest +from tornado.httputil import HTTPHeaders, HTTPServerRequest +from tornado.testing import AsyncHTTPTestCase +from tornado.web import Application, RequestHandler from werkzeug.datastructures import ImmutableMultiDict from tornado_openapi3 import RequestValidator, TornadoRequestFactory diff --git a/tests/test_responses.py b/tests/test_responses.py index 6d4ebd5..d2e3f72 100644 --- a/tests/test_responses.py +++ b/tests/test_responses.py @@ -9,9 +9,9 @@ import hypothesis.strategies as s from openapi_core import create_spec # type: ignore from openapi_core.validation.response.datatypes import OpenAPIResponse # type: ignore -from tornado.httpclient import HTTPRequest, HTTPResponse # type: ignore -from tornado.testing import AsyncHTTPTestCase # type: ignore -from tornado.web import Application, RequestHandler # type: ignore +from tornado.httpclient import HTTPRequest, HTTPResponse +from tornado.testing import AsyncHTTPTestCase +from tornado.web import Application, RequestHandler from tornado_openapi3 import ( ResponseValidator, diff --git a/tests/test_testing.py b/tests/test_testing.py index 846eb52..e7050ee 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -3,7 +3,7 @@ import json from openapi_core.templating.responses.exceptions import ( # type: ignore ResponseNotFound, ) -import tornado.web # type: ignore +import tornado.web from tornado_openapi3.handler import OpenAPIRequestHandler from tornado_openapi3.testing import AsyncOpenAPITestCase diff --git a/tornado_openapi3/handler.py b/tornado_openapi3/handler.py index 5eb5e5f..b04a6ef 100644 --- a/tornado_openapi3/handler.py +++ b/tornado_openapi3/handler.py @@ -20,7 +20,7 @@ from openapi_core.templating.paths.exceptions import ( # type: ignore ) from openapi_core.unmarshalling.schemas.exceptions import ValidateError # type: ignore from openapi_core.validation.exceptions import InvalidSecurity # type: ignore -import tornado.web # type: ignore +import tornado.web from tornado_openapi3.requests import RequestValidator from tornado_openapi3.types import Deserializer, Formatter diff --git a/tornado_openapi3/requests.py b/tornado_openapi3/requests.py index 396cb0c..bbc4964 100644 --- a/tornado_openapi3/requests.py +++ b/tornado_openapi3/requests.py @@ -8,8 +8,8 @@ from openapi_core.validation.request.datatypes import ( # type: ignore RequestValidationResult, ) from openapi_core.validation.request import validators # type: ignore -from tornado.httpclient import HTTPRequest # type: ignore -from tornado.httputil import HTTPServerRequest, parse_cookie # type: ignore +from tornado.httpclient import HTTPRequest +from tornado.httputil import HTTPServerRequest, parse_cookie from werkzeug.datastructures import ImmutableMultiDict, Headers from .util import parse_mimetype diff --git a/tornado_openapi3/responses.py b/tornado_openapi3/responses.py index 4aa079c..cea1081 100644 --- a/tornado_openapi3/responses.py +++ b/tornado_openapi3/responses.py @@ -3,7 +3,7 @@ from openapi_core.validation.response.datatypes import ( # type: ignore ResponseValidationResult, ) from openapi_core.validation.response import validators # type: ignore -from tornado.httpclient import HTTPResponse # type: ignore +from tornado.httpclient import HTTPResponse from .requests import TornadoRequestFactory from .util import parse_mimetype diff --git a/tornado_openapi3/testing.py b/tornado_openapi3/testing.py index 2c358bd..a55db51 100644 --- a/tornado_openapi3/testing.py +++ b/tornado_openapi3/testing.py @@ -1,7 +1,7 @@ from typing import Any -import tornado.httpclient # type: ignore -import tornado.testing # type: ignore +import tornado.httpclient +import tornado.testing from openapi_core import create_spec # type: ignore from openapi_core.spec.paths import SpecPath # type: ignore diff --git a/tox.ini b/tox.ini index f57c6f9..308cb12 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,9 @@ [tox] isolated_build=true -envlist = {py37,py38,py39}-tornado{4,5,6} +envlist = {py39,py310,py311,py312,py313}-tornado6 [testenv] deps = - tornado4: tornado>=4,<5 - tornado5: tornado>=5,<6 tornado6: tornado>=6,<7 black codecov @@ -17,7 +15,11 @@ deps = pytest-cov pytest-flake8 pytest-mypy -passenv = CI HYPOTHESIS_PROFILE TRAVIS TRAVIS_* +passenv = + CI + HYPOTHESIS_PROFILE + TRAVIS + TRAVIS_* whitelist_externals = poetry commands = pytest