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

Sopel's requirements include packages not necessary for the core functionality #1037

Closed
ayust opened this issue Feb 25, 2016 · 6 comments
Closed
Labels
Replaced Superseded by a newer PR

Comments

@ayust
Copy link

ayust commented Feb 25, 2016

It seems odd to require modules like pyenchant when using pip install sopel - it makes it harder to work with sopel for projects that aren't necessarily using the default modules.

Perhaps it'd be worth moving these sorts of modules to "extras" as optional dependencies rather than making them a core requirement?

  • The spellcheck module which uses pyenchant already has an import check and fails gracefully if it's not available.
  • The ip module would need to be changed to fail gracefully if pygeoip is not available.
  • The reddit module would need to be changed to fail gracefully if praw is not available.

None of these 3 modules seem like they're a central, core piece of functionality that every user would necessarily want.

@elad661
Copy link
Contributor

elad661 commented Mar 9, 2016

The reason why we added these requirements is that when we made them non-mandatory, we got a lot of people complaining about them not working, or people complaining about sopel showing "errors" on startup, and we had to explain again and again that these "errors" are non fatal - just modules failing to load because of a missing dependency.

Having three extra libraries installed from PyPi even if you don't use them is not such a big deal.

@ayust
Copy link
Author

ayust commented Mar 9, 2016

It actually results in sopel failing to install on more minimal Linux distributions that don't have some of the (non-Python) libraries they're depending on. (E.g. if you're working with Docker and the Alpine Linux minimal python base images.)

Perhaps instead it would make more sense to not load the spellcheck/ip/reddit modules by default?

If you're not interested in supporting sopel on more minimal Linux distros, that's Sopel's decision to make - I just want to make sure you were aware of the impact/downside.

@elad661
Copy link
Contributor

elad661 commented Mar 9, 2016

If you're skilled enough to run a very minimal distribution, you're skilled enough to install sopel not via PyPi, which is the only method of installing it which enforces dependency requirements.

In my personal opinion, supporting a bunch of very minimal distributions is not worth the amount of time we'll have to spend supporting users who are completely clueless about optional dependencies and won't read the docs.

But that's just my opinion, and I'm not the one who can make this call.

@ayust
Copy link
Author

ayust commented Mar 9, 2016

I can see that line of reasoning and can't really object to it. (Though I do think that even people with advanced knowledge like not having to do things the hard way when possible!)

@dgw
Copy link
Member

dgw commented Mar 29, 2018

One of the long-term ideas I've had is to move most of the core modules into separate PyPI packages that can be installed separately. That idea has its own thread in #1291, but doing so would effectively solve this issue. Each separately-installed module would simply require what it needs, leaving the main Sopel requirements file to list only stuff needed to run the framework (and perhaps a couple of truly indispensable administration-related modules).

@dgw dgw added the Long-term Planning Things that need to happen at some point in the future, but need to NOT happen soon. label Jan 12, 2019
@Exirel
Copy link
Contributor

Exirel commented May 1, 2019

As pointed out by @dgw this will be effectively fixed when #1291 will be fixed, in Sopel 8.x. The roadmap isn't written in stone, but we have a pretty clear overview of what to do and how to achieve our goal.

Without further ado, I close this one, but its intent still live in #1291!

@Exirel Exirel closed this as completed May 1, 2019
@Exirel Exirel added Replaced Superseded by a newer PR and removed Long-term Planning Things that need to happen at some point in the future, but need to NOT happen soon. labels May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Replaced Superseded by a newer PR
Projects
None yet
Development

No branches or pull requests

4 participants