Skip to content

Commit ba02f6d

Browse files
committed
More stubtest fixes
1 parent e8802ab commit ba02f6d

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

stdlib/@tests/stubtest_allowlists/common.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ importlib._abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined
286286
# runtime is *args, **kwargs due to a wrapper; we have more accurate signatures in the stubs
287287
importlib.abc.FileLoader.get_filename
288288
importlib.abc.FileLoader.load_module
289-
importlib.machinery.ExtensionFileLoader.get_filename
290289

291290
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
292291

stdlib/_ssl.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ CERT_REQUIRED: Final = 2
183183

184184
# verify flags
185185
VERIFY_DEFAULT: Final = 0
186-
VERIFY_CRL_CHECK_LEAF: Final = 0x4
187-
VERIFY_CRL_CHECK_CHAIN: Final = 0x8
186+
VERIFY_CRL_CHECK_LEAF: Final = 0x04
187+
VERIFY_CRL_CHECK_CHAIN: Final = 0x0C
188188
VERIFY_X509_STRICT: Final = 0x20
189189
VERIFY_X509_TRUSTED_FIRST: Final = 0x8000
190190
if sys.version_info >= (3, 10):
@@ -230,7 +230,7 @@ PROTOCOL_TLSv1_1: Final = 4
230230
PROTOCOL_TLSv1_2: Final = 5
231231

232232
# protocol options
233-
OP_ALL: Final = 0x80000050
233+
OP_ALL: Final[int]
234234
OP_NO_SSLv2: Final = 0x0
235235
OP_NO_SSLv3: Final = 0x2000000
236236
OP_NO_TLSv1: Final = 0x4000000

stdlib/ssl.pyi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ CERT_OPTIONAL: Final = VerifyMode.CERT_OPTIONAL
103103
CERT_REQUIRED: Final = VerifyMode.CERT_REQUIRED
104104

105105
class VerifyFlags(enum.IntFlag):
106-
VERIFY_DEFAULT = 0
107-
VERIFY_CRL_CHECK_LEAF = 4
108-
VERIFY_CRL_CHECK_CHAIN = 8
109-
VERIFY_X509_STRICT = 32
110-
VERIFY_X509_TRUSTED_FIRST = 32768
106+
VERIFY_DEFAULT = 0x00
107+
VERIFY_CRL_CHECK_LEAF = 0x04
108+
VERIFY_CRL_CHECK_CHAIN = 0x0C
109+
VERIFY_X509_STRICT = 0x20
110+
VERIFY_X509_TRUSTED_FIRST = 0x8000
111111
if sys.version_info >= (3, 10):
112-
VERIFY_ALLOW_PROXY_CERTS = 64
113-
VERIFY_X509_PARTIAL_CHAIN = 524288
112+
VERIFY_ALLOW_PROXY_CERTS = 0x40
113+
VERIFY_X509_PARTIAL_CHAIN = 0x80000
114114

115115
VERIFY_DEFAULT: Final = VerifyFlags.VERIFY_DEFAULT
116116
VERIFY_CRL_CHECK_LEAF: Final = VerifyFlags.VERIFY_CRL_CHECK_LEAF
@@ -144,7 +144,7 @@ PROTOCOL_TLS_CLIENT: Final = _SSLMethod.PROTOCOL_TLS_CLIENT
144144
PROTOCOL_TLS_SERVER: Final = _SSLMethod.PROTOCOL_TLS_SERVER
145145

146146
class Options(enum.IntFlag):
147-
OP_ALL = 2147483728
147+
OP_ALL: Final[int]
148148
OP_NO_SSLv2 = 0
149149
OP_NO_SSLv3 = 33554432
150150
OP_NO_TLSv1 = 67108864

0 commit comments

Comments
 (0)