Skip to content
This repository was archived by the owner on Jun 9, 2020. It is now read-only.

Fix IPython requirement for Python 2#90

Closed
thanatos wants to merge 1 commit intorkern:masterfrom
thanatos:master
Closed

Fix IPython requirement for Python 2#90
thanatos wants to merge 1 commit intorkern:masterfrom
thanatos:master

Conversation

@thanatos
Copy link
Copy Markdown

IPython recently released IPython 6.0.0, which dropped support for Python 2. Modify setup.py to depend on IPython versions old than 6.0.0 for Python 2 (i.e., those versions which still support Python 2); keep the behavior unchanged for Python 3.

Fixes #89

IPython recently released IPython 6.0.0, which dropped support for Python 2.
Modify setup.py to depend on IPython versions old than 6.0.0 for Python 2
(i.e., those versions which still support Python 2); keep the behavior
unchanged for Python 3.
@rkern
Copy link
Copy Markdown
Owner

rkern commented May 12, 2017

IPython should not have been made a requirement. That would be the thing to fix.

@thanatos
Copy link
Copy Markdown
Author

I'm not intimately familiar with the codebase; that's a bigger change than I was looking to make. Are you saying that it could/should be torn out? (Wouldn't that break anyone depending on it?)

(My aim was simply to get the project functional under Python 2, again, not to add/remove features.)

@rkern
Copy link
Copy Markdown
Owner

rkern commented May 15, 2017

The functionality should be available for people who are using IPython but not unconditionally required for people who are not using IPython. I.e. there should be no imports from the IPython package at the top level. This used to be the case when the %lprun magic was defined by a function rather than a class.

@thanatos
Copy link
Copy Markdown
Author

thanatos commented May 20, 2017

If I get some more free time, I'll certainly consider that. Nonetheless, I think this PR is still a step in the right direction; presently, the package is broken for Python 2 users (by way of having a dependency on a Python3-only import) and that having the package install at all would be more pragmatic than trying to fix a subfeature to work conditionally in the short-term.

Edit: so, it seems that the latest pip and PyPI may include a signal to not install the latest IPython, despite the requirements section somewhat signalling that, and might do the right thing. I'll have to re-evaluate if that could work for us (we'd need to ensure pip is upgraded everywhere…) In this manner, this PR may be obsolete.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants