winrt-Windows.System.Threading 2.0.1__tar.gz → 2.2.0__tar.gz

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.
Files changed (19) hide show
  1. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/PKG-INFO +4 -4
  2. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/all-requirements.txt +2 -2
  3. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/py.Windows.System.Threading.cpp +154 -90
  4. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_system_threading-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/winrt/_winrt_windows_system_threading.pyi +6 -7
  8. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/winrt/windows/system/threading/__init__.py +6 -3
  9. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/winrt_Windows.System.Threading.egg-info/PKG-INFO +4 -4
  10. winrt_windows_system_threading-2.2.0/winrt_Windows.System.Threading.egg-info/requires.txt +4 -0
  11. winrt_windows_system_threading-2.0.1/pywinrt-version.txt +0 -1
  12. winrt_windows_system_threading-2.0.1/winrt_Windows.System.Threading.egg-info/requires.txt +0 -4
  13. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/README.md +0 -0
  14. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/setup.cfg +0 -0
  15. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/setup.py +0 -0
  16. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/winrt/windows/system/threading/py.typed +0 -0
  17. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/winrt_Windows.System.Threading.egg-info/SOURCES.txt +0 -0
  18. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/winrt_Windows.System.Threading.egg-info/dependency_links.txt +0 -0
  19. {winrt_windows_system_threading-2.0.1 → winrt_windows_system_threading-2.2.0}/winrt_Windows.System.Threading.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Threading
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,11 +10,11 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-Windows.Foundation[all]==2.0.1
3
+ winrt-Windows.Foundation[all]==2.2.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  #include "py.Windows.System.Threading.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::System::Threading
7
6
  {
8
7
  // ----- ThreadPool class --------------------
@@ -20,14 +19,21 @@ namespace py::cpp::Windows::System::Threading
20
19
 
21
20
  if (arg_count == 1)
22
21
  {
23
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPool", L"RunAsync", 1))
24
- {
25
- py::set_arg_count_version_error(1);
26
- return nullptr;
27
- }
28
-
29
22
  try
30
23
  {
24
+ static std::optional<bool> is_overload_present{};
25
+
26
+ if (!is_overload_present.has_value())
27
+ {
28
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPool", L"RunAsync", 1);
29
+ }
30
+
31
+ if (!is_overload_present.value())
32
+ {
33
+ py::set_arg_count_version_error(1);
34
+ return nullptr;
35
+ }
36
+
31
37
  auto param0 = py::convert_to<winrt::Windows::System::Threading::WorkItemHandler>(args, 0);
32
38
 
33
39
  return py::convert(winrt::Windows::System::Threading::ThreadPool::RunAsync(param0));
@@ -40,14 +46,21 @@ namespace py::cpp::Windows::System::Threading
40
46
  }
41
47
  else if (arg_count == 2)
42
48
  {
43
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPool", L"RunAsync", 2))
44
- {
45
- py::set_arg_count_version_error(2);
46
- return nullptr;
47
- }
48
-
49
49
  try
50
50
  {
51
+ static std::optional<bool> is_overload_present{};
52
+
53
+ if (!is_overload_present.has_value())
54
+ {
55
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPool", L"RunAsync", 2);
56
+ }
57
+
58
+ if (!is_overload_present.value())
59
+ {
60
+ py::set_arg_count_version_error(2);
61
+ return nullptr;
62
+ }
63
+
51
64
  auto param0 = py::convert_to<winrt::Windows::System::Threading::WorkItemHandler>(args, 0);
52
65
  auto param1 = py::convert_to<winrt::Windows::System::Threading::WorkItemPriority>(args, 1);
53
66
 
@@ -61,14 +74,21 @@ namespace py::cpp::Windows::System::Threading
61
74
  }
62
75
  else if (arg_count == 3)
63
76
  {
64
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPool", L"RunAsync", 3))
65
- {
66
- py::set_arg_count_version_error(3);
67
- return nullptr;
68
- }
69
-
70
77
  try
71
78
  {
79
+ static std::optional<bool> is_overload_present{};
80
+
81
+ if (!is_overload_present.has_value())
82
+ {
83
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPool", L"RunAsync", 3);
84
+ }
85
+
86
+ if (!is_overload_present.value())
87
+ {
88
+ py::set_arg_count_version_error(3);
89
+ return nullptr;
90
+ }
91
+
72
92
  auto param0 = py::convert_to<winrt::Windows::System::Threading::WorkItemHandler>(args, 0);
73
93
  auto param1 = py::convert_to<winrt::Windows::System::Threading::WorkItemPriority>(args, 1);
74
94
  auto param2 = py::convert_to<winrt::Windows::System::Threading::WorkItemOptions>(args, 2);
@@ -96,22 +116,19 @@ namespace py::cpp::Windows::System::Threading
96
116
  { }
97
117
  };
98
118
 
99
- static PyType_Slot _type_slots_ThreadPool[] =
100
- {
119
+ static PyType_Slot _type_slots_ThreadPool[] = {
101
120
  { Py_tp_new, reinterpret_cast<void*>(_new_ThreadPool) },
102
121
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ThreadPool) },
103
122
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ThreadPool) },
104
- { },
123
+ { }
105
124
  };
106
125
 
107
- static PyType_Spec type_spec_ThreadPool =
108
- {
126
+ static PyType_Spec type_spec_ThreadPool = {
109
127
  "winrt._winrt_windows_system_threading.ThreadPool",
110
128
  0,
111
129
  0,
112
130
  Py_TPFLAGS_DEFAULT,
113
- _type_slots_ThreadPool
114
- };
131
+ _type_slots_ThreadPool};
115
132
 
116
133
  static PyGetSetDef getset_ThreadPool_Static[] = {
117
134
  { }
@@ -162,14 +179,21 @@ namespace py::cpp::Windows::System::Threading
162
179
 
163
180
  if (arg_count == 0)
164
181
  {
165
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"Cancel", 0))
166
- {
167
- py::set_arg_count_version_error(0);
168
- return nullptr;
169
- }
170
-
171
182
  try
172
183
  {
184
+ static std::optional<bool> is_overload_present{};
185
+
186
+ if (!is_overload_present.has_value())
187
+ {
188
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"Cancel", 0);
189
+ }
190
+
191
+ if (!is_overload_present.value())
192
+ {
193
+ py::set_arg_count_version_error(0);
194
+ return nullptr;
195
+ }
196
+
173
197
  self->obj.Cancel();
174
198
  Py_RETURN_NONE;
175
199
  }
