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

[python] pulsar-client@2.5.2's dep on enum34@1.1.9 may break build systems #7050

Closed
curtiscook opened this issue May 27, 2020 · 5 comments · Fixed by #8213
Closed

[python] pulsar-client@2.5.2's dep on enum34@1.1.9 may break build systems #7050

curtiscook opened this issue May 27, 2020 · 5 comments · Fixed by #8213
Labels
help wanted release/2.5.3 type/bug The PR fixed a bug or issue reported a bug

Comments

@curtiscook
Copy link

Enum34 appears to have had a regression of the below issue in 1.1.9 https://bitbucket.org/stoneleaf/enum34/issues/31/make-the-install-a-noop-on-python36

This breaks builds due to AttributeError: module 'enum' has no attribute 'IntFlag'

Related poetry issue: python-poetry/poetry#1122 (comment)

Suggest using enum34@1.1.8 until this is fixed

@sijie
Copy link
Member

sijie commented May 27, 2020

@curtiscook since you have already found the issue, are you interested in submitting a pull request to address the issue?

@curtiscook
Copy link
Author

I looked into this, and it appears that 1.1.8 has a breaking change for python27, which caused the 1.1.9 upgrade. #6401

I think maybe the best course of action is to leave this as-is and hope that enum34 fixes their bug soon.

In the interim, maybe we keep this issue open for visibility and close it once enum34 fixes their library? It appears to only directly affect package managers (I was able to directly pip install without issue). Additionally should be able to setup.py only requires enum34 during a python2 install

@curtiscook
Copy link
Author

It looks like it's possible to work around this issue by upgrading pip. Going to close it

@languitar
Copy link
Contributor

languitar commented Oct 7, 2020

This issue also make downstream projects based on poetry fail. The recommended way to fix this (discussed in this issue) is by declaring the dependency with an environment marker in setup.py to ensure that enum34 is only pulled into the dependency tree when it is really needed.

sijie pushed a commit that referenced this issue Oct 13, 2020
Fixes #7050 

### Motivation

To prevent installing enum34 on systems where it is not needed, declare the dependency with environment markers. Installing certain versions of enum34 on systems where it is not needed at all, might result in compile time issues. This is the recommended approach discussed here:
python-poetry/poetry#1122

### Modifications

* `setup.py`: use environment markers for enum34 instead of custom logic that is not preserved in pypi metadata for the wheel
@coryvirok
Copy link

For anyone else looking for a fix:

I use poetry + pulsar-client and was able to get around this issue by first running pip install --upgrade pip followed by poetry install.

wolfstudy pushed a commit that referenced this issue Oct 30, 2020
Fixes #7050 

### Motivation

To prevent installing enum34 on systems where it is not needed, declare the dependency with environment markers. Installing certain versions of enum34 on systems where it is not needed at all, might result in compile time issues. This is the recommended approach discussed here:
python-poetry/poetry#1122

### Modifications

* `setup.py`: use environment markers for enum34 instead of custom logic that is not preserved in pypi metadata for the wheel

(cherry picked from commit edf0944)
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this issue Nov 13, 2020
Fixes apache#7050 

### Motivation

To prevent installing enum34 on systems where it is not needed, declare the dependency with environment markers. Installing certain versions of enum34 on systems where it is not needed at all, might result in compile time issues. This is the recommended approach discussed here:
python-poetry/poetry#1122

### Modifications

* `setup.py`: use environment markers for enum34 instead of custom logic that is not preserved in pypi metadata for the wheel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted release/2.5.3 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants