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 2.7.x support threatened by IPython requirement #1308

Closed
ralienpp opened this issue Apr 5, 2018 · 3 comments
Closed

Python 2.7.x support threatened by IPython requirement #1308

ralienpp opened this issue Apr 5, 2018 · 3 comments
Labels
Easyfix Bugs or Tweaks that are easy for a new contributor to fix or implement Medium Priority
Milestone

Comments

@ralienpp
Copy link

ralienpp commented Apr 5, 2018

The current version of Sopel depends on ipython in its requirements.txt. This automatically pulls the latest greatest version of Ipython, which is 6.x. When installing that dependency, the following error occurs:

Collecting ipython (from sopel)
  Downloading ipython-6.3.0.tar.gz (5.1MB)
    100% |████████████████████████████████| 5.1MB 48kB/s
    Complete output from command python setup.py egg_info:

    IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2.
    When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
    Beginning with IPython 6.0, Python 3.3 and above is required.

    See IPython `README.rst` file for more information

Even if I install ipython==5.0.0 before installing Sopel, it still downloads the latest version of IPython and attempts to install it.

If Sopel doesn't depend on some unique features of IPython that are not present in 5.x, I believe this can be addressed by setting the dependency to ipython>=5.0.0, and instructing Python 2.7.x users to install this version of IPython manually before installing Sopel itself.

@dgw dgw added Medium Priority Easyfix Bugs or Tweaks that are easy for a new contributor to fix or implement labels Apr 5, 2018
@dgw
Copy link
Member

dgw commented Apr 5, 2018

Well, now, that's distressing. I tested on my own server (which runs Sopel under Python 2.7.3…yeah, it's that old) and pip gave me a compatible version of IPython. You can see where this was changed in #1263.

Sopel 6.5.3 will use conditional requirements based on python_version, as @alanhuang122 originally proposed before I did my (erroneous) pip test. Thank you for pointing this out, @ralienpp!

(Did I mention that I don't think ipython should be in the core module set? 😁 Honestly, it's pretty niche and it's the only module with weird dependency issues.)

@dgw dgw added this to the 6.5.3 milestone Apr 5, 2018
@dgw dgw changed the title Python 2.7.x support effectively dropped Python 2.7.x support threatened by IPython requirement Apr 5, 2018
@ralienpp
Copy link
Author

ralienpp commented Apr 5, 2018

I agree that it is not something that I would prefer to keep in the core distribution, I'd do the same for the libenchant-dev dependency as well (it pulls a lot of other stuff with it, e.g. spelling checkers).

I don't use any of the built-in commands of Sopel, I basically treat it as a "transport layer" for my own commands + the ability to send a command to N bots in a move.

As long as Sopel doesn't depend on X11 or Java, I just ignore this :-) but in an ideal world, I believe that it would be better if the IRC core functionality were decoupled from everything else. Some of the systems where I run Sopel are very resource-constrained IoT devices, so I have to watch out for bloat.

@dgw dgw closed this as completed in #1310 Apr 5, 2018
@dgw
Copy link
Member

dgw commented Apr 5, 2018

For Sopel 7, I'm looking at pulling at least ipython and spellcheck into external modules. For more on that as it comes, follow #1291. The alternative idea bouncing around is making them installable extras, like how requests has the security option to install extra stuff for better SSL compatibility.

In your specific case, you might find elad's old comment from #1037 relevant. There are ways to install Python packages that don't enforce the dependencies, which you can use to avoid all the bloat of libenchant and/or IPython until Sopel itself makes those optional. If you're not using any of the core modules, you won't need their dependencies, so you can manually install only the stuff you absolutely need. (Don't quote me just yet, because I haven't been working on this project long enough to know for sure, but Sopel itself doesn't really need much at all outside the Python stdlib. Most/all of the deps in requirements.txt are for core module functions, not the actual IRC bot.)

kwaaak pushed a commit to kwaaak/sopel that referenced this issue Apr 5, 2018
Either pip isn't smart enough to figure out which Python versions a
package version is compatible with and pick one it can use, or IPython
is packaged in such a way that it breaks pip's smarts.

Whichever it is, Sopel will have to be the smart one and hold both their
hands to avoid breaking things.

Resolves sopel-irc#1308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easyfix Bugs or Tweaks that are easy for a new contributor to fix or implement Medium Priority
Projects
None yet
Development

No branches or pull requests

2 participants