py2docfx 0.1.20rc2195074__py3-none-any.whl → 0.1.20rc2245107__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/api.py +3 -2
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/legacy.py +17 -1
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/version.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/requests/__version__.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/requests/adapters.py +17 -40
- py2docfx/venv/basevenv/Lib/site-packages/requests/sessions.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/_version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_authentication.py +21 -9
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_authentication_async.py +21 -9
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_retry.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_bearer_token_provider.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/authorization_code.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/azd_cli.py +82 -17
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/azure_cli.py +28 -5
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/azure_powershell.py +28 -4
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/broker.py +79 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/chained.py +9 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/default.py +153 -53
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/imds.py +25 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/shared_cache.py +12 -5
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/vscode.py +163 -144
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/workload_identity.py +23 -12
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/__init__.py +4 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/interactive.py +14 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/pipeline.py +4 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/utils.py +96 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_bearer_token_provider.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/authorization_code.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azd_cli.py +32 -13
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azure_cli.py +26 -5
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azure_powershell.py +13 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/chained.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/default.py +120 -55
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/imds.py +27 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/on_behalf_of.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/shared_cache.py +12 -5
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/vscode.py +15 -67
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/workload_identity.py +17 -13
- py2docfx/venv/venv1/Lib/site-packages/cffi/__init__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/cffi/cparser.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/cffi/recompiler.py +5 -5
- py2docfx/venv/venv1/Lib/site-packages/cffi/setuptools_ext.py +13 -0
- py2docfx/venv/venv1/Lib/site-packages/cffi/vengine_cpy.py +3 -0
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/api.py +3 -2
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/legacy.py +17 -1
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/__about__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/__init__.py +0 -13
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/_oid.py +8 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/asn1/__init__.py +10 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/asn1/asn1.py +116 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/backends/openssl/backend.py +3 -9
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/declarative_asn1.pyi +32 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/kdf.pyi +23 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi +1 -13
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/openssl/_conditional.py +16 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/openssl/binding.py +16 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/padding.py +0 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py +8 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/ciphers/algorithms.py +0 -47
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/hkdf.py +6 -91
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/kbkdf.py +1 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/ssh.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/utils.py +0 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/name.py +2 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/any_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/api_pb2.py +12 -8
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/compiler/plugin_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor.py +398 -246
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_pb2.py +74 -72
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_pool.py +5 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/duration_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/empty_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/field_mask_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/api_implementation.py +0 -6
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/extension_dict.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/field_mask.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/python_edition_defaults.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/python_message.py +10 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/type_checkers.py +47 -5
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/json_format.py +55 -32
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/runtime_version.py +6 -26
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/source_context_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/struct_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/text_format.py +30 -19
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/timestamp_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/type_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/wrappers_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/pycparser/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/pycparser/c_generator.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/pycparser/c_lexer.py +14 -0
- py2docfx/venv/venv1/Lib/site-packages/pycparser/c_parser.py +30 -7
- py2docfx/venv/venv1/Lib/site-packages/pycparser/lextab.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/pycparser/yacctab.py +132 -127
- py2docfx/venv/venv1/Lib/site-packages/requests/__version__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/requests/adapters.py +17 -40
- py2docfx/venv/venv1/Lib/site-packages/requests/sessions.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/typing_extensions.py +91 -18
- {py2docfx-0.1.20rc2195074.dist-info → py2docfx-0.1.20rc2245107.dist-info}/METADATA +1 -1
- {py2docfx-0.1.20rc2195074.dist-info → py2docfx-0.1.20rc2245107.dist-info}/RECORD +104 -103
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/linux_vscode_adapter.py +0 -100
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/macos_vscode_adapter.py +0 -34
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/win_vscode_adapter.py +0 -77
- {py2docfx-0.1.20rc2195074.dist-info → py2docfx-0.1.20rc2245107.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.20rc2195074.dist-info → py2docfx-0.1.20rc2245107.dist-info}/top_level.txt +0 -0
@@ -1,100 +0,0 @@
|
|
1
|
-
# ------------------------------------
|
2
|
-
# Copyright (c) Microsoft Corporation.
|
3
|
-
# Licensed under the MIT License.
|
4
|
-
# ------------------------------------
|
5
|
-
import os
|
6
|
-
import json
|
7
|
-
import logging
|
8
|
-
import ctypes as ct
|
9
|
-
from .._constants import VSCODE_CREDENTIALS_SECTION
|
10
|
-
|
11
|
-
_LOGGER = logging.getLogger(__name__)
|
12
|
-
|
13
|
-
|
14
|
-
def _c_str(string):
|
15
|
-
return ct.c_char_p(string.encode("utf-8"))
|
16
|
-
|
17
|
-
|
18
|
-
class _SECRET_SCHEMA_ATTRIBUTE(ct.Structure):
|
19
|
-
_fields_ = [
|
20
|
-
("name", ct.c_char_p),
|
21
|
-
("type", ct.c_uint),
|
22
|
-
]
|
23
|
-
|
24
|
-
|
25
|
-
class _SECRET_SCHEMA(ct.Structure):
|
26
|
-
_fields_ = [
|
27
|
-
("name", ct.c_char_p),
|
28
|
-
("flags", ct.c_uint),
|
29
|
-
("attributes", _SECRET_SCHEMA_ATTRIBUTE * 2),
|
30
|
-
]
|
31
|
-
|
32
|
-
|
33
|
-
_PSECRET_SCHEMA = ct.POINTER(_SECRET_SCHEMA)
|
34
|
-
|
35
|
-
|
36
|
-
try:
|
37
|
-
_libsecret = ct.cdll.LoadLibrary("libsecret-1.so.0")
|
38
|
-
_libsecret.secret_password_lookup_sync.argtypes = [
|
39
|
-
ct.c_void_p,
|
40
|
-
ct.c_void_p,
|
41
|
-
ct.c_void_p,
|
42
|
-
ct.c_char_p,
|
43
|
-
ct.c_char_p,
|
44
|
-
ct.c_char_p,
|
45
|
-
ct.c_char_p,
|
46
|
-
ct.c_void_p,
|
47
|
-
]
|
48
|
-
_libsecret.secret_password_lookup_sync.restype = ct.c_char_p
|
49
|
-
_libsecret.secret_password_free.argtypes = [ct.c_char_p]
|
50
|
-
except OSError:
|
51
|
-
_libsecret = None # type: ignore
|
52
|
-
|
53
|
-
|
54
|
-
def _get_refresh_token(service_name, account_name):
|
55
|
-
if not _libsecret:
|
56
|
-
return None
|
57
|
-
|
58
|
-
err = ct.c_int()
|
59
|
-
attributes = [_SECRET_SCHEMA_ATTRIBUTE(_c_str("service"), 0), _SECRET_SCHEMA_ATTRIBUTE(_c_str("account"), 0)]
|
60
|
-
pattributes = (_SECRET_SCHEMA_ATTRIBUTE * 2)(*attributes)
|
61
|
-
schema = _SECRET_SCHEMA()
|
62
|
-
pschema = _PSECRET_SCHEMA(schema)
|
63
|
-
ct.memset(pschema, 0, ct.sizeof(schema))
|
64
|
-
schema.name = _c_str("org.freedesktop.Secret.Generic") # pylint: disable=attribute-defined-outside-init
|
65
|
-
schema.flags = 2 # pylint: disable=attribute-defined-outside-init
|
66
|
-
schema.attributes = pattributes # pylint: disable=attribute-defined-outside-init
|
67
|
-
p_str = _libsecret.secret_password_lookup_sync(
|
68
|
-
pschema,
|
69
|
-
None,
|
70
|
-
ct.byref(err),
|
71
|
-
_c_str("service"),
|
72
|
-
_c_str(service_name),
|
73
|
-
_c_str("account"),
|
74
|
-
_c_str(account_name),
|
75
|
-
None,
|
76
|
-
)
|
77
|
-
if err.value == 0 and p_str:
|
78
|
-
return p_str.decode("utf-8")
|
79
|
-
|
80
|
-
return None
|
81
|
-
|
82
|
-
|
83
|
-
def get_user_settings():
|
84
|
-
try:
|
85
|
-
path = os.path.join(os.environ["HOME"], ".config", "Code", "User", "settings.json")
|
86
|
-
with open(path, encoding="utf-8") as file:
|
87
|
-
return json.load(file)
|
88
|
-
except Exception as ex: # pylint:disable=broad-except
|
89
|
-
_LOGGER.debug('Exception reading VS Code user settings: "%s"', ex, exc_info=_LOGGER.isEnabledFor(logging.DEBUG))
|
90
|
-
return {}
|
91
|
-
|
92
|
-
|
93
|
-
def get_refresh_token(cloud_name):
|
94
|
-
try:
|
95
|
-
return _get_refresh_token(VSCODE_CREDENTIALS_SECTION, cloud_name)
|
96
|
-
except Exception as ex: # pylint:disable=broad-except
|
97
|
-
_LOGGER.debug(
|
98
|
-
'Exception retrieving VS Code credentials: "%s"', ex, exc_info=_LOGGER.isEnabledFor(logging.DEBUG)
|
99
|
-
)
|
100
|
-
return None
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# ------------------------------------
|
2
|
-
# Copyright (c) Microsoft Corporation.
|
3
|
-
# Licensed under the MIT License.
|
4
|
-
# ------------------------------------
|
5
|
-
import os
|
6
|
-
import json
|
7
|
-
import logging
|
8
|
-
from msal_extensions.osx import Keychain, KeychainError
|
9
|
-
from .._constants import VSCODE_CREDENTIALS_SECTION
|
10
|
-
|
11
|
-
_LOGGER = logging.getLogger(__name__)
|
12
|
-
|
13
|
-
|
14
|
-
def get_user_settings():
|
15
|
-
try:
|
16
|
-
path = os.path.join(os.environ["HOME"], "Library", "Application Support", "Code", "User", "settings.json")
|
17
|
-
with open(path, encoding="utf-8") as file:
|
18
|
-
return json.load(file)
|
19
|
-
except Exception as ex: # pylint:disable=broad-except
|
20
|
-
_LOGGER.debug('Exception reading VS Code user settings: "%s"', ex, exc_info=_LOGGER.isEnabledFor(logging.DEBUG))
|
21
|
-
return {}
|
22
|
-
|
23
|
-
|
24
|
-
def get_refresh_token(cloud_name):
|
25
|
-
try:
|
26
|
-
key_chain = Keychain()
|
27
|
-
return key_chain.get_generic_password(VSCODE_CREDENTIALS_SECTION, cloud_name)
|
28
|
-
except KeychainError:
|
29
|
-
return None
|
30
|
-
except Exception as ex: # pylint:disable=broad-except
|
31
|
-
_LOGGER.debug(
|
32
|
-
'Exception retrieving VS Code credentials: "%s"', ex, exc_info=_LOGGER.isEnabledFor(logging.DEBUG)
|
33
|
-
)
|
34
|
-
return None
|
@@ -1,77 +0,0 @@
|
|
1
|
-
# ------------------------------------
|
2
|
-
# Copyright (c) Microsoft Corporation.
|
3
|
-
# Licensed under the MIT License.
|
4
|
-
# ------------------------------------
|
5
|
-
import os
|
6
|
-
import json
|
7
|
-
import logging
|
8
|
-
import ctypes as ct
|
9
|
-
from .._constants import VSCODE_CREDENTIALS_SECTION
|
10
|
-
|
11
|
-
try:
|
12
|
-
import ctypes.wintypes as wt
|
13
|
-
except (IOError, ValueError):
|
14
|
-
pass
|
15
|
-
|
16
|
-
_LOGGER = logging.getLogger(__name__)
|
17
|
-
|
18
|
-
SUPPORTED_CREDKEYS = set(("Type", "TargetName", "Persist", "UserName", "Comment", "CredentialBlob"))
|
19
|
-
|
20
|
-
_PBYTE = ct.POINTER(ct.c_byte)
|
21
|
-
|
22
|
-
|
23
|
-
class _CREDENTIAL(ct.Structure):
|
24
|
-
_fields_ = [
|
25
|
-
("Flags", wt.DWORD),
|
26
|
-
("Type", wt.DWORD),
|
27
|
-
("TargetName", ct.c_wchar_p),
|
28
|
-
("Comment", ct.c_wchar_p),
|
29
|
-
("LastWritten", wt.FILETIME),
|
30
|
-
("CredentialBlobSize", wt.DWORD),
|
31
|
-
("CredentialBlob", _PBYTE),
|
32
|
-
("Persist", wt.DWORD),
|
33
|
-
("AttributeCount", wt.DWORD),
|
34
|
-
("Attributes", ct.c_void_p),
|
35
|
-
("TargetAlias", ct.c_wchar_p),
|
36
|
-
("UserName", ct.c_wchar_p),
|
37
|
-
]
|
38
|
-
|
39
|
-
|
40
|
-
_PCREDENTIAL = ct.POINTER(_CREDENTIAL)
|
41
|
-
|
42
|
-
_advapi = ct.WinDLL("advapi32") # type: ignore
|
43
|
-
_advapi.CredReadW.argtypes = [wt.LPCWSTR, wt.DWORD, wt.DWORD, ct.POINTER(_PCREDENTIAL)]
|
44
|
-
_advapi.CredReadW.restype = wt.BOOL
|
45
|
-
_advapi.CredFree.argtypes = [_PCREDENTIAL]
|
46
|
-
|
47
|
-
|
48
|
-
def _read_credential(service_name, account_name):
|
49
|
-
target = "{}/{}".format(service_name, account_name)
|
50
|
-
cred_ptr = _PCREDENTIAL()
|
51
|
-
if _advapi.CredReadW(target, 1, 0, ct.byref(cred_ptr)):
|
52
|
-
cred_blob = cred_ptr.contents.CredentialBlob
|
53
|
-
cred_blob_size = cred_ptr.contents.CredentialBlobSize
|
54
|
-
cred = "".join(map(chr, cred_blob[:cred_blob_size]))
|
55
|
-
_advapi.CredFree(cred_ptr)
|
56
|
-
return cred
|
57
|
-
return None
|
58
|
-
|
59
|
-
|
60
|
-
def get_user_settings():
|
61
|
-
try:
|
62
|
-
path = os.path.join(os.environ["APPDATA"], "Code", "User", "settings.json")
|
63
|
-
with open(path, encoding="utf-8") as file:
|
64
|
-
return json.load(file)
|
65
|
-
except Exception as ex: # pylint:disable=broad-except
|
66
|
-
_LOGGER.debug('Exception reading VS Code user settings: "%s"', ex, exc_info=_LOGGER.isEnabledFor(logging.DEBUG))
|
67
|
-
return {}
|
68
|
-
|
69
|
-
|
70
|
-
def get_refresh_token(cloud_name):
|
71
|
-
try:
|
72
|
-
return _read_credential(VSCODE_CREDENTIALS_SECTION, cloud_name)
|
73
|
-
except Exception as ex: # pylint: disable=broad-except
|
74
|
-
_LOGGER.debug(
|
75
|
-
'Exception retrieving VS Code credentials: "%s"', ex, exc_info=_LOGGER.isEnabledFor(logging.DEBUG)
|
76
|
-
)
|
77
|
-
return None
|
File without changes
|
File without changes
|