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

(google-cloud-vision) enum34 should not be installed on Python 3.4+ #3398

Closed
matrixl opened this issue May 11, 2017 · 8 comments
Closed

(google-cloud-vision) enum34 should not be installed on Python 3.4+ #3398

matrixl opened this issue May 11, 2017 · 8 comments
Assignees

Comments

@matrixl
Copy link

matrixl commented May 11, 2017

The enum34 breaks my code (python3.6), it is a known issue that enum34 doesn't work on Python 3.4+

Please refer to the discussion over here:
https://bitbucket.org/stoneleaf/enum34/issues/5/enum34-incompatible-with-python-35#comment-19462547

suggested fix in vision/setup.py

REQUIREMENTS = [
-    'enum34',
    'google-cloud-core >= 0.24.0, < 0.25dev',
    'gapic-google-cloud-vision-v1 >= 0.90.3, < 0.91dev',
]

+if sys.version_info < (3, 4):
+    # Backport of Python 3.4 enums to earlier versions
+   REQUIREMENTS.append('enum34')

setup(
    name='google-cloud-vision',
    version='0.24.0',
    description='Python Client for Google Cloud Vision',
    long_description=README,
    namespace_packages=[
        'google',
        'google.cloud',
    ],
    packages=find_packages(exclude=('tests*',)),
    install_requires=REQUIREMENTS,
    **SETUP_BASE
)
@dhermes
Copy link
Contributor

dhermes commented May 11, 2017

@matrixl Can you link to the known issue? Our unit tests run in Python 3.4, 3.5, 3.6 and our system tests run in 3.6 without any issue at all.

@matrixl
Copy link
Author

matrixl commented May 11, 2017

Here is the issue reported in other project.
donnemartin/saws#55

Also some discussion over here.
https://bitbucket.org/stoneleaf/enum34/issues/5/enum34-incompatible-with-python-35#comment-19462547

@dhermes
Copy link
Contributor

dhermes commented May 11, 2017

Both of this indicate that the incompatibility was resolved 2 years ago. Am I somehow misreading?

@matrixl
Copy link
Author

matrixl commented May 11, 2017

Yes, those issues have been fixed, but the way they fixed it is to only install enum34 with Python < 3.4.

donnemartin/saws@f109bc8

Here is the latest post in 2017.
https://bitbucket.org/stoneleaf/enum34/issues/19/enum34-isnt-compatible-with-python-36

Issue #19 WONTFIX
enum34 isn't compatible with python 3.6

It was tagged as "WONTFIX", so the only way to fix it is to only require it with Python < 3.4

@dhermes
Copy link
Contributor

dhermes commented May 11, 2017

Gotcha, thanks for digging @matrixl. So the issue isn't that our code is broken on it's own, just that it steps in front of import enum and stops you from using the newest features of enum?

@jonparrott WDYT of adding enum34;python_version<"3.4" in our requirements?

@theacodes
Copy link
Contributor

@dhermes I'm fine with that.

@tseaver
Copy link
Contributor

tseaver commented May 11, 2017

@matrixl If what you report is true, I don't understand how our system and unit tests could be working with enum34 unconditionally installed.

@dhermes
Copy link
Contributor

dhermes commented May 11, 2017

@tseaver He didn't say it doesn't work with our code, he said: "enum34 breaks my code (python3.6)".

The point is that enum34 steps in front of the native import enum and so users and up with the wrong package, and the backport one has fewer features.

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

No branches or pull requests

4 participants