diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /library/python/certifi | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
download | ydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/python/certifi')
-rw-r--r-- | library/python/certifi/.dist-info/METADATA | 2 | ||||
-rw-r--r-- | library/python/certifi/README.md | 14 | ||||
-rw-r--r-- | library/python/certifi/certifi/__init__.py | 12 | ||||
-rw-r--r-- | library/python/certifi/certifi/binary.py | 50 | ||||
-rw-r--r-- | library/python/certifi/certifi/source.py | 26 | ||||
-rw-r--r-- | library/python/certifi/ya.make | 24 |
6 files changed, 64 insertions, 64 deletions
diff --git a/library/python/certifi/.dist-info/METADATA b/library/python/certifi/.dist-info/METADATA index 4849f81ed4..12bf982cf3 100644 --- a/library/python/certifi/.dist-info/METADATA +++ b/library/python/certifi/.dist-info/METADATA @@ -1,2 +1,2 @@ Name: certifi -Version: 2019.7.1 +Version: 2019.7.1 diff --git a/library/python/certifi/README.md b/library/python/certifi/README.md index 75a812733c..96dcc4c1c3 100644 --- a/library/python/certifi/README.md +++ b/library/python/certifi/README.md @@ -1,7 +1,7 @@ -This library provides arcadia certs via certifi-compatible API. - -In binary (single executable) mode it patches python ssl module to -support loading certs from memory. - -.dist-info/METADATA version reflects the last update time of the -arcadia certs. +This library provides arcadia certs via certifi-compatible API. + +In binary (single executable) mode it patches python ssl module to +support loading certs from memory. + +.dist-info/METADATA version reflects the last update time of the +arcadia certs. diff --git a/library/python/certifi/certifi/__init__.py b/library/python/certifi/certifi/__init__.py index 5270d206cd..8d14209d03 100644 --- a/library/python/certifi/certifi/__init__.py +++ b/library/python/certifi/certifi/__init__.py @@ -1,9 +1,9 @@ -import ssl - -if hasattr(ssl, 'builtin_cadata'): - from .binary import where -else: - from .source import where +import ssl + +if hasattr(ssl, 'builtin_cadata'): + from .binary import where +else: + from .source import where __all__ = ['where', '__version__'] diff --git a/library/python/certifi/certifi/binary.py b/library/python/certifi/certifi/binary.py index 1050e733a3..523fe31287 100644 --- a/library/python/certifi/certifi/binary.py +++ b/library/python/certifi/certifi/binary.py @@ -1,25 +1,25 @@ -import ssl - - -def builtin_ca(): - return None, None, ssl.builtin_cadata() - - -# Normally certifi.where() returns a path to a certificate file; -# here it returns a callable. -def where(): - return builtin_ca - - -# Patch ssl module to accept a callable cafile. -load_verify_locations = ssl.SSLContext.load_verify_locations - - -def load_verify_locations__callable(self, cafile=None, capath=None, cadata=None): - if callable(cafile): - cafile, capath, cadata = cafile() - - return load_verify_locations(self, cafile, capath, cadata) - - -ssl.SSLContext.load_verify_locations = load_verify_locations__callable +import ssl + + +def builtin_ca(): + return None, None, ssl.builtin_cadata() + + +# Normally certifi.where() returns a path to a certificate file; +# here it returns a callable. +def where(): + return builtin_ca + + +# Patch ssl module to accept a callable cafile. +load_verify_locations = ssl.SSLContext.load_verify_locations + + +def load_verify_locations__callable(self, cafile=None, capath=None, cadata=None): + if callable(cafile): + cafile, capath, cadata = cafile() + + return load_verify_locations(self, cafile, capath, cadata) + + +ssl.SSLContext.load_verify_locations = load_verify_locations__callable diff --git a/library/python/certifi/certifi/source.py b/library/python/certifi/certifi/source.py index f539b67002..81566bbf32 100644 --- a/library/python/certifi/certifi/source.py +++ b/library/python/certifi/certifi/source.py @@ -1,13 +1,13 @@ -import os.path - -pem = os.path.abspath(__file__) -pem = os.path.dirname(pem) -pem = os.path.dirname(pem) -pem = os.path.dirname(pem) -pem = os.path.dirname(pem) -pem = os.path.dirname(pem) -pem = os.path.join(pem, 'certs', 'cacert.pem') - - -def where(): - return pem +import os.path + +pem = os.path.abspath(__file__) +pem = os.path.dirname(pem) +pem = os.path.dirname(pem) +pem = os.path.dirname(pem) +pem = os.path.dirname(pem) +pem = os.path.dirname(pem) +pem = os.path.join(pem, 'certs', 'cacert.pem') + + +def where(): + return pem diff --git a/library/python/certifi/ya.make b/library/python/certifi/ya.make index 64fefe2833..398210c0e6 100644 --- a/library/python/certifi/ya.make +++ b/library/python/certifi/ya.make @@ -1,18 +1,18 @@ PY23_LIBRARY() - -OWNER(orivej g:python-contrib) - + +OWNER(orivej g:python-contrib) + RESOURCE_FILES( - PREFIX library/python/certifi/ + PREFIX library/python/certifi/ .dist-info/METADATA .dist-info/top_level.txt ) -PY_SRCS( - TOP_LEVEL - certifi/__init__.py - certifi/binary.py - certifi/source.py -) - -END() +PY_SRCS( + TOP_LEVEL + certifi/__init__.py + certifi/binary.py + certifi/source.py +) + +END() |