winrt-Windows.System.Threading.Core 2.0.0b2__tar.gz → 2.1.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 (21) hide show
  1. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/PKG-INFO +4 -1
  2. winrt_windows_system_threading_core-2.1.0/all-requirements.txt +4 -0
  3. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/py.Windows.System.Threading.Core.cpp +62 -70
  4. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/pyproject.toml +2 -2
  5. winrt_windows_system_threading_core-2.1.0/pywinrt-version.txt +1 -0
  6. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/requirements.txt +2 -2
  7. winrt_windows_system_threading_core-2.1.0/setup.py +31 -0
  8. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/winrt/_winrt_windows_system_threading_core.pyi +7 -7
  9. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/winrt/windows/system/threading/core/__init__.py +1 -1
  10. winrt_windows_system_threading_core-2.1.0/winrt/windows/system/threading/core/py.typed +0 -0
  11. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/winrt_Windows.System.Threading.Core.egg-info/PKG-INFO +4 -1
  12. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/winrt_Windows.System.Threading.Core.egg-info/SOURCES.txt +1 -0
  13. winrt_windows_system_threading_core-2.1.0/winrt_Windows.System.Threading.Core.egg-info/requires.txt +5 -0
  14. winrt-Windows.System.Threading.Core-2.0.0b2/all-requirements.txt +0 -4
  15. winrt-Windows.System.Threading.Core-2.0.0b2/pywinrt-version.txt +0 -1
  16. winrt-Windows.System.Threading.Core-2.0.0b2/setup.py +0 -16
  17. winrt-Windows.System.Threading.Core-2.0.0b2/winrt_Windows.System.Threading.Core.egg-info/requires.txt +0 -5
  18. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/README.md +0 -0
  19. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/setup.cfg +0 -0
  20. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/winrt_Windows.System.Threading.Core.egg-info/dependency_links.txt +0 -0
  21. {winrt-Windows.System.Threading.Core-2.0.0b2 → winrt_windows_system_threading_core-2.1.0}/winrt_Windows.System.Threading.Core.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Threading.Core
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,7 +12,10 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
15
16
  Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.System.Threading[all]==2.1.0; extra == "all"
16
19
 
17
20
  <!-- warning: Please don't edit this file. It was automatically generated. -->
18
21
 
@@ -0,0 +1,4 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
+
3
+ winrt-Windows.Foundation[all]==2.1.0
4
+ winrt-Windows.System.Threading[all]==2.1.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  #include "py.Windows.System.Threading.Core.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::System::Threading::Core
7
6
  {
8
7
  // ----- PreallocatedWorkItem class --------------------
@@ -85,14 +84,14 @@ namespace py::cpp::Windows::System::Threading::Core
85
84
 
86
85
  if (arg_count == 0)
87
86
  {
88
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.PreallocatedWorkItem", L"RunAsync", 0))
89
- {
90
- py::set_arg_count_version_error(0);
91
- return nullptr;
92
- }
93
-
94
87
  try
95
88
  {
89
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.PreallocatedWorkItem", L"RunAsync", 0))
90
+ {
91
+ py::set_arg_count_version_error(0);
92
+ return nullptr;
93
+ }
94
+
96
95
  return py::convert(self->obj.RunAsync());
97
96
  }
98
97
  catch (...)
@@ -143,23 +142,20 @@ namespace py::cpp::Windows::System::Threading::Core
143
142
  { }
144
143
  };
145
144
 
146
- static PyType_Slot _type_slots_PreallocatedWorkItem[] =
147
- {
145
+ static PyType_Slot _type_slots_PreallocatedWorkItem[] = {
148
146
  { Py_tp_new, reinterpret_cast<void*>(_new_PreallocatedWorkItem) },
149
147
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PreallocatedWorkItem) },
150
148
  { Py_tp_methods, reinterpret_cast<void*>(_methods_PreallocatedWorkItem) },
151
149
  { Py_tp_getset, reinterpret_cast<void*>(_getset_PreallocatedWorkItem) },
152
- { },
150
+ { }
153
151
  };
154
152
 
155
- static PyType_Spec type_spec_PreallocatedWorkItem =
156
- {
153
+ static PyType_Spec type_spec_PreallocatedWorkItem = {
157
154
  "winrt._winrt_windows_system_threading_core.PreallocatedWorkItem",
158
155
  sizeof(py::wrapper::Windows::System::Threading::Core::PreallocatedWorkItem),
159
156
  0,
160
157
  Py_TPFLAGS_DEFAULT,
161
- _type_slots_PreallocatedWorkItem
162
- };
158
+ _type_slots_PreallocatedWorkItem};
163
159
 
