()
return {
        "platform": platform_info,
        "implementation": {
            "name": implementation,
            "version": implementation_version,
        },
        "cryptography": {"version": getattr(cryptography, "__version__", "")},
        "pyjwt": {"version": pyjwt_version},
    }
Generate information for a bug report.
    Based on the requests package help utility module.
Generate information for a bug report.
    Based on the requests package help utility module.
Generate information for a bug report . Based on the requests package help utility module .
def info():
    """
    Generate information for a bug report.
    Based on the requests package help utility module.
    """
    try:
        platform_info = {
            "system": platform.system(),
            "release": platform.release(),
        }
    except OSError:
        platform_info = {"system": "Unknown", "release": "Unknown"}

    implementation = platform.python_implementation()

    if implementation == "CPython":
        implementation_version = platform.python_version()
    elif implementation == "PyPy":
        implementation_version = "{}.{}.{}".format(
            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]
            )
    else:
        implementation_version = "Unknown"

    return {
        "platform": platform_info,
        "implementation": {
            "name": implementation,
            "version": implementation_version,
        },
        "cryptography": {"version": getattr(cryptography, "__version__", "")},
        "pyjwt": {"version": pyjwt_version},
    }
def info ( ) : try : platform_info = { "system" : platform . system ( ) , "release" : platform . release ( ) , } except OSError : platform_info = { "system" : "Unknown" , "release" : "Unknown" } implementation = platform . python_implementation ( ) if implementation == "CPython" : implementation_version = platform . python_version ( ) elif implementation == "PyPy" : implementation_version = "{}.{}.{}" . format ( 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 ] ) else : implementation_version = "Unknown" return { "platform" : platform_info , "implementation" : { "name" : implementation , "version" : implementation_version , } , "cryptography" : { "version" : getattr ( cryptography , "__version__" , "" ) } , "pyjwt" : { "version" : pyjwt_version } , }