@@ -192,14 +216,21 @@ namespace py::cpp::Windows::System::Threading
192
216
 
193
217
  if (arg_count == 2)
194
218
  {
195
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreatePeriodicTimer", 2))
196
- {
197
- py::set_arg_count_version_error(2);
198
- return nullptr;
199
- }
200
-
201
219
  try
202
220
  {
221
+ static std::optional<bool> is_overload_present{};
222
+
223
+ if (!is_overload_present.has_value())
224
+ {
225
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreatePeriodicTimer", 2);
226
+ }
227
+
228
+ if (!is_overload_present.value())
229
+ {
230
+ py::set_arg_count_version_error(2);
231
+ return nullptr;
232
+ }
233
+
203
234
  auto param0 = py::convert_to<winrt::Windows::System::Threading::TimerElapsedHandler>(args, 0);
204
235
  auto param1 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 1);
205
236
 
@@ -213,14 +244,21 @@ namespace py::cpp::Windows::System::Threading
213
244
  }
214
245
  else if (arg_count == 3)
215
246
  {
216
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreatePeriodicTimer", 3))
217
- {
218
- py::set_arg_count_version_error(3);
219
- return nullptr;
220
- }
221
-
222
247
  try
223
248
  {
249
+ static std::optional<bool> is_overload_present{};
250
+
251
+ if (!is_overload_present.has_value())
252
+ {
253
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreatePeriodicTimer", 3);
254
+ }
255
+
256
+ if (!is_overload_present.value())
257
+ {
258
+ py::set_arg_count_version_error(3);
259
+ return nullptr;
260
+ }
261
+
224
262
  auto param0 = py::convert_to<winrt::Windows::System::Threading::TimerElapsedHandler>(args, 0);
225
263
  auto param1 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 1);
226
264
  auto param2 = py::convert_to<winrt::Windows::System::Threading::TimerDestroyedHandler>(args, 2);
@@ -246,14 +284,21 @@ namespace py::cpp::Windows::System::Threading
246
284
 
247
285
  if (arg_count == 2)
248
286
  {
249
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreateTimer", 2))
250
- {
251
- py::set_arg_count_version_error(2);
252
- return nullptr;
253
- }
254
-
255
287
  try
256
288
  {
289
+ static std::optional<bool> is_overload_present{};
290
+
291
+ if (!is_overload_present.has_value())
292
+ {
293
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreateTimer", 2);
294
+ }
295
+
296
+ if (!is_overload_present.value())
297
+ {
298
+ py::set_arg_count_version_error(2);
299
+ return nullptr;
300
+ }
301
+
257
302
  auto param0 = py::convert_to<winrt::Windows::System::Threading::TimerElapsedHandler>(args, 0);
258
303
  auto param1 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 1);
259
304
 
@@ -267,14 +312,21 @@ namespace py::cpp::Windows::System::Threading
267
312
  }
268
313
  else if (arg_count == 3)
269
314
  {
270
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreateTimer", 3))
271
- {
272
- py::set_arg_count_version_error(3);
273
- return nullptr;
274
- }
275
-
276
315
  try
277
316
  {
317
+ static std::optional<bool> is_overload_present{};
318
+
319
+ if (!is_overload_present.has_value())
320
+ {
321
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreateTimer", 3);
322
+ }
323
+
324
+ if (!is_overload_present.value())
325
+ {
326
+ py::set_arg_count_version_error(3);
327
+ return nullptr;
328
+ }
329
+
278
330
  auto param0 = py::convert_to<winrt::Windows::System::Threading::TimerElapsedHandler>(args, 0);
279
331
  auto param1 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 1);
280
332
  auto param2 = py::convert_to<winrt::Windows::System::Threading::TimerDestroyedHandler>(args, 2);
@@ -296,14 +348,21 @@ namespace py::cpp::Windows::System::Threading
296
348
 
297
349
  static PyObject* ThreadPoolTimer_get_Delay(py::wrapper::Windows::System::Threading::ThreadPoolTimer* self, void* /*unused*/) noexcept
298
350
  {
299
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Threading.ThreadPoolTimer", L"Delay"))
300
- {
301
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
302
- return nullptr;
303
- }
304
-
305
351
  try
306
352
  {
353
+ static std::optional<bool> is_property_present{};
354
+
355
+ if (!is_property_present.has_value())
356
+ {
357
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Threading.ThreadPoolTimer", L"Delay");
358
+ }
359
+
360
+ if (!is_property_present.value())
361
+ {
362
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
363
+ return nullptr;
364
+ }
365
+
307
366
  return py::convert(self->obj.Delay());
308
367
  }
309
368
  catch (...)
@@ -315,14 +374,21 @@ namespace py::cpp::Windows::System::Threading
315
374
 
316
375
  static PyObject* ThreadPoolTimer_get_Period(py::wrapper::Windows::System::Threading::ThreadPoolTimer* self, void* /*unused*/) noexcept
317
376
  {
318
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Threading.ThreadPoolTimer", L"Period"))
319
- {
320
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
321
- return nullptr;
322
- }
323
-
324
377
  try
325
378
  {
379
+ static std::optional<bool> is_property_present{};
380
+
381
+ if (!is_property_present.has_value())
382
+ {
383
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Threading.ThreadPoolTimer", L"Period");
384
+ }
385
+
386
+ if (!is_property_present.value())
387
+ {
388
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
389
+ return nullptr;
390
+ }
391
+
326
392
  return py::convert(self->obj.Period());
327
393
  }
328
394
  catch (...)
@@ -369,23 +435,20 @@ namespace py::cpp::Windows::System::Threading
369
435
  { }
370
436
  };
371
437
 
372
- static PyType_Slot _type_slots_ThreadPoolTimer[] =
373
- {
438
+ static PyType_Slot _type_slots_ThreadPoolTimer[] = {
374
439
  { Py_tp_new, reinterpret_cast<void*>(_new_ThreadPoolTimer) },
375
440
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ThreadPoolTimer) },
376
441
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ThreadPoolTimer) },
377
442
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ThreadPoolTimer) },
378
- { },
443
+ { }
379
444
  };
