# eval_type_backport
[![Build Status](https://github.com/alexmojaki/eval_type_backport/workflows/Tests/badge.svg)](https://github.com/alexmojaki/eval_type_backport/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/eval_type_backport/badge.svg)](https://coveralls.io/github/alexmojaki/eval_type_backport) [![Supports Python versions 3.8+, including PyPy](https://img.shields.io/pypi/pyversions/eval_type_backport.svg)](https://pypi.python.org/pypi/eval_type_backport) [![Anaconda's conda-forge channel](https://anaconda.org/conda-forge/eval-type-backport/badges/version.svg)](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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/alexmojaki/eval_type_backport",
"name": "eval-type-backport",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Alex Hall",
"author_email": "alex.mojaki@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/30/ea/8b0ac4469d4c347c6a385ff09dc3c048c2d021696664e26c7ee6791631b5/eval_type_backport-0.2.2.tar.gz",
"platform": null,
"description": "# eval_type_backport\n\n[![Build Status](https://github.com/alexmojaki/eval_type_backport/workflows/Tests/badge.svg)](https://github.com/alexmojaki/eval_type_backport/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/eval_type_backport/badge.svg)](https://coveralls.io/github/alexmojaki/eval_type_backport) [![Supports Python versions 3.8+, including PyPy](https://img.shields.io/pypi/pyversions/eval_type_backport.svg)](https://pypi.python.org/pypi/eval_type_backport) [![Anaconda's conda-forge channel](https://anaconda.org/conda-forge/eval-type-backport/badges/version.svg)](https://anaconda.org/conda-forge/eval-type-backport)\n\nThis is a tiny package providing a replacement for `typing._eval_type` to support newer typing features in older Python versions.\n\nYes, 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.\n\nSpecifically, this transforms `X | Y` into `typing.Union[X, Y]`\nand `list[X]` into `typing.List[X]` etc. (for all the types made generic in PEP 585)\nif the original syntax is not supported in the current Python version.\n\n## Install\n\nFrom PyPI:\n\n```shell\npip install eval-type-backport\n```\n\nor with Conda:\n\n```shell\nconda install -c conda-forge eval-type-backport\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Like `typing._eval_type`, but lets older Python versions use newer typing features.",
"version": "0.2.2",
"project_urls": {
"Homepage": "https://github.com/alexmojaki/eval_type_backport"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ce3155cd413eaccd39125368be33c46de24a1f639f2e12349b0361b4678f3915",
"md5": "27ba9a48f8dc9c9558a0de90e8a3fe04",
"sha256": "cb6ad7c393517f476f96d456d0412ea80f0a8cf96f6892834cd9340149111b0a"
},
"downloads": -1,
"filename": "eval_type_backport-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "27ba9a48f8dc9c9558a0de90e8a3fe04",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5830,
"upload_time": "2024-12-21T20:09:44",
"upload_time_iso_8601": "2024-12-21T20:09:44.175458Z",
"url": "https://files.pythonhosted.org/packages/ce/31/55cd413eaccd39125368be33c46de24a1f639f2e12349b0361b4678f3915/eval_type_backport-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "30ea8b0ac4469d4c347c6a385ff09dc3c048c2d021696664e26c7ee6791631b5",
"md5": "681abe22983ba0c332f4c538634e9b67",
"sha256": "f0576b4cf01ebb5bd358d02314d31846af5e07678387486e2c798af0e7d849c1"
},
"downloads": -1,
"filename": "eval_type_backport-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "681abe22983ba0c332f4c538634e9b67",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9079,
"upload_time": "2024-12-21T20:09:46",
"upload_time_iso_8601": "2024-12-21T20:09:46.005964Z",
"url": "https://files.pythonhosted.org/packages/30/ea/8b0ac4469d4c347c6a385ff09dc3c048c2d021696664e26c7ee6791631b5/eval_type_backport-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-21 20:09:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "alexmojaki",
"github_project": "eval_type_backport",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "eval-type-backport"
}