164
160
  // ----- SignalNotifier class --------------------
165
161
 
@@ -184,14 +180,14 @@ namespace py::cpp::Windows::System::Threading::Core
184
180
 
185
181
  if (arg_count == 2)
186
182
  {
187
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"AttachToEvent", 2))
188
- {
189
- py::set_arg_count_version_error(2);
190
- return nullptr;
191
- }
192
-
193
183
  try
194
184
  {
185
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"AttachToEvent", 2))
186
+ {
187
+ py::set_arg_count_version_error(2);
188
+ return nullptr;
189
+ }
190
+
195
191
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
196
192
  auto param1 = py::convert_to<winrt::Windows::System::Threading::Core::SignalHandler>(args, 1);
197
193
 
@@ -205,14 +201,14 @@ namespace py::cpp::Windows::System::Threading::Core
205
201
  }
206
202
  else if (arg_count == 3)
207
203
  {
208
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"AttachToEvent", 3))
209
- {
210
- py::set_arg_count_version_error(3);
211
- return nullptr;
212
- }
213
-
214
204
  try
215
205
  {
206
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"AttachToEvent", 3))
207
+ {
208
+ py::set_arg_count_version_error(3);
209
+ return nullptr;
210
+ }
211
+
216
212
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
217
213
  auto param1 = py::convert_to<winrt::Windows::System::Threading::Core::SignalHandler>(args, 1);
218
214
  auto param2 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 2);
@@ -238,14 +234,14 @@ namespace py::cpp::Windows::System::Threading::Core
238
234
 
239
235
  if (arg_count == 2)
240
236
  {
241
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"AttachToSemaphore", 2))
242
- {
243
- py::set_arg_count_version_error(2);
244
- return nullptr;
245
- }
246
-
247
237
  try
248
238
  {
239
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"AttachToSemaphore", 2))
240
+ {
241
+ py::set_arg_count_version_error(2);
242
+ return nullptr;
243
+ }
244
+
249
245
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
250
246
  auto param1 = py::convert_to<winrt::Windows::System::Threading::Core::SignalHandler>(args, 1);
251
247
 
@@ -259,14 +255,14 @@ namespace py::cpp::Windows::System::Threading::Core
259
255
  }
260
256
  else if (arg_count == 3)
261
257
  {
262
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"AttachToSemaphore", 3))
263
- {
264
- py::set_arg_count_version_error(3);
265
- return nullptr;
266
- }
267
-
268
258
  try
269
259
  {
260
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"AttachToSemaphore", 3))
261
+ {
262
+ py::set_arg_count_version_error(3);
263
+ return nullptr;
264
+ }
265
+
270
266
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
271
267
  auto param1 = py::convert_to<winrt::Windows::System::Threading::Core::SignalHandler>(args, 1);
272
268
  auto param2 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 2);
@@ -292,14 +288,14 @@ namespace py::cpp::Windows::System::Threading::Core
292
288
 
293
289
  if (arg_count == 0)
294
290
  {
295
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"Enable", 0))
296
- {
297
- py::set_arg_count_version_error(0);
298
- return nullptr;
299
- }
300
-
301
291
  try
302
292
  {
293
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"Enable", 0))
294
+ {
295
+ py::set_arg_count_version_error(0);
296
+ return nullptr;
297
+ }
298
+
303
299
  self->obj.Enable();
304
300
  Py_RETURN_NONE;
305
301
  }
@@ -322,14 +318,14 @@ namespace py::cpp::Windows::System::Threading::Core
322
318
 
323
319
  if (arg_count == 0)
324
320
  {
325
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"Terminate", 0))
326
- {
327
- py::set_arg_count_version_error(0);
328
- return nullptr;
329
- }
330
-
331
321
  try
332
322
  {
323
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.Core.SignalNotifier", L"Terminate", 0))
324
+ {
325
+ py::set_arg_count_version_error(0);
326
+ return nullptr;
327
+ }
328
+
333
329
  self->obj.Terminate();
334
330
  Py_RETURN_NONE;
335
331
  }
@@ -382,23 +378,20 @@ namespace py::cpp::Windows::System::Threading::Core
382
378
  { }
383
379
  };
384
380
 
