gettext.translation() can do most of the work for us, calling
gettext.find() and with fallback=True returning a NullTranslations if no
catalog is found.
The do_unicode parameter of install_builtin() should have been removed
in:
384e1e196 ("Remove Python 2 gettext builtin installation", 2020-04-15)
Else cache restore fails:
/usr/bin/tar: ../../../../../var/lib/clamav/main.cvd: Cannot open: Permission denied
/usr/bin/tar: ../../../../../var/lib/clamav/freshclam.dat: Cannot open: File exists
/usr/bin/tar: ../../../../../var/lib/clamav/daily.cvd: Cannot open: File exists
/usr/bin/tar: ../../../../../var/lib/clamav/bytecode.cvd: Cannot open: Permission denied
/usr/bin/tar: ../../../../../var/lib/clamav: Cannot utime: Operation not permitted
/usr/bin/tar: Exiting with failure status due to previous errors
Warning: Failed to restore: Tar failed with error: The process '/usr/bin/tar' failed with exit code 2
Cache not found for input keys: clamav-v1
cryptography 39 is causing problems on Ubuntu 22.04 for Sphinx
autosummary:
* AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'
Stop installing pdfminer.six which is causing cryptography to be
installed.
We don't care if the signatures are stale (we only need the EICAR virus
test signature), so run freshclam only if the cache is missing entirely.
Closes#709.
Also, use apt-get instead of apt to avoid
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
20181108 is the version used by the current Debian oldstable.
Ubuntu 20.04 LTS has 20191020.
pdfminer installs cryptography, >= 38 breaks pyOpenSSL < 22 as found in
Ubuntu 20.04 LTS. Update docs job to use ubuntu-22.04 to avoid
failures.
With Python 3.7 and Requests 2.4.0 on Ubuntu 20.04 there are two test
failures; reasons not immediately clear. There is a warning for the use
of ABCs from collections and not collections.abc. That will cause an
exception on Python 3.10 and is fixed in Requests 2.19.0.
Drop code target, sphinx-autogen is not using conf.py, and since Sphinx
4.0 autosummary is generating stub pages by default anyway.
Mock ctypes and linkcheck.__main__: colorama.py imports MS Windows
libraries, autosummary executes __main__.py.
Default is ASCII.
xgettext: Non-ASCII string at ../linkcheck/htmlutil/srcsetparse.py:39.
Please specify the source encoding through --from-code or through a comment
as specified in http://www.python.org/peps/pep-0263.html.