s-knibbs / dataclasses-jsonschema

JSON schema generation from dataclasses
MIT License
166 stars 38 forks source link

Support Python 3.9 #143

Closed s-knibbs closed 3 years ago

s-knibbs commented 3 years ago

Add python 3.9 to CI / tox and fix any issues found

tirkarthi commented 3 years ago

I don't see any test failures in Python 3.9

tox -e py39                   
GLOB sdist-make: /root/checked_repos/dataclasses-jsonschema/setup.py
py39 create: /root/checked_repos/dataclasses-jsonschema/.tox/py39
py39 installdeps: pytest, pytest-ordering, flake8, mypy, apispec[yaml], apispec_webframeworks, flask
py39 inst: /root/checked_repos/dataclasses-jsonschema/.tox/.tmp/package/1/dataclasses-jsonschema-2.13.0.zip
py39 installed: apispec==4.0.0,apispec-webframeworks==0.5.2,attrs==20.2.0,click==7.1.2,dataclasses-jsonschema @ file:///root/checked_repos/dataclasses-jsonschema/.tox/.tmp/package/1/dataclasses-jsonschema-2.13.0.zip,flake8==3.8.4,Flask==1.1.2,iniconfig==1.0.1,itsdangerous==1.1.0,Jinja2==2.11.2,jsonschema==3.2.0,MarkupSafe==1.1.1,mccabe==0.6.1,mypy==0.790,mypy-extensions==0.4.3,packaging==20.4,pluggy==0.13.1,py==1.9.0,pycodestyle==2.6.0,pyflakes==2.2.0,pyparsing==2.4.7,pyrsistent==0.17.3,pytest==6.1.1,pytest-ordering==0.6,python-dateutil==2.8.1,PyYAML==5.3.1,six==1.15.0,toml==0.10.1,typed-ast==1.4.1,typing-extensions==3.7.4.3,Werkzeug==1.0.1
py39 run-test-pre: PYTHONHASHSEED='2706771212'
py39 run-test: commands[0] | pytest tests
========================================================================= test session starts ==========================================================================
platform linux -- Python 3.9.0, pytest-6.1.1, py-1.9.0, pluggy-0.13.1
cachedir: .tox/py39/.pytest_cache
rootdir: /root/checked_repos/dataclasses-jsonschema
plugins: ordering-0.6
collected 39 items                                                                                                                                                     

tests/test_core.py ......................................                                                                                                        [ 97%]
tests/test_apispec_plugin.py .                                                                                                                                   [100%]

=========================================================================== warnings summary ===========================================================================
tests/test_apispec_plugin.py:140
  /root/checked_repos/dataclasses-jsonschema/tests/test_apispec_plugin.py:140: PytestUnknownMarkWarning: Unknown pytest.mark.last - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
    @pytest.mark.last

tests/test_core.py::test_any_type_schema
  /root/checked_repos/dataclasses-jsonschema/dataclasses_jsonschema/__init__.py:680: UserWarning: Unable to create schema for 'Any'
    warnings.warn(f"Unable to create schema for '{field_type_name}'")

-- Docs: https://docs.pytest.org/en/stable/warnings.html
==================================================================== 39 passed, 2 warnings in 0.89s ====================================================================
py39 run-test: commands[1] | flake8 dataclasses_jsonschema
py39 run-test: commands[2] | mypy dataclasses_jsonschema
Success: no issues found in 4 source files
_______________________________________________________________________________ summary ________________________________________________________________________________
  py39: commands succeeded
  congratulations :)