Stewori / pytypes

Typing-toolbox for Python 3 _and_ 2.7 w.r.t. PEP 484.
Apache License 2.0
200 stars 20 forks source link

Delete conditional imports for backports.typing #94

Closed dbarnett closed 4 years ago

dbarnett commented 4 years ago

This backports.typing package has been deleted by the author, so the imports will just always fail and cause unnecessary clutter/complexity.

Fixes #93.

Stewori commented 4 years ago

For some (strange) reason this PR causes a failing test. There is no obvious relation between the failure and the changes. I agree the changes are just cleanup and shouldn't make a difference at all. Yet, here we are and have a failing test. Only way I see is to track this down by divide and conquer. I will investigate it a bit...

Stewori commented 4 years ago

The blank line strangely provokes a failure of _check_caller_type in a kind of unrelated test. This requires deeper investigation and I am going to open a new issue to track this. _check_caller_type performs some magic to locate its caller method and class, including looking into the stack and code objects. I don't remember every detail but something must be sensitive to a code line in an unexpected way. Obviously this shouldn't be, but right now I can just guess.

For sake of getting this PR done, please just add the blank line as explained to make tests pass.