Skip to content

Commit c144eea

Browse files
authored
typing_extensions: Drop Python 2.7, modernize build (python#931)
* Drop Python 2.7 support -- tests, linting * Adopt pyproject.toml and a build backend (flit) * Add Python 3.7+ types to README.rst
1 parent 388a59d commit c144eea

File tree

4 files changed

+76
-60
lines changed

4 files changed

+76
-60
lines changed

README.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This module currently contains the following:
5050
- ``Literal``
5151
- ``NewType``
5252
- ``NoReturn``
53-
- ``overload`` (note that older versions of ``typing`` only let you use ``overload`` in stubs)
53+
- ``overload``
5454
- ``OrderedDict``
5555
- ``ParamSpec``
5656
- ``ParamSpecArgs``
@@ -64,6 +64,14 @@ This module currently contains the following:
6464
- ``TypeGuard``
6565
- ``TYPE_CHECKING``
6666

67+
Python 3.7+
68+
-----------
69+
70+
- ``get_origin``
71+
- ``get_args``
72+
- ``get_type_hints``
73+
74+
6775
Other Notes and Limitations
6876
===========================
6977

pyproject.toml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Build system requirements.
2+
[build-system]
3+
requires = ["flit_core >=3.4,<4"]
4+
build-backend = "flit_core.buildapi"
5+
6+
# Project metadata
7+
[project]
8+
name = "typing_extensions"
9+
version = "4.0.0-pre"
10+
description = "Backported and Experimental Type Hints for Python 3.6+"
11+
readme.text = """\
12+
Typing Extensions -- Backported and Experimental Type Hints for Python
13+
14+
The ``typing`` module was added to the standard library in Python 3.5, but
15+
many new features have been added to the module since then.
16+
This means users of older Python versions who are unable to upgrade will not be
17+
able to take advantage of new types added to the ``typing`` module, such as
18+
``typing.Protocol`` or ``typing.TypedDict``.
19+
20+
The ``typing_extensions`` module contains backports of these changes.
21+
Experimental types that may eventually be added to the ``typing``
22+
module are also included in ``typing_extensions``.
23+
"""
24+
readme.content-type = "text/x-rst"
25+
requires-python = ">=3.6"
26+
urls.Home = "https://github.com/python/typing/blob/master/typing_extensions/README.rst"
27+
license.file = "LICENSE"
28+
keywords = [
29+
"annotations",
30+
"backport",
31+
"checker",
32+
"checking",
33+
"function",
34+
"hinting",
35+
"hints",
36+
"type",
37+
"typechecking",
38+
"typehinting",
39+
"typehints",
40+
"typing"
41+
]
42+
# Classifiers list: https://pypi.org/classifiers/
43+
classifiers = [
44+
"Development Status :: 3 - Alpha",
45+
"Environment :: Console",
46+
"Intended Audience :: Developers",
47+
"License :: OSI Approved :: Python Software Foundation License",
48+
"Operating System :: OS Independent",
49+
"Programming Language :: Python :: 3",
50+
"Programming Language :: Python :: 3 :: Only",
51+
"Programming Language :: Python :: 3.6",
52+
"Programming Language :: Python :: 3.7",
53+
"Programming Language :: Python :: 3.8",
54+
"Programming Language :: Python :: 3.9",
55+
"Programming Language :: Python :: 3.10",
56+
"Topic :: Software Development"
57+
]
58+
59+
# Project metadata -- authors. Flit stores this as a list of dicts, so it can't
60+
# be inline above.
61+
[[project.authors]]
62+
name = "Guido van Rossum, Jukka Lehtosalo, Łukasz Langa, Michael Lee"
63+
64+
65+
# This tells Flit that the module is stored in the src_py3 directory.
66+
[tool.flit.module]
67+
name = "src_py3/typing_extensions"

setup.cfg

Lines changed: 0 additions & 6 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)