winrt-Windows.Storage.Pickers 2.0.0b1__tar.gz → 2.0.1__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.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/PKG-INFO +8 -2
  2. winrt_windows_storage_pickers-2.0.1/all-requirements.txt +6 -0
  3. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/py.Windows.Storage.Pickers.cpp +11 -2
  4. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/pyproject.toml +7 -4
  5. winrt_windows_storage_pickers-2.0.1/pywinrt-version.txt +1 -0
  6. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/requirements.txt +2 -2
  7. winrt_windows_storage_pickers-2.0.1/setup.py +31 -0
  8. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/winrt/_winrt_windows_storage_pickers.pyi +16 -5
  9. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/winrt/windows/storage/pickers/__init__.py +1 -1
  10. winrt_windows_storage_pickers-2.0.1/winrt/windows/storage/pickers/py.typed +0 -0
  11. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/winrt_Windows.Storage.Pickers.egg-info/PKG-INFO +8 -2
  12. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/winrt_Windows.Storage.Pickers.egg-info/SOURCES.txt +1 -0
  13. winrt_windows_storage_pickers-2.0.1/winrt_Windows.Storage.Pickers.egg-info/requires.txt +7 -0
  14. winrt-Windows.Storage.Pickers-2.0.0b1/all-requirements.txt +0 -6
  15. winrt-Windows.Storage.Pickers-2.0.0b1/pywinrt-version.txt +0 -1
  16. winrt-Windows.Storage.Pickers-2.0.0b1/setup.py +0 -17
  17. winrt-Windows.Storage.Pickers-2.0.0b1/winrt_Windows.Storage.Pickers.egg-info/requires.txt +0 -7
  18. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/README.md +0 -0
  19. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/setup.cfg +0 -0
  20. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/winrt_Windows.Storage.Pickers.egg-info/dependency_links.txt +0 -0
  21. {winrt-Windows.Storage.Pickers-2.0.0b1 → winrt_windows_storage_pickers-2.0.1}/winrt_Windows.Storage.Pickers.egg-info/top_level.txt +0 -0
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Storage.Pickers
3
- Version: 2.0.0b1
3
+ Version: 2.0.1
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
- Project-URL: Repository, https://github.com/pywrint/pywrinrt
6
+ Project-URL: Documentation, https://pywinrt.readthedocs.io
7
+ Project-URL: Repository, https://github.com/pywinrt/pywinrt
7
8
  Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
8
9
  Classifier: Operating System :: Microsoft :: Windows
9
10
  Classifier: Programming Language :: Python :: 3
@@ -11,7 +12,12 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
11
12
  Classifier: Intended Audience :: Developers
12
13
  Requires-Python: <3.13,>=3.9
13
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.0.1
14
16
  Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.0.1; extra == "all"
19
+ Requires-Dist: winrt-Windows.Storage[all]==2.0.1; extra == "all"
20
+ Requires-Dist: winrt-Windows.System[all]==2.0.1; extra == "all"
15
21
 
16
22
  <!-- warning: Please don't edit this file. It was automatically generated. -->
17
23
 
@@ -0,0 +1,6 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
+
3
+ winrt-Windows.Foundation[all]==2.0.1
4
+ winrt-Windows.Foundation.Collections[all]==2.0.1
5
+ winrt-Windows.Storage[all]==2.0.1
6
+ winrt-Windows.System[all]==2.0.1
@@ -1,4 +1,4 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
2
 
3
3
  #include "py.Windows.Storage.Pickers.h"
4
4
 
