Skip to content
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

not compatible with python 3.7 #71

Open
etam opened this issue Jul 10, 2018 · 10 comments
Open

not compatible with python 3.7 #71

etam opened this issue Jul 10, 2018 · 10 comments

Comments

@etam
Copy link

etam commented Jul 10, 2018

  [...]
  File ".../lib/python3.7/site-packages/enforce/__init__.py", line 1, in <module>
    from .decorators import runtime_validation
  File ".../lib/python3.7/site-packages/enforce/decorators.py", line 11, in <module>
    from .enforcers import apply_enforcer, Parameters, GenericProxy
  File ".../lib/python3.7/site-packages/enforce/enforcers.py", line 10, in <module>
    from .validator import init_validator, Validator
  File ".../lib/python3.7/site-packages/enforce/validator.py", line 4, in <module>
    from .parsers import get_parser
  File ".../lib/python3.7/site-packages/enforce/parsers.py", line 225, in <module>
    typing.TupleMeta: _parse_tuple,
AttributeError: module 'typing' has no attribute 'TupleMeta'

python/cpython@d911e40 made some Lib/typing.py internal refactoring

@fogg4444
Copy link

fogg4444 commented Oct 9, 2018

following

@ghost
Copy link

ghost commented Dec 13, 2018

They have fixed this in the issue you are reference, have you applied updates to enforce?

@tf42src
Copy link

tf42src commented Dec 17, 2018

Same here:

pip install git+https://github.com/RussBaz/enforce.git@dev
pip freeze | grep enforce
enforce==0.3.5
python --version
Python 3.7.0
future: <Task finished coro=<RabbitMQ._process_message() done, defined at /../rabbitmq.py:71> exception=AttributeError("module 'typing' has no attribute 'TupleMeta'")>
NoneType: None

@Twista
Copy link

Twista commented Mar 14, 2019

Hey,

is there any plan to make this 3.7 compatible?

thanks :)

@RussBaz
Copy link
Owner

RussBaz commented Mar 20, 2019

Well, I have a patch ready that will make it run on 3.7 but it will faill the tests as the structure of python typing internals is quuite different now from how it used to be. The most realistic approach is to rewrite without caring for earlier versions of python. At the moment, making it work on all versions is a serious pain.

I will release the patch some time later this month but I cannot guarantee that I will be able to make it work with 3.7+ any time soon without help.

The sheer number of corner cases which I did not know about when I wrote the first script has made the current codebase quite freightening. Without a huge number of tests it would have been impossibe.

@d33tah
Copy link

d33tah commented Jul 15, 2020

@RussBaz

Hi! Any updates on the issue?

@crypdick
Copy link

crypdick commented Oct 20, 2020

@d33tah might be worth looking into typeguard while the fix is in the works

@SamuelMarks
Copy link

I just started working on a new fork: https://github.com/SamuelMarks/enforce

Early days, but open to collaborators

(just worked on minor fixes, black, and replacing CI with GitHub Actions thus far)

[also can offer this back if @RussBaz wants]

@sg-s
Copy link

sg-s commented Dec 20, 2021

any update on this?

1 similar comment
@Masterxilo
Copy link

any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants