Skip to content

Fixing bug when installing bigml-chronos submodule#285

Closed
mmerce wants to merge 5 commits into
masterfrom
bugs
Closed

Fixing bug when installing bigml-chronos submodule#285
mmerce wants to merge 5 commits into
masterfrom
bugs

Conversation

@mmerce

@mmerce mmerce commented Nov 19, 2019

Copy link
Copy Markdown
Member

No description provided.

Comment thread bigml/__init__.py Outdated
Comment on lines +3 to +4
except ImportError:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

@unmonoqueteclea unmonoqueteclea Nov 20, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to these docs (https://packaging.python.org/guides/packaging-namespace-packages/#pkgutil-style-namespace-packages) [See the note at the end of the page] it seems that this is not needed, and it is not advisable.

The idea behind this was that in the rare case that setuptools isn’t available packages would fall-back to the pkgutil-style packages. This isn’t advisable because pkgutil and pkg_resources-style namespace packages are not cross-compatible. If the presence of setuptools is a concern then the package should just explicitly depend on setuptools via install_requires.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to remove it, and I could install both libraries without any problem with Python2 and Python3. It will only be a problem if setuptools is not installed. It would be a very uncommon case...

@unmonoqueteclea

Copy link
Copy Markdown
Contributor

We are using pkg_resources-style namespace packages. See comments in chronos PR to get more info.

@mmerce mmerce requested a review from jaor November 21, 2019 21:50
@mmerce

mmerce commented Nov 27, 2019

Copy link
Copy Markdown
Member Author

Closing this PR and opening another one to cherry-pick the commits that extend the ability to use an alternate URL for predictions.

@mmerce mmerce closed this Nov 27, 2019
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

Successfully merging this pull request may close these issues.

2 participants