RussBaz / enforce

Python 3.5+ runtime type checking for integration testing and data validation
543 stars 21 forks source link

Have you tested with the new typing.py yet? #30

Closed gvanrossum closed 7 years ago

gvanrossum commented 7 years ago

While Python 3.6 is in beta we're changing the way typing.py represents types. I can't make any promises that it'll stay stable until the 4th beta (after all PEP 484 is still provisional) but I figured I should give you a heads up that we're changing things around. You can follow the fun in our repo: https://github.com/python/typing/

TheDataLeek commented 7 years ago

As of this afternoon (since I finally got around to installing 3.6), enforce does not work with Python 3.6. Attached is stack trace of import error. I'll start digging deeper in the next few days and see what's changed and where the problems lie.

┬─[william@fillory:~]─[04:07:44 PM]
╰─>$ python3.6
Python 3.6.0 (default, Dec 24 2016, 08:03:08) 
[GCC 6.2.1 20160830] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import enforce
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/william/.local/lib/python3.6/site-packages/enforce/__init__.py", line 1, in <module>
    from .decorators import runtime_validation
  File "/home/william/.local/lib/python3.6/site-packages/enforce/decorators.py", line 9, in <module>
    from .enforcers import apply_enforcer, Parameters, GenericProxy
  File "/home/william/.local/lib/python3.6/site-packages/enforce/enforcers.py", line 7, in <module>
    from .types import EnhancedTypeVar, is_type_of_type
  File "/home/william/.local/lib/python3.6/site-packages/enforce/types.py", line 5, in <module>
    from typing import Optional, Union, UnionMeta, Any, TypeVar, Tuple, Generic
ImportError: cannot import name 'UnionMeta'
>>> 
RussBaz commented 7 years ago

Thank you. The latest version of Enforce.py now also works with Python version 3.6.0.

By the way, is there a single page changelog for the typing module anywhere? It is quite tedious to catch all the API changes through manual testing.

gvanrossum commented 7 years ago

The commit log on the Python/typing repo should cover it.

--Guido (mobile)

On Jan 29, 2017 10:04 AM, "RussBaz" notifications@github.com wrote:

Closed #30 https://github.com/RussBaz/enforce/issues/30.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RussBaz/enforce/issues/30#event-940611905, or mute the thread https://github.com/notifications/unsubscribe-auth/ACwrMnmVQS6VvVStwp5QopYbQm4zwfgiks5rXNSxgaJpZM4KjDLX .