Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.10 support #36

Merged
merged 3 commits into from
Apr 2, 2022
Merged

Add Python 3.10 support #36

merged 3 commits into from
Apr 2, 2022

Commits on Apr 2, 2022

  1. Add Python 3.10 to GitHub Actions workflows

    Beta releases of Python 3.10 were installed with `"3.10.0-beta - 3.10"`.
    Python 3.10 is now stable, so beta versions are no longer needed.
    
    Python versions in YAML must now be quoted. `3.10` is interpreted as a
    float and becomes `3.1`, so `"3.10"` must be used instead.
    br3ndonland committed Apr 2, 2022
    Configuration menu
    Copy the full SHA
    1fbcdeb View commit details
    Browse the repository at this point in the history
  2. Use Python 3.10 as default version in Dockerfile

    The Python version can be customized by using a Docker build argument,
    such as `--build-arg PYTHON_VERSION=3.9`.
    br3ndonland committed Apr 2, 2022
    Configuration menu
    Copy the full SHA
    760c071 View commit details
    Browse the repository at this point in the history
  3. Update type annotations for Python 3.10

    This commit will update type annotation syntax for Python 3.10. The
    project currently also supports Python 3.8 and 3.9, so the annotations
    are imported with `from __future__ import annotations`.
    
    The Python 3.10 union operator (the pipe, like `str | None`) will not be
    used on pydantic models. If running Python 3.9 or below, pydantic is not
    compatible with the union operator, even if annotations are imported
    with `from __future__ import annotations`.
    
    https://peps.python.org/pep-0604/
    https://docs.python.org/3/whatsnew/3.10.html
    pydantic/pydantic#2597 (comment)
    pydantic/pydantic#2609 (comment)
    pydantic/pydantic#3300 (comment)
    br3ndonland committed Apr 2, 2022
    Configuration menu
    Copy the full SHA
    f3fd95d View commit details
    Browse the repository at this point in the history