Skip to content

Commit 6987247

Browse files
committed
Convert readme to RST format; adjust text
1 parent 67a20cb commit 6987247

File tree

3 files changed

+103
-78
lines changed

3 files changed

+103
-78
lines changed

typing_extensions/README.md

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

typing_extensions/README.rst

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
=================
2+
Typing Extensions
3+
=================
4+
5+
.. image:: https://badges.gitter.im/python/typing.svg
6+
:alt: Chat at https://gitter.im/python/typing
7+
:target: https://gitter.im/python/typing?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
8+
9+
Overview
10+
========
11+
12+
The ``typing_extensions`` module contains both backports of changes made to
13+
the ``typing`` module since Python 3.5.0 as well as experimental types that
14+
will be eventually added to the ``typing`` module once stabilized.
15+
16+
This module is intended to be used by people who:
17+
18+
1. Are using Python 3.5+ and cannot upgrade to newer versions of Python.
19+
Since the ``typing`` module was (provisionally) added to the Python standard
20+
library in 3.5, users who are unable to upgrade cannot take advantage of
21+
new additions to typing such as ``typing.Text`` or ``typing.Coroutine``.
22+
2. Are interested in using experimental additions to the ``typing`` module.
23+
24+
Users of other Python versions should continue to install and use
25+
use the ``typing`` module from PyPi instead of using this one unless
26+
specifically writing code that must be compatible with multiple Python
27+
versions or requires experimental types.
28+
29+
Included items
30+
==============
31+
32+
This module currently contains the following:
33+
34+
All Python versions:
35+
--------------------
36+
37+
- ``ClassVar``
38+
- ``Collection``
39+
- ``ContextManager``
40+
- ``Counter``
41+
- ``DefaultDict``
42+
- ``Deque``
43+
- ``NewType``
44+
- ``NoReturn``
45+
- ``overload`` (note that older versions of ``typing`` only let you use ``overload`` in stubs)
46+
- ``Text``
47+
- ``Type``
48+
- ``TYPE_CHECKING``
49+
50+
Python 3.3+ only:
51+
-----------------
52+
53+
- ``ChainMap``
54+
55+
Python 3.5+ only:
56+
-----------------
57+
58+
- ``AsyncIterable``
59+
- ``AsyncIterator``
60+
- ``AsyncContextManager``
61+
- ``Awaitable``
62+
- ``Coroutine``
63+
64+
Python 3.6+ only:
65+
-----------------
66+
67+
- ``AsyncGenerator``
68+
69+
Other Notes and Limitations
70+
===========================
71+
72+
There are a few types whose interface was modified between different
73+
versions of typing. For example, ``typing.Sequence`` was modified to
74+
subclass ``typing.Reversible`` as of Python 3.5.3.
75+
76+
These changes are _not_ backported to prevent subtle compatibility
77+
issues when mixing the differing implementations of modified classes.
78+
79+
Running tests
80+
=============
81+
82+
To run tests, navigate into the appropriate source directory and run
83+
``test_typing_extensions.py``. You will also need to install the latest
84+
version of ``typing`` if you are using a version of Python that does not
85+
include ``typing`` as a part of the standard library.
86+

typing_extensions/setup.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,26 @@
1010
exit(1)
1111

1212
version = '3.6.1'
13-
description = 'Type Hint backports for Python 3.5+'
13+
description = 'Backported and Experimental Type Hints for Python 3.5+'
1414
long_description = '''\
15-
Typing -- Type Hints for Python
15+
Typing Extensions -- Backported and Experimental Type Hints for Python
1616
17-
This is a backport of the 'typing' module, which was provisionally added
18-
to the standard library in Python 3.5. The provisional status will be
19-
liftend in Python 3.7, but people who are using Python 3.5 - 3.6 and are
20-
unable to upgrade cannot take advantage of some new additions to the typing
21-
library, such as typing.Text or typing.Coroutine.
17+
This module contains both backports of changes made to the ``typing``
18+
module since Python 3.5.0 as well as experimental types that will be
19+
eventually added to the ``typing`` module once stabilized.
2220
23-
This module allows those users to use the latest additions to the typing
24-
module without worrying about naming conflicts with the standard library.
25-
Users of Python 2.7, 3.3, and 3.4 should install the typing module
26-
from PyPi and use that directly, except when writing code that needs to
27-
be compatible across multiple versions of Python.
21+
This module is intended to be used by people who:
22+
23+
1. Are using Python 3.5+ and cannot upgrade to newer versions of Python.
24+
Since the ``typing`` module was (provisionally) added to the Python standard
25+
library in 3.5, users who are unable to upgrade cannot take advantage of
26+
new additions to typing such as ``typing.Text`` or ``typing.Coroutine``.
27+
2. Are interested in using experimental additions to the ``typing`` module.
28+
29+
Users of other Python versions should continue to install and use
30+
use the ``typing`` module from PyPi instead of using this one unless
31+
specifically writing code that must be compatible with multiple Python
32+
versions or requires experimental types.
2833
'''
2934

3035
classifiers = [

0 commit comments

Comments
 (0)