Skip to content

Use enum34 when running tests on pre-3.4 Python versions #742

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

Closed
JukkaL opened this issue Aug 10, 2015 · 6 comments
Closed

Use enum34 when running tests on pre-3.4 Python versions #742

JukkaL opened this issue Aug 10, 2015 · 6 comments

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Aug 10, 2015

Currently enum is treated Python 3.4 only.

@berdario
Copy link

berdario commented Oct 1, 2015

If I understand this correctly, this also means that the stub won't be used in Python3.5

@o11c
Copy link
Contributor

o11c commented Oct 1, 2015

@berdario the internal logic, just checks whether the name is enum.Enum, so if the stub is found it will work. Might also want to change the testsuite bits though.

@berdario
Copy link

berdario commented Oct 1, 2015

I see. I'm not sure if the stub is correctly found then.

I wrote a small project to try out mypy, now that typing is in the stdlib, and I had to add a couple of ugly Any type declarations to get it to type check:

https://github.com/berdario/resumable-urlretrieve/blob/faa631f/resumable/__init__.py#L28-L29

Aside from that, it works quite well, and I even got travis-ci to run mypyat every commit to type check the module :D

@o11c
Copy link
Contributor

o11c commented Oct 1, 2015

I don't think mypy is fully compatible with the stdlib's typing yet, I haven't been following that closely though.

@gvanrossum gvanrossum removed the task label Jan 6, 2017
@JelleZijlstra
Copy link
Member

I think this is a typeshed issue now, but we still need enum34 stubs in typeshed.

@JukkaL
Copy link
Collaborator Author

JukkaL commented Jul 3, 2017

Apparently enum34 just installs enum, so making the current typeshed stubs available for all Python versions might be good enough. However, this issue is no longer relevant since we no longer use typeshed stubs for enum in mypy tests.

@JukkaL JukkaL closed this as completed Jul 3, 2017
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

5 participants