See suggestion in https://github.com/bskinn/sphobjinv/issues/275
This prevents the module from creating an ssl context upon import, when,
during a build especially, a certificate file may not be present. Otherwise
module import would fail.
--- a/src/sphobjinv/inventory.py
+++ b/src/sphobjinv/inventory.py
@@ -30,7 +30,6 @@ Sphinx |objects.inv| files.
"""
import re
-import ssl
import urllib.request as urlrq
from zlib import error as zlib_error
@@ -218,8 +217,15 @@ class Inventory:
#: zlib compression line for v2 |objects.inv| header
header_zlib = "# The remainder of this file is compressed using zlib."
- # Private class member for SSL context, since context creation is slow(?)
- _sslcontext = ssl.create_default_context(cafile=certifi.where())
+ # Private class member for SSL context
+ _sslcontext_ = None
+
+ @property
+ def _sslcontext(self):
+ import ssl
+ if not self._sslcontext_:
+ self._sslcontext_ = ssl.create_default_context(cafile=certifi.where())
+ return self._sslcontext_
@property
def count(self):
4290766'>refslogtreecommitdiff
|
Age | Commit message (Expand) | Author |
2020-07-25 | utils: Move <location> and '&error-location' to (guix diagnostics)....* guix/utils.scm (<location>, source-properties->location)
(location->source-properties, &error-location): Move to...
* guix/diagnostics.scm: ... here.
* gnu.scm: Adjust imports accordingly.
* gnu/machine.scm: Likewise.
* gnu/system.scm: Likewise.
* gnu/tests.scm: Likewise.
* guix/inferior.scm: Likewise.
* tests/channels.scm: Likewise.
* tests/packages.scm: Likewise.
| Ludovic Courtès |
2020-02-09 | Update e-mail address for Jakob L. Kreuze....As requested here:
<https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00128.html>.
* .mailmap: Add an entry for Jakob.
* gnu/machine.scm, gnu/machine/digital-ocean.scm, gnu/machine/ssh.scm,
gnu/packages/admin.scm, gnu/packages/i2p.scm, gnu/packages/music.scm,
gnu/packages/web.scm, gnu/tests/reconfigure.scm, guix/scripts/deploy.scm,
guix/scripts/system/reconfigure.scm: Update their e-mail address.
| Tobias Geerinckx-Rice |
2019-12-08 | machine: Remove unnecessary record self-referencing bindings....'this-machine' and 'this-machine-ssh-configuration' were useless given
that there are no thunked fields.
* gnu/machine.scm (<machine>)[this-machine]: Remove.
* gnu/machine/ssh.scm (<machine-ssh-configuration>)
[this-machine-ssh-configuration]: Remove.
| Ludovic Courtès |
2019-12-07 | machine: Add provenance tracking to each machine operating system....* gnu/machine.scm (<machine>): Rename accessor to
'%machine-operating-system'.
(machine-operating-system): New procedure.
* doc/guix.texi (Service Reference): Mention it.
| Ludovic Courtès |