380
445
 
381
- static PyType_Spec type_spec_ThreadPoolTimer =
382
- {
446
+ static PyType_Spec type_spec_ThreadPoolTimer = {
383
447
  "winrt._winrt_windows_system_threading.ThreadPoolTimer",
384
448
  sizeof(py::wrapper::Windows::System::Threading::ThreadPoolTimer),
385
449
  0,
386
450
  Py_TPFLAGS_DEFAULT,
387
- _type_slots_ThreadPoolTimer
388
- };
451
+ _type_slots_ThreadPoolTimer};
389
452
 
390
453
  static PyGetSetDef getset_ThreadPoolTimer_Static[] = {
391
454
  { }
@@ -415,20 +478,19 @@ namespace py::cpp::Windows::System::Threading
415
478
  };
416
479
 
417
480
  // ----- Windows.System.Threading Initialization --------------------
418
- PyDoc_STRVAR(module_doc, "Windows::System::Threading");
419
481
 
482
+ PyDoc_STRVAR(module_doc, "Windows.System.Threading");
420
483
 
421
- static PyModuleDef module_def
422
- = {PyModuleDef_HEAD_INIT,
423
- "_winrt_windows_system_threading",
424
- module_doc,
425
- 0,
426
- nullptr,
427
- nullptr,
428
- nullptr,
429
- nullptr,
430
- nullptr};
431
-
484
+ static PyModuleDef module_def = {
485
+ PyModuleDef_HEAD_INIT,
486
+ "_winrt_windows_system_threading",
487
+ module_doc,
488
+ 0,
489
+ nullptr,
490
+ nullptr,
491
+ nullptr,
492
+ nullptr,
493
+ nullptr};
432
494
  } // py::cpp::Windows::System::Threading