@@ -1518,9 +1518,18 @@ namespace py::cpp::Windows::Storage::Pickers
1518
1518
  {
1519
1519
  try
1520
1520
  {
1521
- auto value = self->obj.TryLookup(py::convert_to<winrt::hstring>(key));
1521
+ auto _key = py::convert_to<winrt::hstring>(key);
1522
+ auto value = self->obj.TryLookup(_key);
1522
1523
 
1523
1524
  if (!value) {
1525
+ if constexpr (std::is_base_of_v<winrt::Windows::Foundation::IUnknown, decltype(value)>)
1526
+ {
1527
+ if (self->obj.HasKey(_key))
1528
+ {
1529
+ Py_RETURN_NONE;
1530
+ }
1531
+ }
1532
+
1524
1533
  PyErr_SetObject(PyExc_KeyError, key);
1525
1534
  return nullptr;
1526
1535
  }
@@ -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]
@@ -19,9 +19,9 @@ dynamic = ["version", "dependencies", "optional-dependencies"]
19
19
  requires-python = ">=3.9,<3.13"
20
20
 
21
21
  [project.urls]
22
- # Homepage = "https://github.com/pywrint/pywrinrt"
23
- # Documentation = "https://readthedocs.org"
24
- Repository = "https://github.com/pywrint/pywrinrt"
22
+ # Homepage = "https://github.com/pywinrt/pywinrt"
23
+ Documentation = "https://pywinrt.readthedocs.io"
24
+ Repository = "https://github.com/pywinrt/pywinrt"
25
25
  Changelog = "https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md"
26
26
 
27
27
  [tool.setuptools.dynamic]
@@ -29,6 +29,9 @@ version = { file = "pywinrt-version.txt" }
29
29
  dependencies = { file = "requirements.txt" }
30
30
  optional-dependencies.all = { file = "all-requirements.txt" }
31
31
 
32
+ [tool.setuptools.package-data]
33
+ "*" = ["*.pyi", "py.typed"]
34
+
32
35
  [tool.cibuildwheel]
33
36
  # use local winrt-sdk build dependency
34
37
  environment = { PYTHONPATH="../winrt-sdk/src" }
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
2
 
3
- winrt-runtime==2.0.0-beta.1
3
+ winrt-runtime==2.0.1
@@ -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_storage_pickers",
26
+ sources=["py.Windows.Storage.Pickers.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.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -18,18 +18,20 @@ from winrt.windows.storage.pickers import PickerLocationId, PickerViewMode
18
18
 
19
19
  Self = typing.TypeVar('Self')
20
20
 
21
+ @typing.final
21
22
  class FileExtensionVector(winrt.system.Object, winrt._winrt.MutableSequence[str]):
22
23
  def __len__(self) -> int: ...
24
+ def __iter__(self) -> winrt.windows.foundation.collections.IIterator[str]: ...
23
25
  @typing.overload
24
- def __getitem__(self, index: int) -> str: ...
26
+ def __getitem__(self, index: typing.SupportsIndex) -> str: ...
25
27
  @typing.overload
26
28
  def __getitem__(self, index: slice) -> winrt.system.Array[str]: ...
27
29
  @typing.overload
28
- def __delitem__(self, index: int) -> None: ...
30
+ def __delitem__(self, index: typing.SupportsIndex) -> None: ...
29
31
  @typing.overload
30
32
  def __delitem__(self, index: slice) -> None: ...
31
33
  @typing.overload
32
- def __setitem__(self, index: int, value: str) -> None: ...
34
+ def __setitem__(self, index: typing.SupportsIndex, value: str) -> None: ...
33
35
  @typing.overload
34
36
  def __setitem__(self, index: slice, value: typing.Iterable[str]) -> None: ...
35
37
  @staticmethod
@@ -49,10 +51,12 @@ class FileExtensionVector(winrt.system.Object, winrt._winrt.MutableSequence[str]
49
51
  @_property
50
52
  def size(self) -> winrt.system.UInt32: ...
51
53
 
54
+ @typing.final
52
55
  class FileOpenPicker_Static(type):
53
56
  def create_for_user(cls, user: typing.Optional[winrt.windows.system.User], /) -> typing.Optional[FileOpenPicker]: ...
54
57
  def resume_pick_single_file_async(cls) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.storage.StorageFile]: ...
55
58
 
59
+ @typing.final
56
60
  class FileOpenPicker(winrt.system.Object, metaclass=FileOpenPicker_Static):
57
61
  @staticmethod
58
62
  def _from(obj: winrt.system.Object, /) -> FileOpenPicker: ...
@@ -87,6 +91,7 @@ class FileOpenPicker(winrt.system.Object, metaclass=FileOpenPicker_Static):
87
91
  @_property
88
92
  def user(self) -> typing.Optional[winrt.windows.system.User]: ...
89
93
 
94
+ @typing.final
90
95
  class FilePickerFileTypesOrderedMap(winrt.system.Object, winrt._winrt.MutableMapping[str, winrt.windows.foundation.collections.IVector[str]]):
91
96
  def __len__(self) -> int: ...
92
97
  def __iter__(self) -> typing.Iterator[str]: ...
@@ -106,10 +111,12 @@ class FilePickerFileTypesOrderedMap(winrt.system.Object, winrt._winrt.MutableMap
106
111
  @_property
107
112
  def size(self) -> winrt.system.UInt32: ...
108
113
 
114
+ @typing.final
109
115
  class FilePickerSelectedFilesArray(winrt.system.Object, winrt._winrt.Sequence[winrt.windows.storage.StorageFile]):
110
116
  def __len__(self) -> int: ...
117
+ def __iter__(self) -> winrt.windows.foundation.collections.IIterator[winrt.windows.storage.StorageFile]: ...
111
118
  @typing.overload
112
- def __getitem__(self, index: int) -> winrt.windows.storage.StorageFile: ...
119
+ def __getitem__(self, index: typing.SupportsIndex) -> winrt.windows.storage.StorageFile: ...
113
120
  @typing.overload
114
121
  def __getitem__(self, index: slice) -> winrt.system.Array[winrt.windows.storage.StorageFile]: ...
115
122
  @staticmethod
@@ -121,9 +128,11 @@ class FilePickerSelectedFilesArray(winrt.system.Object, winrt._winrt.Sequence[wi
121
128
  @_property
122
129
  def size(self) -> winrt.system.UInt32: ...
123
130
 
131
+ @typing.final
124
132
  class FileSavePicker_Static(type):
125
133
  def create_for_user(cls, user: typing.Optional[winrt.windows.system.User], /) -> typing.Optional[FileSavePicker]: ...
126
134
 
135
+ @typing.final
127
136
  class FileSavePicker(winrt.system.Object, metaclass=FileSavePicker_Static):
128
137
  @staticmethod
129
138
  def _from(obj: winrt.system.Object, /) -> FileSavePicker: ...
@@ -165,9 +174,11 @@ class FileSavePicker(winrt.system.Object, metaclass=FileSavePicker_Static):
165
174
  @_property
166
175
  def user(self) -> typing.Optional[winrt.windows.system.User]: ...
167
176
 
177
+ @typing.final
168
178
  class FolderPicker_Static(type):
169
179
  def create_for_user(cls, user: typing.Optional[winrt.windows.system.User], /) -> typing.Optional[FolderPicker]: ...
170
180
 
181
+ @typing.final
171
182
  class FolderPicker(winrt.system.Object, metaclass=FolderPicker_Static):
172
183
  @staticmethod
173
184
  def _from(obj: winrt.system.Object, /) -> FolderPicker: ...
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
2
 
3
3
  import enum
4
4
 
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Storage.Pickers
3
- Version: 2.0.0b1
3
+ Version: 2.0.1
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
- Project-URL: Repository, https://github.com/pywrint/pywrinrt
6
+ Project-URL: Documentation, https://pywinrt.readthedocs.io
7
+ Project-URL: Repository, https://github.com/pywinrt/pywinrt
7
8
  Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
8
9
  Classifier: Operating System :: Microsoft :: Windows
9
10
  Classifier: Programming Language :: Python :: 3
@@ -11,7 +12,12 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
11
12
  Classifier: Intended Audience :: Developers
12
13
  Requires-Python: <3.13,>=3.9
13
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.0.1
14
16
  Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.0.1; extra == "all"
19
+ Requires-Dist: winrt-Windows.Storage[all]==2.0.1; extra == "all"
20
+ Requires-Dist: winrt-Windows.System[all]==2.0.1; extra == "all"
15
21
 
16
22
  <!-- warning: Please don't edit this file. It was automatically generated. -->
17
23
 
@@ -7,6 +7,7 @@ requirements.txt
7
7
  setup.py
8
8
  winrt/_winrt_windows_storage_pickers.pyi
9
9
  winrt/windows/storage/pickers/__init__.py
10
+ winrt/windows/storage/pickers/py.typed
10
11
  winrt_Windows.Storage.Pickers.egg-info/PKG-INFO
11
12
  winrt_Windows.Storage.Pickers.egg-info/SOURCES.txt
12
13
  winrt_Windows.Storage.Pickers.egg-info/dependency_links.txt
@@ -0,0 +1,7 @@
1
+ winrt-runtime==2.0.1
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.0.1
5
+ winrt-Windows.Foundation.Collections[all]==2.0.1
6
+ winrt-Windows.Storage[all]==2.0.1
7
+ winrt-Windows.System[all]==2.0.1
@@ -1,6 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
-
3
- winrt-Windows.Foundation[all]==2.0.0-beta.1
4
- winrt-Windows.Foundation.Collections[all]==2.0.0-beta.1
5
- winrt-Windows.Storage[all]==2.0.0-beta.1
6
- winrt-Windows.System[all]==2.0.0-beta.1
@@ -1 +0,0 @@
1
- 2.0.0-beta.1
@@ -1,17 +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_storage_pickers",
10
- sources=["py.Windows.Storage.Pickers.cpp"],
11
- include_dirs=get_include_dirs(),
12
- extra_compile_args=["/std:c++20", "/permissive-"],
13
- libraries=["windowsapp"],
14
- )
15
- ],
16
- package_data={"winrt": ["*.pyi"]},
17
- )
@@ -1,7 +0,0 @@
1
- winrt-runtime==2.0.0-beta.1
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.0-beta.1
5
- winrt-Windows.Foundation.Collections[all]==2.0.0-beta.1
6
- winrt-Windows.Storage[all]==2.0.0-beta.1
7
- winrt-Windows.System[all]==2.0.0-beta.1