eval-type-backport-0.3.1
توضیحات
Like `typing._eval_type`, but lets older Python versions use newer typing features.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | eval-type-backport-0.3.1 |
| نام | eval-type-backport |
| نسخه کتابخانه | 0.3.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Alex Hall |
| ایمیل نویسنده | alex.mojaki@gmail.com |
| آدرس صفحه اصلی | https://github.com/alexmojaki/eval_type_backport |
| آدرس اینترنتی | https://pypi.org/project/eval-type-backport/ |
| مجوز | MIT |
# eval_type_backport
[](https://github.com/alexmojaki/eval_type_backport/actions) [](https://coveralls.io/github/alexmojaki/eval_type_backport) [](https://pypi.python.org/pypi/eval_type_backport) [](https://anaconda.org/conda-forge/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.
Specifically, this transforms `X | Y` into `typing.Union[X, Y]`
and `list[X]` into `typing.List[X]` etc. (for all the types made generic in PEP 585)
if the original syntax is not supported in the current Python version.
## Install
From PyPI:
```shell
pip install eval-type-backport
```
or with Conda:
```shell
conda install -c conda-forge eval-type-backport
```
نیازمندی
| مقدار | نام |
|---|---|
| xtr | pytest; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl eval-type-backport-0.3.1:
pip install eval-type-backport-0.3.1.whl
نصب پکیج tar.gz eval-type-backport-0.3.1:
pip install eval-type-backport-0.3.1.tar.gz