385
- static PyType_Slot _type_slots_SignalNotifier[] =
386
- {
381
+ static PyType_Slot _type_slots_SignalNotifier[] = {
387
382
  { Py_tp_new, reinterpret_cast<void*>(_new_SignalNotifier) },
388
383
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SignalNotifier) },
389
384
  { Py_tp_methods, reinterpret_cast<void*>(_methods_SignalNotifier) },
390
385
  { Py_tp_getset, reinterpret_cast<void*>(_getset_SignalNotifier) },
391
- { },
386
+ { }
392
387
  };
393
388
 
394
- static PyType_Spec type_spec_SignalNotifier =
395
- {
389
+ static PyType_Spec type_spec_SignalNotifier = {
396
390
  "winrt._winrt_windows_system_threading_core.SignalNotifier",
397
391
  sizeof(py::wrapper::Windows::System::Threading::Core::SignalNotifier),
398
392
  0,
399
393
  Py_TPFLAGS_DEFAULT,
400
- _type_slots_SignalNotifier
401
- };
394
+ _type_slots_SignalNotifier};
402
395
 
403
396
  static PyGetSetDef getset_SignalNotifier_Static[] = {
404
397
  { }
@@ -428,20 +421,19 @@ namespace py::cpp::Windows::System::Threading::Core
428
421
  };
429
422
 
430
423
  // ----- Windows.System.Threading.Core Initialization --------------------
431
- PyDoc_STRVAR(module_doc, "Windows::System::Threading::Core");
432
424
 
425
+ PyDoc_STRVAR(module_doc, "Windows.System.Threading.Core");
433
426
 
434
- static PyModuleDef module_def
435
- = {PyModuleDef_HEAD_INIT,
436
- "_winrt_windows_system_threading_core",
437
- module_doc,
438
- 0,
439
- nullptr,
440
- nullptr,
441
- nullptr,
442
- nullptr,
443
- nullptr};
444
-
427
+ static PyModuleDef module_def = {
428
+ PyModuleDef_HEAD_INIT,
429
+ "_winrt_windows_system_threading_core",
430
+ module_doc,
431
+ 0,
432
+ nullptr,
433
+ nullptr,
434
+ nullptr,
435
+ nullptr,
436
+ nullptr};
445
437
  } // py::cpp::Windows::System::Threading::Core
446
438
 
447
439
  PyMODINIT_FUNC PyInit__winrt_windows_system_threading_core(void) noexcept
@@ -1,7 +1,7 @@
1
1
  # WARNING: Please don't edit this file. It was automatically generated.
2
2
 
3
3
  [build-system]
4
- requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
4
+ requires = ["setuptools", "winrt-sdk"]
5
5
  build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
@@ -30,7 +30,7 @@ dependencies = { file = "requirements.txt" }
30
30
  optional-dependencies.all = { file = "all-requirements.txt" }
31
31
 
32
32
  [tool.setuptools.package-data]
33
- winrt = ["*.pyi"]
33
+ "*" = ["*.pyi", "py.typed"]
34
34
 
35
35
  [tool.cibuildwheel]
36
36
  # use local winrt-sdk build dependency
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
- winrt-runtime==2.0.0-beta.2
3
+ winrt-runtime==2.1.0
@@ -0,0 +1,31 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ from setuptools import Extension, setup
4
+ from setuptools.command.build_ext import build_ext
5
+ from winrt_sdk import get_include_dirs
6
+
7
+
8
+ class build_ext_ex(build_ext):
9
+ def build_extension(self, ext):
10
+ if self.compiler.compiler_type == "msvc":
11
+ ext.extra_compile_args = ["/std:c++20", "/permissive-"]
12
+ elif self.compiler.compiler_type == "mingw32":
13
+ ext.extra_compile_args = ["-std=c++20", "-D_WIN32_WINNT=_WIN32_WINNT_WIN10"]
14
+ ext.extra_link_args = ["-loleaut32"]
15
+ else:
16
+ raise ValueError(f"Unsupported compiler: {self.compiler.compiler_type}")
17
+
18
+ build_ext.build_extension(self, ext)
19
+
20
+
21
+ setup(
22
+ cmdclass = {'build_ext': build_ext_ex},
23
+ ext_modules=[
24
+ Extension(
25
+ "winrt._winrt_windows_system_threading_core",
26
+ sources=["py.Windows.System.Threading.Core.cpp"],
27
+ include_dirs=get_include_dirs(),
28
+ libraries=["windowsapp"],
29
+ )
30
+ ],
31
+ )
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -9,8 +9,8 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.foundation
13
- import winrt.windows.system.threading
12
+ import winrt.windows.foundation as windows_foundation
13
+ import winrt.windows.system.threading as windows_system_threading
14
14
 
