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

IPython 5 with prompt_toolkit 2 #11341

Closed
hroncok opened this issue Sep 28, 2018 · 4 comments
Closed

IPython 5 with prompt_toolkit 2 #11341

hroncok opened this issue Sep 28, 2018 · 4 comments

Comments

@hroncok
Copy link
Contributor

hroncok commented Sep 28, 2018

Hello,

in Fedora, we are discussing to update prompt_toolik to 2.x in order to update our (Python 3 only) ipython package to 7. However we also have python2-ipython (version 5) that would most likely get broken by the upgrade.

IPython 5.x explicitly says:

'prompt_toolkit>=1.0.4,<2.0.0',

Is this something that might eventually change?

Would IPython 5.x ever work with prompt_toolkit 2.x? I.e. would a PR be accepted in that branch?

Thanks for info.

See also https://python-prompt-toolkit.readthedocs.io/en/stable/pages/upgrading.html

cc @carlwgeorge

@Carreau
Copy link
Member

Carreau commented Sep 29, 2018

A couple of questions first:

update prompt_toolik to 2.x

Both on your python2- and python3- packages ? Do you have any other reasons to update to ptk 2.x for Python 2 ? Aren't the site_packages separated ? (sorry if these are dumb questions, i'm not familiar with fedora.

Would IPython 5.x ever work with prompt_toolkit 2.x

We have to define exactly what you mean but as I understand it,
most likely no – as least not as a default to prompt_toolkit 2.x . For a couple of reason.

  1. That would almost certainly be a change of API of the 5.x branch – which will deeply annoy other redistributors.
  2. That would riple to jupyter_console, and other (non-jupyter) packages that are using ptk 1 and we know are compatible with IPython 5.x so forcing Ptk2, or saying that's it's a possibility would be extra work.
  3. 5.x is LTS – because we care about Python 2 user – but mostly volunteers moving to Python 3 only. We thus try to avoid heavy changes and wind it down so we can't expect much work from current core maintainers.

Now if you want to upstream patches to a 5.x-ptk2 branch that we release under a variant name on PyPI, or can make 5.x work conditionally with both ptk1 or 2 with no consumer API changes, I think that could work and we would accept the changes.
I guess if that works well we can give you maintainership of this branch as well.

There is another potential solution but IANAL. When we dropped python 2 support we actually had the question of whether LTS/5.x could be made proprietary/closed source/commercial with a vendor. My understanding is that yes it can, but not under the IPython name, which is too close to Python (we can't own the IPython trademark), but that may also be something that may be arranged with PSF.

Crosslink #11177 which is most of the work that made IPython 7 compatible with Ptk2

Hoping that answer some of your questions.

@hroncok
Copy link
Contributor Author

hroncok commented Sep 29, 2018

We Fedora, we usually ship python3-foo and python2-foo packages from single source. We certainly have a way to split those, that we utilize when upstream updates to Python 3 only. For example we did that with IPython and quite recently with matplotlib as well. However prompt_toolkit 2 still supports Python 2, so I wanted to know if we can update both (2, 3) packages at the same time (keeping the single source thing). But we might need to keep python2-prompt-toolkit at 1.x and only update the python 3 part. Things are getting complicated, we try hard to kick all the unneeded python 2 packages out of the distro, but there are still a lot of dependent packages. Thanks for the answer, we'll try to figure out what's the best move here.

@carlwgeorge
Copy link

carlwgeorge commented Oct 1, 2018

But we might need to keep python2-prompt-toolkit at 1.x and only update the python 3 part.

That works for me.

@hroncok
Copy link
Contributor Author

hroncok commented Oct 3, 2018

We did exactly that. Thanks @Carreau for the explanation.

@hroncok hroncok closed this as completed Oct 3, 2018
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

3 participants