Skip to content

Protocols in typing extensions #464

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

Merged
merged 35 commits into from
Sep 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1ebd3f5
Adapt Protocol and runtime from PR #417
ilevkivskyi Aug 19, 2017
37b6a7b
An attempt to fix missing failure on some versions
ilevkivskyi Aug 19, 2017
bb3a8a9
Fix missing import
ilevkivskyi Aug 19, 2017
d8ae30e
Fix another missing import
ilevkivskyi Aug 19, 2017
a4e68ff
And another missing import
ilevkivskyi Aug 19, 2017
c8076ee
Abandon attempts to support protocols in 3.5.0 and 3.5.1, see #195
ilevkivskyi Aug 19, 2017
80e8014
Attempt to keep support of 3.5.2
ilevkivskyi Aug 19, 2017
a6a631a
Hopefully last backward compatibility nit
ilevkivskyi Aug 19, 2017
5913fe6
Skip some irrelevant tests
ilevkivskyi Aug 19, 2017
faf4ff0
Conditionally add Protocol and runtime to __all__
ilevkivskyi Aug 19, 2017
c7f6b68
Tweaks following Jelle's comments
ilevkivskyi Aug 20, 2017
8151355
Allow Protocol tests on 3.5.1
ilevkivskyi Sep 2, 2017
76a7ecd
Fix constannt NO_PROTOCOL definition
ilevkivskyi Sep 2, 2017
95faebe
Add super() argument
ilevkivskyi Sep 2, 2017
04f1c51
Fix typo
ilevkivskyi Sep 2, 2017
ce4e04f
Fix super()
ilevkivskyi Sep 2, 2017
a7cf2fb
Fix super() second attemt
ilevkivskyi Sep 2, 2017
8b50c60
Attempt an alternative solution
ilevkivskyi Sep 2, 2017
1dc1971
Fix _gorg in typing 3.5.1
ilevkivskyi Sep 2, 2017
e25077f
Disable some tests for old-style generics and add one new instead
ilevkivskyi Sep 2, 2017
1c1d9fe
Add some tests as proposed by Michael
ilevkivskyi Sep 2, 2017
9b22594
More tests per Michael's CR; remove redundant extra; drop old-style c…
ilevkivskyi Sep 2, 2017
458b232
Fix _gorg on Python 2; add 3.6.2 to Travis
ilevkivskyi Sep 2, 2017
dbc6def
First part of Jukka's CR
ilevkivskyi Sep 2, 2017
31cbe0d
Second part of Jukka's CR: docstrings and comments
ilevkivskyi Sep 2, 2017
171b1e5
Update one comment in test
ilevkivskyi Sep 3, 2017
fc0ec94
Don't support issubclass() for protocols with non-method members
ilevkivskyi Sep 9, 2017
f1f478a
Add more tests
ilevkivskyi Sep 9, 2017
8652ced
Only apply the None rule to callable attributes on class
ilevkivskyi Sep 9, 2017
8f0a778
Add more tests
ilevkivskyi Sep 9, 2017
23e80da
Backport latest changes and tests on Python 2
ilevkivskyi Sep 9, 2017
dc01948
Fix lint
ilevkivskyi Sep 9, 2017
733016d
Fix Python 3.6+ tests
ilevkivskyi Sep 9, 2017
8f12689
One more Python 3.6+ fix
ilevkivskyi Sep 9, 2017
a4d397e
Address CR
ilevkivskyi Sep 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: python
python:
- "nightly"
- "3.7-dev"
- "3.6.2"
- "3.6.1"
- "3.6.0"
- "3.5.3"
Expand Down
5 changes: 4 additions & 1 deletion typing_extensions/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ able to take advantage of new types added to the ``typing`` module, such as

The ``typing_extensions`` module contains both backports of these changes
as well as experimental types that will eventually be added to the ``typing``
module.
module, such as ``Protocol`` (see PEP 544 for details about protocols and
static duck typing).

Users of other Python versions should continue to install and use
use the ``typing`` module from PyPi instead of using this one unless
Expand All @@ -40,6 +41,8 @@ All Python versions:
- ``NewType``
- ``NoReturn``
- ``overload`` (note that older versions of ``typing`` only let you use ``overload`` in stubs)
- ``Protocol`` (except on Python 3.5.0)
- ``runtime`` (except on Python 3.5.0)
- ``Text``
- ``Type``
- ``TYPE_CHECKING``
Expand Down
Loading