Skip to content

Commit 1851423

Browse files
authored
Fix CI for Python 3.12.0b2 (#10291)
1 parent 258cabe commit 1851423

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

stdlib/_winapi.pyi

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,34 @@ if sys.platform == "win32":
137137
LCMAP_TRADITIONAL_CHINESE: int
138138
LCMAP_UPPERCASE: int
139139

140+
if sys.version_info >= (3, 12):
141+
COPYFILE2_CALLBACK_CHUNK_STARTED: Literal[1]
142+
COPYFILE2_CALLBACK_CHUNK_FINISHED: Literal[2]
143+
COPYFILE2_CALLBACK_STREAM_STARTED: Literal[3]
144+
COPYFILE2_CALLBACK_STREAM_FINISHED: Literal[4]
145+
COPYFILE2_CALLBACK_POLL_CONTINUE: Literal[5]
146+
COPYFILE2_CALLBACK_ERROR: Literal[6]
147+
148+
COPYFILE2_PROGRESS_CONTINUE: Literal[0]
149+
COPYFILE2_PROGRESS_CANCEL: Literal[1]
150+
COPYFILE2_PROGRESS_STOP: Literal[2]
151+
COPYFILE2_PROGRESS_QUIET: Literal[3]
152+
COPYFILE2_PROGRESS_PAUSE: Literal[4]
153+
154+
COPY_FILE_FAIL_IF_EXISTS: Literal[0x1]
155+
COPY_FILE_RESTARTABLE: Literal[0x2]
156+
COPY_FILE_OPEN_SOURCE_FOR_WRITE: Literal[0x4]
157+
COPY_FILE_ALLOW_DECRYPTED_DESTINATION: Literal[0x8]
158+
COPY_FILE_COPY_SYMLINK: Literal[0x800]
159+
COPY_FILE_NO_BUFFERING: Literal[0x1000]
160+
COPY_FILE_REQUEST_SECURITY_PRIVILEGES: Literal[0x2000]
161+
COPY_FILE_RESUME_FROM_PAUSE: Literal[0x4000]
162+
COPY_FILE_NO_OFFLOAD: Literal[0x40000]
163+
COPY_FILE_REQUEST_COMPRESSED_TRAFFIC: Literal[0x10000000]
164+
165+
ERROR_ACCESS_DENIED: Literal[5]
166+
ERROR_PRIVILEGE_NOT_HELD: Literal[1314]
167+
140168
def CloseHandle(__handle: int) -> None: ...
141169
@overload
142170
def ConnectNamedPipe(handle: int, overlapped: Literal[True]) -> Overlapped: ...
@@ -224,3 +252,6 @@ if sys.platform == "win32":
224252
def GetOverlappedResult(self, __wait: bool) -> tuple[int, int]: ...
225253
def cancel(self) -> None: ...
226254
def getbuffer(self) -> bytes | None: ...
255+
256+
if sys.version_info >= (3, 12):
257+
def CopyFile2(existing_file_name: str, new_file_name: str, flags: int, progress_routine: int | None = None) -> int: ...

tests/stubtest_allowlists/py312.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,6 @@ zipfile.Path.relative_to
197197
zipfile.Path.rglob
198198
zoneinfo.ZoneInfo.from_file
199199

200-
array.array.__release_buffer__
201-
builtins.bytearray.__release_buffer__
202-
builtins.memoryview.__release_buffer__
203-
mmap.mmap.__release_buffer__
204-
pickle.PickleBuffer.__release_buffer__
205-
206200
# Errors that also existed on Python 3.11
207201
_collections_abc.AsyncGenerator.ag_await
208202
_collections_abc.AsyncGenerator.ag_code

0 commit comments

Comments
 (0)