433
495
 
434
496
  PyMODINIT_FUNC PyInit__winrt_windows_system_threading(void) noexcept
@@ -466,7 +528,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_threading(void) noexcept
466
528
  return nullptr;
467
529
  }
468
530
 
469
- if (py::register_python_type(module.get(), &type_spec_ThreadPool, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_ThreadPool_Static.get())) == -1)
531
+ py::pytype_handle ThreadPool_type{py::register_python_type(module.get(), &type_spec_ThreadPool, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_ThreadPool_Static.get()))};
532
+ if (!ThreadPool_type)
470
533
  {
471
534
  return nullptr;
472
535
  }
@@ -477,7 +540,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_threading(void) noexcept
477
540
  return nullptr;
478
541
  }
479
542
 
480
- if (py::register_python_type(module.get(), &type_spec_ThreadPoolTimer, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_ThreadPoolTimer_Static.get())) == -1)
543
+ py::pytype_handle ThreadPoolTimer_type{py::register_python_type(module.get(), &type_spec_ThreadPoolTimer, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_ThreadPoolTimer_Static.get()))};
544
+ if (!ThreadPoolTimer_type)
481
545
  {
482
546
  return nullptr;
483
547
  }
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "Intended Audience :: Developers",
17
17
  ]
18
18
  dynamic = ["version", "dependencies", "optional-dependencies"]
19
- requires-python = ">=3.9,<3.13"
19
+ requires-python = ">=3.9,<3.14"
20
20
 
21
21
  [project.urls]
22
22
  # Homepage = "https://github.com/pywinrt/pywinrt"
