eval-type-backport


Nameeval-type-backport JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/alexmojaki/eval_type_backport
SummaryLike `typing._eval_type`, but lets older Python versions use newer typing features.
upload_time2024-04-20 13:04:29
maintainerNone
docs_urlNone
authorAlex Hall
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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/23/ca/1601a9fa588867fe2ab6c19ed4c936929160d08a86597adf61bbd443fe57/eval_type_backport-0.2.0.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.0",
    "project_urls": {
        "Homepage": "https://github.com/alexmojaki/eval_type_backport"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "acacaa3d8e0acbcd71140420bc752d7c9779cf3a2a3bb1d7ef30944e38b2cd39",
                "md5": "dc07e5d068d0c3020461f0d554fba0f6",
                "sha256": "ac2f73d30d40c5a30a80b8739a789d6bb5e49fdffa66d7912667e2015d9c9933"
            },
            "downloads": -1,
            "filename": "eval_type_backport-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dc07e5d068d0c3020461f0d554fba0f6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5855,
            "upload_time": "2024-04-20T13:04:27",
            "upload_time_iso_8601": "2024-04-20T13:04:27.594105Z",
            "url": "https://files.pythonhosted.org/packages/ac/ac/aa3d8e0acbcd71140420bc752d7c9779cf3a2a3bb1d7ef30944e38b2cd39/eval_type_backport-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "23ca1601a9fa588867fe2ab6c19ed4c936929160d08a86597adf61bbd443fe57",
                "md5": "4972708c40f9b3a68b4acfe597e8192a",
                "sha256": "68796cfbc7371ebf923f03bdf7bef415f3ec098aeced24e054b253a0e78f7b37"
            },
            "downloads": -1,
            "filename": "eval_type_backport-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4972708c40f9b3a68b4acfe597e8192a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8977,
            "upload_time": "2024-04-20T13:04:29",
            "upload_time_iso_8601": "2024-04-20T13:04:29.278457Z",
            "url": "https://files.pythonhosted.org/packages/23/ca/1601a9fa588867fe2ab6c19ed4c936929160d08a86597adf61bbd443fe57/eval_type_backport-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-20 13:04:29",
    "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"
}
        
Elapsed time: 0.41763s