In Python 2 StringIO could accept either Unicode or 8-bit strings.
Similar change made for HttpUrl:
06fdd78f9 ("Python3: fix TypeError in HttpUrl.read_content()",
2019-09-15)
Non-existent FtpUrl.max_size introduced in:
7b34be590 ("Introduce check plugins, use Python requests for http/s
connections, and some code cleanups and improvements.", 2014-03-01)
Additional self.direct() not added in:
f107092a8 ("Fix handling of user/password info in URLs.", 2012-06-10)
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.