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

Clean-up typing_extensions -- meta #931

Merged
merged 4 commits into from Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions .flake8
@@ -1,7 +1,5 @@
[flake8]

# fake builtins for python2/*
builtins = basestring, unicode
max-line-length = 90
ignore =
# irrelevant plugins
Expand Down
2 changes: 0 additions & 2 deletions .flake8-tests
Expand Up @@ -6,8 +6,6 @@
# This will be possibly merged in the future.

[flake8]
# fake builtins for python2/*
builtins = basestring, unicode
max-line-length = 100
ignore =
# temporary ignores until we sort it out
Expand Down
15 changes: 6 additions & 9 deletions CONTRIBUTING.md
Expand Up @@ -18,7 +18,7 @@ standard library, so that users can experiment with them before they are added t
standard library. Such features should ideally already be specified in a PEP or draft
PEP.

`typing_extensions` supports Python versions 3.6 an up.
`typing_extensions` supports Python versions 3.6 and up.

# Versioning scheme

Expand All @@ -30,17 +30,14 @@ backwards-incompatible changes.

- Ensure that GitHub Actions reports no errors.

- Update the version number in `setup.py`.
- Update the version number in `pyproject.toml`.

- Build the source and wheel distributions:

- `pip3 install -U setuptools wheel`
- `pip2 install -U setuptools wheel`
- `rm -rf dist/ build/`
- `python3 setup.py sdist bdist_wheel`
- `rm -rf build/` (Works around
`a Wheel bug <https://bitbucket.org/pypa/wheel/issues/147/bdist_wheel-should-start-by-cleaning-up>`\_)
- `python2 setup.py bdist_wheel`
- `pip3 install -U flit`
- `cd typing_extensions`
- `rm -rf dist/`
- `flit build --no-setup-py`

- Install the built distributions locally and test (if you were using `tox`, you already
tested the source distribution).
Expand Down
9 changes: 4 additions & 5 deletions test-requirements.txt
@@ -1,5 +1,4 @@
flake8; python_version >= '3.6'
flake8-bugbear; python_version >= '3.6'
flake8-pyi; python_version >= '3.6'
pytest==4.6.11; python_version < '3.0'
pytest; python_version >= '3.0'
flake8
flake8-bugbear
flake8-pyi
pytest
10 changes: 9 additions & 1 deletion typing_extensions/README.rst
Expand Up @@ -50,7 +50,7 @@ This module currently contains the following:
- ``Literal``
- ``NewType``
- ``NoReturn``
- ``overload`` (note that older versions of ``typing`` only let you use ``overload`` in stubs)
- ``overload``
- ``OrderedDict``
- ``ParamSpec``
- ``ParamSpecArgs``
Expand All @@ -64,6 +64,14 @@ This module currently contains the following:
- ``TypeGuard``
- ``TYPE_CHECKING``

Python 3.7+
-----------

- ``get_origin``
- ``get_args``
- ``get_type_hints``


Other Notes and Limitations
===========================

Expand Down
67 changes: 67 additions & 0 deletions typing_extensions/pyproject.toml
@@ -0,0 +1,67 @@
# Build system requirements.
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"

# Project metadata
[project]
name = "typing_extensions"
version = "4.0.0-pre"
description = "Backported and Experimental Type Hints for Python 3.6+"
readme.text = """\
Typing Extensions -- Backported and Experimental Type Hints for Python

The ``typing`` module was added to the standard library in Python 3.5, but
many new features have been added to the module since then.
This means users of older Python versions who are unable to upgrade will not be
able to take advantage of new types added to the ``typing`` module, such as
``typing.Protocol`` or ``typing.TypedDict``.

The ``typing_extensions`` module contains backports of these changes.
Experimental types that may eventually be added to the ``typing``
module are also included in ``typing_extensions``.
"""
readme.content-type = "text/x-rst"
requires-python = ">=3.6"
urls.Home = "https://github.com/python/typing/blob/master/typing_extensions/README.rst"
license.file = "LICENSE"
keywords = [
"annotations",
"backport",
"checker",
"checking",
"function",
"hinting",
"hints",
"type",
"typechecking",
"typehinting",
"typehints",
"typing"
]
# Classifiers list: https://pypi.org/classifiers/
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Python Software Foundation License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development"
]

# Project metadata -- authors. Flit stores this as a list of dicts, so it can't
# be inline above.
[[project.authors]]
name = "Guido van Rossum, Jukka Lehtosalo, Łukasz Langa, Michael Lee"
email = "levkivskyi@gmail.com"

# This tells Flit that the module is stored in the src_py3 directory.
[tool.flit.module]
name = "src_py3/typing_extensions"
6 changes: 0 additions & 6 deletions typing_extensions/setup.cfg

This file was deleted.

53 changes: 0 additions & 53 deletions typing_extensions/setup.py

This file was deleted.