Sigil-Ebook / Sigil

Sigil is a multi-platform EPUB ebook editor
GNU General Public License v3.0
5.96k stars 578 forks source link

[Bug]: six is required? #730

Closed pgajdos closed 1 year ago

pgajdos commented 1 year ago

Bug Description

Documentation states six is required, but I do not see import anywhere. Is that dependency correct?

Platform (OS)

Linux

OS Version / Specifics

SUSE Linux

What version of Sigil are you using?

2.0.1

Any backtraces or crash reports

No response

dougmassay commented 1 year ago

How is this a bug report?

eli-schwartz commented 1 year ago

Well, I suppose it is a documentation bug report.

Superficially it looks like that dependency is probably in the wrong section of the documentation -- maybe it should be listed in the section after (rather than before):

That's all the Python 3.5 (or higher) stuff you will need to get Sigil "up and running", but if you want to make use of Sigil plugins that people are developing, you will also want to install the "standard" modules that ship with the binary version of Sigil

kevinhendricks commented 1 year ago

It was required by earlier versions of bs4 and html5lib and cssutils. If it is not needed by anything anymore I will remove it in a future release.

kevinhendricks commented 1 year ago

And it still is required for html5lib according to its requirements.

https://github.com/html5lib/html5lib-python/blob/3e500bb6e4188ea087f5b743a720ed9f4d9216f9/requirements.txt#L2

So this is not a bug and no changes needed.

And because it was part of the Sigil plugin interface for many years, we have no idea what third party plugins may require it so we really can not remove it as a requirement until after it has been deprecated for quite some time (and it is not deprecated).

eli-schwartz commented 1 year ago

And it still is required for html5lib according to its requirements.

https://github.com/html5lib/html5lib-python/blob/3e500bb6e4188ea087f5b743a720ed9f4d9216f9/requirements.txt#L2

So this is not a bug and no changes needed.

Hard disagree. To illustrate why, I'd like to point to the dulwich documentation which is correctly listed under the mandatory (non-plugin) requirements: it lists in parentheses within the dulwich bullet point: "dulwich requires that the urllib3 and certifi modules be installed as well"

It is a documentation bug to list modules which sigil does not personally use as required by sigil "because they are recursively required", since:

  1. pip install html5lib will install pip as well for you
  2. if/when html5lib drops python2 support, six will be deleted as part of an internal refactor, and it will no longer be required for html5lib and people reading the Sigil documentation will incorrectly interpret it as meaning that sigil itself needs six

Sigil already contains documentation designed under the theory that it is a documentation bug to list recursive dependencies as top-level dependencies; please apply that rule to "six" as well.

And because it was part of the Sigil plugin interface for many years, we have no idea what third party plugins may require it so we really can not remove it as a requirement until after it has been deprecated for quite some time (and it is not deprecated).

... and this is exactly why I did NOT say to remove it from the documentation. You said that in response to me. I said that you should move it to the section of the documentation devoted to "recommended modules used by plugins".

The distinction is of great importance. Distros want to mark modules that are needed for the plugin system as "optional" / "recommended" "USE=plugins" rather than unconditionally depending on them. It is challenging to do this when instead of consulting the documentation, I have to second-guess and verify that the documentation is correct.

I've worked quite hard to streamline communications and packaging interfaces in the calibre/sigil communities, because I believe that it is reasonable and practical for distros to package them in ways that fulfill the needs of both sides. My hope is that this will continue to be the case...

kevinhendricks commented 1 year ago

This "non-mandatory" or "optional" nonsense is a complete artifact made up by Linux distributions that creates differences and problems for everyone.

We, the creators of Sigil , do not and never will consider plugin support to be "non-mandatory" or in any way "optional". Plugins are an integral part of Sigil ever since I designed the interface and it was first released.

Six was used then because it was needed for html5lib and because we supported both Python 2 and Python 3 at the time. Since then it has become part of the plugin environment and we will not break plugin user land without long deprecation notices.

If Linux could ever decide on a single app standard layout and min abi, we would happily create our own Linux releases just to prevent nonsense like 3rd party maintainers deciding what constitutes Sigil proper and what doesn't.

So this is not a bug, nor is it something we are going to change.

The true bug is Linux "maintainers" trying to make decisions on what is "optional" in any way shape or form for an app they do not create nor support.

Please just stop the "non-mandatory" nonsense and package Sigil the way it was designed to be used as a true cross-platform app with proper plugin support.

We already unbundle all of the shared libraries, so there really is no reason for Linux not truly supporting Sigil as it is released just like on Windows and macOS.

kevinhendricks commented 1 year ago

And I think we already work hard to support Linux and get little to nothing back for our efforts.

We sent out notices in advance about the move to default to Qt6 and found nobody listened at all at first. We have numerous Linux distributions that never update at all because the maintainers personal preference for his platform powerpc (Fedora stuck on 0.9.14 for example) even with offers of help. Most Linux users never even get to try plugins at all because of the Linux "non-mandatory" policy they created, never mind that plugins are used for many essential epub dev tasks such as epubcheck, converting epub2 to epub3, css validation, importing kindle books, converting inline styles to styesheets, etc and etc. Or they use the old Mathjax ...

And this completely ignores the lack of standardization throughout Linux.

Yet, you can build Sigil and PageEdit out of the box on most popular Linux distributions because of DiapDealer's efforts.

And third party app packages do not make anything better as Flatpak via its "sandboxing" disables copy and pasting from clipboards, disables the entire "open with", disables "XEditor and therefore PageEdit, etc; And other third party app packages must be built with horrifically old glibc and qt versions and/or relocatable python packages.

Perhaps Linux should not be in the "mandatory vs non-mandatory" business for cross platform third party apps like Sigil.