There was only one function in module ipc: eintr_retry_call. This
function was used in pdftohtml module, and turns out[1] it's not needed
anymore. Support for retrying on syscall interrupts was introduced in
Python 3.5 (which was released in 2015), and covers subprocess module
among other modules. In this commit, mentioned eintr_retry_call function
has been removed, and couple of cosmetic changes was done in module
pdftohtml.
[1] https://www.python.org/dev/peps/pep-0475/
During development, turns out, that some incompatibility has been
introduced with lxml and html5-parser binary versions on pypy, with
library which is installed on my system. In case, where incompatibility
occurs, there was no error message, no exception thrown, just as a
result of parsing, lame lxml object has been returned, and performing
method like find() on it causes returning None instead of expected
Element object.
Following information about installation of the html5-library[1], I was
forced to change how ebook-converter is installed. Now, we have to build
and compile lxml on the target system, which is forced by introduced
requirements.txt file. Perhaps, I'll reconsider removing html5-parser in
the future.
[1] https://html5-parser.readthedocs.io/en/latest/#unix
There is a module, where this function is used - formatter_functions. It
is at the same time the only place where it is used. No need to clutter
__init__.py with it.
In Calibre, there was decided to keep the fonts information inside the
configuration directory. While scanned fonts information is actually a
cache, I would keep it there. This commit is making that happen.
Also removed XMLConfig in favor of JSONConfig class, since XMLConfig is
not used at all.
There was (and perhaps it exists in other modules, need to check) a bad
habit of importing objects out of module A into B just to be able of
import those object from module B. In this case there was import from
module config_base into module config. This commit fix this.