Skip to content

Commit 08628ce

Browse files
authored
[stdlib] Fix a few literal values (#15589)
1 parent 9553477 commit 08628ce

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

stdlib/_sqlite3.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ if sys.version_info >= (3, 11):
171171
SQLITE_IOERR_VNODE: Final = 6922
172172
SQLITE_IOERR_WRITE: Final = 778
173173
SQLITE_LIMIT_ATTACHED: Final = 7
174-
SQLITE_LIMIT_COLUMN: Final = 22
174+
SQLITE_LIMIT_COLUMN: Final = 2
175175
SQLITE_LIMIT_COMPOUND_SELECT: Final = 4
176176
SQLITE_LIMIT_EXPR_DEPTH: Final = 3
177177
SQLITE_LIMIT_FUNCTION_ARG: Final = 6

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/os/__init__.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,12 @@ if sys.platform == "darwin" and sys.version_info >= (3, 12):
614614
SEEK_SET: Final = 0
615615
SEEK_CUR: Final = 1
616616
SEEK_END: Final = 2
617-
if sys.platform != "win32":
617+
if sys.platform == "linux":
618618
SEEK_DATA: Final = 3
619619
SEEK_HOLE: Final = 4
620+
elif sys.platform == "darwin":
621+
SEEK_HOLE: Final = 3
622+
SEEK_DATA: Final = 4
620623

621624
O_RDONLY: Final[int]
622625
O_WRONLY: Final[int]

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 = 12
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: int
148148
OP_NO_SSLv2 = 0
149149
OP_NO_SSLv3 = 33554432
150150
OP_NO_TLSv1 = 67108864

0 commit comments

Comments
 (0)