@@ -36,7 +36,8 @@ optional-dependencies.all = { file = "all-requirements.txt" }
36
36
  # use local winrt-sdk build dependency
37
37
  environment = { PYTHONPATH="../winrt-sdk/src" }
38
38
  # don't install winrt-sdk from PyPI
39
- build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
39
+ build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
40
+ before-build = "uv pip install setuptools"
40
41
  # don't build for PyPy
41
42
  skip = "pp*"
42
43
  # suppress warnings about ARM64 testing
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-runtime==2.0.1
3
+ winrt-runtime==2.2.0
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -9,7 +9,7 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.foundation
12
+ import winrt.windows.foundation as windows_foundation
13
13
 
14
14
  from winrt.windows.system.threading import WorkItemOptions, WorkItemPriority
15
15
  from winrt.windows.system.threading import TimerDestroyedHandler, TimerElapsedHandler, WorkItemHandler
@@ -19,16 +19,15 @@ Self = typing.TypeVar('Self')
19
19
  @typing.final
20
20
  class ThreadPool_Static(type):
21
21
  @typing.overload
22
- def run_async(cls, handler: typing.Optional[WorkItemHandler], /) -> winrt.windows.foundation.IAsyncAction: ...
22
+ def run_async(cls, handler: typing.Optional[WorkItemHandler], /) -> windows_foundation.IAsyncAction: ...
23
23
  @typing.overload
24
- def run_async(cls, handler: typing.Optional[WorkItemHandler], priority: WorkItemPriority, /) -> winrt.windows.foundation.IAsyncAction: ...
24
+ def run_async(cls, handler: typing.Optional[WorkItemHandler], priority: WorkItemPriority, /) -> windows_foundation.IAsyncAction: ...
25
25
  @typing.overload
26
- def run_async(cls, handler: typing.Optional[WorkItemHandler], priority: WorkItemPriority, options: WorkItemOptions, /) -> winrt.windows.foundation.IAsyncAction: ...
26
+ def run_async(cls, handler: typing.Optional[WorkItemHandler], priority: WorkItemPriority, options: WorkItemOptions, /) -> windows_foundation.IAsyncAction: ...
27
27
 
28
28
  @typing.final
29
29
  class ThreadPool(winrt.system.Object, metaclass=ThreadPool_Static):
30
- @staticmethod
31
- def _from(obj: winrt.system.Object, /) -> ThreadPool: ...
30
+ pass
32
31
 
33
32
  @typing.final
34
33
  class ThreadPoolTimer_Static(type):
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import enum
4
4
  import typing
@@ -7,6 +7,9 @@ import uuid as _uuid
7
7
  import winrt.system
8
8
  from winrt import _winrt_windows_system_threading
9
9
 
10
+ if typing.TYPE_CHECKING:
11
+ import winrt.windows.foundation as windows_foundation
12
+
10
13
  __all__ = [
11
14
  "WorkItemOptions",
12
15
  "WorkItemPriority",
@@ -18,7 +21,7 @@ __all__ = [
18
21
  ]
19
22
 
20
23
  class WorkItemOptions(enum.IntFlag):
21
- NONE = 0
24
+ NONE = 0x0
22
25
  TIME_SLICED = 0x1
23
26
 
24
27
  class WorkItemPriority(enum.IntEnum):
@@ -30,4 +33,4 @@ ThreadPool = _winrt_windows_system_threading.ThreadPool
30
33
  ThreadPoolTimer = _winrt_windows_system_threading.ThreadPoolTimer
31
34
  TimerDestroyedHandler = typing.Callable[[typing.Optional[ThreadPoolTimer]], None]
32
35
  TimerElapsedHandler = typing.Callable[[typing.Optional[ThreadPoolTimer]], None]
33
- WorkItemHandler = typing.Callable[[winrt.windows.foundation.IAsyncAction], None]
36
+ WorkItemHandler = typing.Callable[["windows_foundation.IAsyncAction"], None]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Threading
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,11 +10,11 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -0,0 +1,4 @@
1
+ winrt-runtime==2.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.2.0
@@ -1,4 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.1