15
15
  from winrt.windows.system.threading.core import SignalHandler
16
16
 
@@ -21,12 +21,12 @@ class PreallocatedWorkItem(winrt.system.Object):
21
21
  @staticmethod
22
22
  def _from(obj: winrt.system.Object, /) -> PreallocatedWorkItem: ...
23
23
  @typing.overload
24
- def __new__(cls: typing.Type[PreallocatedWorkItem], handler: typing.Optional[winrt.windows.system.threading.WorkItemHandler]) -> PreallocatedWorkItem:...
24
+ def __new__(cls: typing.Type[PreallocatedWorkItem], handler: typing.Optional[windows_system_threading.WorkItemHandler]) -> PreallocatedWorkItem: ...
25
25
  @typing.overload
26
- def __new__(cls: typing.Type[PreallocatedWorkItem], handler: typing.Optional[winrt.windows.system.threading.WorkItemHandler], priority: winrt.windows.system.threading.WorkItemPriority) -> PreallocatedWorkItem:...
26
+ def __new__(cls: typing.Type[PreallocatedWorkItem], handler: typing.Optional[windows_system_threading.WorkItemHandler], priority: windows_system_threading.WorkItemPriority) -> PreallocatedWorkItem: ...
27
27
  @typing.overload
28
- def __new__(cls: typing.Type[PreallocatedWorkItem], handler: typing.Optional[winrt.windows.system.threading.WorkItemHandler], priority: winrt.windows.system.threading.WorkItemPriority, options: winrt.windows.system.threading.WorkItemOptions) -> PreallocatedWorkItem:...
29
- def run_async(self) -> winrt.windows.foundation.IAsyncAction: ...
28
+ def __new__(cls: typing.Type[PreallocatedWorkItem], handler: typing.Optional[windows_system_threading.WorkItemHandler], priority: windows_system_threading.WorkItemPriority, options: windows_system_threading.WorkItemOptions) -> PreallocatedWorkItem: ...
29
+ def run_async(self) -> windows_foundation.IAsyncAction: ...
30
30
 
31
31
  @typing.final
32
32
  class SignalNotifier_Static(type):
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  import typing
4
4
  import uuid as _uuid
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Threading.Core
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,7 +12,10 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
15
16
  Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.System.Threading[all]==2.1.0; extra == "all"
16
19
 
17
20
  <!-- warning: Please don't edit this file. It was automatically generated. -->
18
21
 
@@ -7,6 +7,7 @@ requirements.txt
7
7
  setup.py
8
8
  winrt/_winrt_windows_system_threading_core.pyi
9
9
  winrt/windows/system/threading/core/__init__.py
10
+ winrt/windows/system/threading/core/py.typed
10
11
  winrt_Windows.System.Threading.Core.egg-info/PKG-INFO
11
12
  winrt_Windows.System.Threading.Core.egg-info/SOURCES.txt
12
13
  winrt_Windows.System.Threading.Core.egg-info/dependency_links.txt
@@ -0,0 +1,5 @@
1
+ winrt-runtime==2.1.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.1.0
5
+ winrt-Windows.System.Threading[all]==2.1.0
@@ -1,4 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
2
-
3
- winrt-Windows.Foundation[all]==2.0.0-beta.2
4
- winrt-Windows.System.Threading[all]==2.0.0-beta.2
@@ -1 +0,0 @@
1
- 2.0.0-beta.2
@@ -1,16 +0,0 @@
1
- # WARNING: Please don't edit this file. It was automatically generated.
2
-
3
- from setuptools import Extension, setup
4
- from winrt_sdk import get_include_dirs
5
-
6
- setup(
7
- ext_modules=[
8
- Extension(
9
- "winrt._winrt_windows_system_threading_core",
10
- sources=["py.Windows.System.Threading.Core.cpp"],
11
- include_dirs=get_include_dirs(),
12
- extra_compile_args=["/std:c++20", "/permissive-"],
13
- libraries=["windowsapp"],
14
- )
15
- ],
16
- )
@@ -1,5 +0,0 @@
1
- winrt-runtime==2.0.0-beta.2
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.0-beta.2
5
- winrt-Windows.System.Threading[all]==2.0.0-beta.2