Like `typing._eval_type`, but lets older Python versions use newer typing features.
Project description
eval_type_backport
This is a tiny package providing a replacement for typing._eval_type
to support newer typing features in older Python versions.
Yes, that's very specific, and yes, typing._eval_type
is a protected function that you shouldn't normally be using. Really this package is specifically made for https://github.com/pydantic/pydantic/issues/7873.
Currently, it allows unions to be written like int | str
which is normally only supported in Python 3.10+.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for eval_type_backport-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aa0d990e642af9d8f9480c84dcaeabaaef83207bdcf5cb018706db6bb77d692 |
|
MD5 | 761ec22b1751c7b70d9d8d51cee92bf8 |
|
BLAKE2b-256 | cb798f6a58b9329da56d2374d9fda17469d6eeaf432f99bebc723fa811c1463b |