golden hour
/opt/alt/python37/lib/python3.7/site-packages/pip/_vendor/requests
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.py
4.36 KB
Del
OK
__init__.pyc
4.33 KB
Del
OK
__init__.pyo
4.16 KB
Del
OK
__pycache__
-
Del
OK
__version__.py
441 B
Del
OK
__version__.pyc
605 B
Del
OK
__version__.pyo
605 B
Del
OK
_internal_utils.py
1.07 KB
Del
OK
_internal_utils.pyc
1.54 KB
Del
OK
_internal_utils.pyo
1.49 KB
Del
OK
adapters.py
21.04 KB
Del
OK
adapters.pyc
19.22 KB
Del
OK
adapters.pyo
19.22 KB
Del
OK
api.py
6.34 KB
Del
OK
api.pyc
7.26 KB
Del
OK
api.pyo
7.26 KB
Del
OK
auth.py
9.97 KB
Del
OK
auth.pyc
10.61 KB
Del
OK
auth.pyo
10.61 KB
Del
OK
certs.py
465 B
Del
OK
certs.pyc
631 B
Del
OK
certs.pyo
631 B
Del
OK
compat.py
2 KB
Del
OK
compat.pyc
1.92 KB
Del
OK
compat.pyo
1.92 KB
Del
OK
cookies.py
18 KB
Del
OK
cookies.pyc
22.85 KB
Del
OK
cookies.pyo
22.85 KB
Del
OK
exceptions.py
3.1 KB
Del
OK
exceptions.pyc
7.32 KB
Del
OK
exceptions.pyo
7.32 KB
Del
OK
help.py
3.49 KB
Del
OK
help.pyc
3.36 KB
Del
OK
help.pyo
3.36 KB
Del
OK
hooks.py
757 B
Del
OK
hooks.pyc
1.23 KB
Del
OK
hooks.pyo
1.23 KB
Del
OK
models.py
33.48 KB
Del
OK
models.pyc
29.39 KB
Del
OK
models.pyo
29.39 KB
Del
OK
packages.py
695 B
Del
OK
packages.pyc
591 B
Del
OK
packages.pyo
591 B
Del
OK
sessions.py
28.63 KB
Del
OK
sessions.pyc
22.74 KB
Del
OK
sessions.pyo
22.74 KB
Del
OK
status_codes.py
4.09 KB
Del
OK
status_codes.pyc
6.04 KB
Del
OK
status_codes.pyo
6.04 KB
Del
OK
structures.py
2.93 KB
Del
OK
structures.pyc
5.54 KB
Del
OK
structures.pyo
5.54 KB
Del
OK
utils.py
29.47 KB
Del
OK
utils.pyc
27.41 KB
Del
OK
utils.pyo
27.41 KB
Del
OK
Edit: help.py
"""Module containing bug report helper(s).""" from __future__ import print_function import json import platform import sys import ssl from pip._vendor import idna from pip._vendor import urllib3 from pip._vendor import chardet from . import __version__ as requests_version try: from pip._vendor.urllib3.contrib import pyopenssl except ImportError: pyopenssl = None OpenSSL = None cryptography = None else: import OpenSSL import cryptography def _implementation(): """Return a dict with the Python implementation and version. Provide both the name and the version of the Python implementation currently running. For example, on CPython 2.7.5 it will return {'name': 'CPython', 'version': '2.7.5'}. This function works best on CPython and PyPy: in particular, it probably doesn't work for Jython or IronPython. Future investigation should be done to work out the correct shape of the code for those platforms. """ implementation = platform.python_implementation() if implementation == 'CPython': implementation_version = platform.python_version() elif implementation == 'PyPy': implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major, sys.pypy_version_info.minor, sys.pypy_version_info.micro) if sys.pypy_version_info.releaselevel != 'final': implementation_version = ''.join([ implementation_version, sys.pypy_version_info.releaselevel ]) elif implementation == 'Jython': implementation_version = platform.python_version() # Complete Guess elif implementation == 'IronPython': implementation_version = platform.python_version() # Complete Guess else: implementation_version = 'Unknown' return {'name': implementation, 'version': implementation_version} def info(): """Generate information for a bug report.""" try: platform_info = { 'system': platform.system(), 'release': platform.release(), } except IOError: platform_info = { 'system': 'Unknown', 'release': 'Unknown', } implementation_info = _implementation() urllib3_info = {'version': urllib3.__version__} chardet_info = {'version': chardet.__version__} pyopenssl_info = { 'version': None, 'openssl_version': '', } if OpenSSL: pyopenssl_info = { 'version': OpenSSL.__version__, 'openssl_version': '%x' % OpenSSL.SSL.OPENSSL_VERSION_NUMBER, } cryptography_info = { 'version': getattr(cryptography, '__version__', ''), } idna_info = { 'version': getattr(idna, '__version__', ''), } system_ssl = ssl.OPENSSL_VERSION_NUMBER system_ssl_info = { 'version': '%x' % system_ssl if system_ssl is not None else '' } return { 'platform': platform_info, 'implementation': implementation_info, 'system_ssl': system_ssl_info, 'using_pyopenssl': pyopenssl is not None, 'pyOpenSSL': pyopenssl_info, 'urllib3': urllib3_info, 'chardet': chardet_info, 'cryptography': cryptography_info, 'idna': idna_info, 'requests': { 'version': requests_version, }, } def main(): """Pretty-print the bug information as JSON.""" print(json.dumps(info(), sort_keys=True, indent=2)) if __name__ == '__main__': main()
Save