This pull request adds a 'typing_exensions' subproject to 'typing'. The
'typing_extensions' module backports any new additions to 'typing'
for Python 3.5+ users who are using older versions of 'typing' that were
bundled with their standard library (and so can't update to the latest
versions). As well, it will contain new experimental features than could
eventually end up in 'typing'.
See https://github.com/python/typing/issues/435 for motivation and
additional context.
* Inline _geqv and _gorg
* Fix typo
* Cut MROs in half
* Avoid recursion on _gorg
* Fix lint
* Fxi lint (for realz)
* Refactor erasure logic to make it clearer (and probably faster)
* Remove redundant check
* Remove unnecessary comment
* Backport first part to Python 2
* Backport second part to Python 2
* Keep only obvious speed-ups and drop more aggressive optiomizations
* Fix _Protocol on Python 2
* Address CR
Our `setup.py` file explicitly throws an error when users try and
install typing for Python 3.0 through 3.2. In that case, it doesn't
seem like testing typing against Python 3.2 is worth it.
So that there is a way to type hint for a context manager even on
language versions before 3.6.
This is just copied from contextlib.AbstractContextManager in 3.6.
Fixes#274
* Add more tests based on coverage report
* Fix lint on PY2
* Simplify PR to only tests and tiny code clean-up
* Remove _right_ code on PY2
* Re-run Travis
* Add typing.Counter
Pretty much copied from deque.
* also add ChainMap
Only to the Python 3 version because ChainMap was added in 3.3.
* fix for 3.2
Apparently typing still supports 3.2
* fix flake8
* fix base class of Counter
* move counter below Dict
* clarify error message, add test
* allow instantiation
* fix reliance on type cache
* Added support to get_type_hints for builtin methods like object.__init__ or object.__str__ etc.
* Fixed tabs vs spaces -.-
* Changed the type check for builtin functions/methods to use the new types in the types module.
For now this requires a test-specific config while I plow through the warnings
that are specific to tests.
To test this actually does something, I fixed F821 by putting the fake names to
make flake8 happy. Hopefully you don't find this too terrible. The other
choice was to disable "undefined names" warnings entirely. I didn't want to do
that because I find them very useful.