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

Avoid string types with ClassVar #602

Merged
merged 1 commit into from
Nov 15, 2021
Merged

Avoid string types with ClassVar #602

merged 1 commit into from
Nov 15, 2021

Commits on Nov 11, 2021

  1. Avoid string types with ClassVar

    As of Python 3.9.8, this does not work with Pydantic BaseModel, and
    does not work in a way that causes the whole module to fail to
    import.  See pydantic/pydantic#3401.
    
    In general, Pydantic does not work well with string types as enabled
    by from __future__ import annotations, which is why making that
    feature the default has been delayed.  See
    https://lwn.net/Articles/858576/ for more information.
    
    Fix this by removing from __future__ import annotations from the
    files using ClassVar and explicitly quote the type arguments that
    contain forward references (all of which are outside the scope of
    what Pydantic cares about).
    rra committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    90b8334 View commit details
    Browse the repository at this point in the history