Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit f4a4e2f

Browse files
committed
update PyWinRT to v1.0.0-beta.10
1 parent 44875f9 commit f4a4e2f

File tree

1,271 files changed

+17343
-37143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,271 files changed

+17343
-37143
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
### Changed
1111
- Updated CppWinRT to v2.0.230706.1.
12+
- Updated PyWinRT to [v1.0.0-beta.10](https://github.com/pywinrt/pywinrt/releases/tag/v1.0.0-beta.10).
1213

1314
## [v1.0.0b9] - 2023-04-15
1415

generate.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
param ([switch]$skipNugetInstall)
22

3-
$pywinrt_version = '1.0.0-beta.9'
3+
$pywinrt_version = '1.0.0-beta.10'
44
$cppwinrt_version = '2.0.230706.1'
55
$windows_sdk_version = '10.0.22621.0+'
66
$repoRootPath = (Get-Item $PSScriptRoot).FullName

pywinrt/winsdk/_winrt.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9
1+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.10
22

33
import array
44
import types

pywinrt/winsdk/src/_winrt.cpp

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9
1+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.10
22

33
// must be included before winrt to avoid compile errors
44
#include <Shobjidl.h>
@@ -292,29 +292,6 @@ namespace py::cpp::_winrt
292292
static const auto kSTA
293293
= static_cast<long>(winrt::apartment_type::single_threaded);
294294

295-
py::pyobj_handle collections_abc_module{
296-
PyImport_ImportModule("collections.abc")};
297-
298-
if (!collections_abc_module)
299-
{
300-
return nullptr;
301-
}
302-
303-
py::pyobj_handle mutable_sequence_type{
304-
PyObject_GetAttrString(collections_abc_module.get(), "MutableSequence")};
305-
306-
if (!mutable_sequence_type)
307-
{
308-
return nullptr;
309-
}
310-
311-
py::pyobj_handle array_bases{PyTuple_Pack(1, mutable_sequence_type.get())};
312-
313-
if (!array_bases)
314-
{
315-
return nullptr;
316-
}
317-
318295
py::pyobj_handle module{PyModule_Create(&module_def)};
319296

320297
if (!module)
@@ -334,7 +311,7 @@ namespace py::cpp::_winrt
334311
}
335312

336313
state->Array_type = py::register_python_type(
337-
module.get(), "Array", &Array_type_spec, array_bases.get(), nullptr);
314+
module.get(), "Array", &Array_type_spec, nullptr, nullptr);
338315

339316
if (!state->Array_type)
340317
{

pywinrt/winsdk/src/_winrt_array.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9
1+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.10
22

33
#include "pybase.h"
44
#include "py.Windows.Foundation.h"

pywinrt/winsdk/src/py.Windows.AI.MachineLearning.Preview.cpp

Lines changed: 14 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9
1+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.10
22

33
#include "pybase.h"
44
#include "py.Windows.AI.MachineLearning.Preview.h"
@@ -2670,140 +2670,77 @@ PyMODINIT_FUNC PyInit__winsdk_Windows_AI_MachineLearning_Preview(void) noexcept
26702670
return nullptr;
26712671
}
26722672

2673-
py::pyobj_handle bases{PyTuple_Pack(1, object_type)};
2673+
py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
26742674

2675-
if (!bases)
2676-
{
2677-
return nullptr;
2678-
}
2679-
2680-
py::pyobj_handle collections_abc_module{PyImport_ImportModule("collections.abc")};
2681-
2682-
if (!collections_abc_module)
2683-
{
2684-
return nullptr;
2685-
}
2686-
2687-
py::pyobj_handle sequence_type{PyObject_GetAttrString(collections_abc_module.get(), "Sequence")};
2688-
2689-
if (!sequence_type)
2690-
{
2691-
return nullptr;
2692-
}
2693-
2694-
py::pyobj_handle sequence_bases{PyTuple_Pack(2, object_type, sequence_type.get())};
2695-
2696-
if (!sequence_bases)
2697-
{
2698-
return nullptr;
2699-
}
2700-
2701-
py::pyobj_handle mutable_sequence_type{PyObject_GetAttrString(collections_abc_module.get(), "MutableSequence")};
2702-
2703-
if (!mutable_sequence_type)
2704-
{
2705-
return nullptr;
2706-
}
2707-
2708-
py::pyobj_handle mutable_sequence_bases{PyTuple_Pack(2, object_type, mutable_sequence_type.get())};
2709-
2710-
if (!mutable_sequence_bases)
2711-
{
2712-
return nullptr;
2713-
}
2714-
2715-
py::pyobj_handle mapping_type{PyObject_GetAttrString(collections_abc_module.get(), "Mapping")};
2716-
2717-
if (!mapping_type)
2718-
{
2719-
return nullptr;
2720-
}
2721-
2722-
py::pyobj_handle mapping_bases{PyTuple_Pack(2, object_type, mapping_type.get())};
2723-
2724-
if (!mapping_bases)
2725-
{
2726-
return nullptr;
2727-
}
2728-
2729-
py::pyobj_handle mutable_mapping_type{PyObject_GetAttrString(collections_abc_module.get(), "MutableMapping")};
2730-
2731-
if (!mutable_mapping_type)
2732-
{
2733-
return nullptr;
2734-
}
2735-
2736-
py::pyobj_handle mutable_mapping_bases{PyTuple_Pack(2, object_type, mutable_mapping_type.get())};
2737-
2738-
if (!mutable_mapping_bases)
2675+
if (!object_bases)
27392676
{
27402677
return nullptr;
27412678
}
27422679

27432680
auto state = reinterpret_cast<module_state*>(PyModule_GetState(module.get()));
27442681
assert(state);
27452682

2746-
state->type_ImageVariableDescriptorPreview = py::register_python_type(module.get(), type_name_ImageVariableDescriptorPreview, &type_spec_ImageVariableDescriptorPreview, bases.get(), nullptr);
2683+
state->type_ImageVariableDescriptorPreview = py::register_python_type(module.get(), type_name_ImageVariableDescriptorPreview, &type_spec_ImageVariableDescriptorPreview, object_bases.get(), nullptr);
27472684
if (!state->type_ImageVariableDescriptorPreview)
27482685
{
27492686
return nullptr;
27502687
}
27512688

2752-
state->type_InferencingOptionsPreview = py::register_python_type(module.get(), type_name_InferencingOptionsPreview, &type_spec_InferencingOptionsPreview, bases.get(), nullptr);
2689+
state->type_InferencingOptionsPreview = py::register_python_type(module.get(), type_name_InferencingOptionsPreview, &type_spec_InferencingOptionsPreview, object_bases.get(), nullptr);
27532690
if (!state->type_InferencingOptionsPreview)
27542691
{
27552692
return nullptr;
27562693
}
27572694

2758-
state->type_LearningModelBindingPreview = py::register_python_type(module.get(), type_name_LearningModelBindingPreview, &type_spec_LearningModelBindingPreview, mapping_bases.get(), nullptr);
2695+
state->type_LearningModelBindingPreview = py::register_python_type(module.get(), type_name_LearningModelBindingPreview, &type_spec_LearningModelBindingPreview, object_bases.get(), nullptr);
27592696
if (!state->type_LearningModelBindingPreview)
27602697
{
27612698
return nullptr;
27622699
}
27632700

2764-
state->type_LearningModelDescriptionPreview = py::register_python_type(module.get(), type_name_LearningModelDescriptionPreview, &type_spec_LearningModelDescriptionPreview, bases.get(), nullptr);
2701+
state->type_LearningModelDescriptionPreview = py::register_python_type(module.get(), type_name_LearningModelDescriptionPreview, &type_spec_LearningModelDescriptionPreview, object_bases.get(), nullptr);
27652702
if (!state->type_LearningModelDescriptionPreview)
27662703
{
27672704
return nullptr;
27682705
}
27692706

2770-
state->type_LearningModelEvaluationResultPreview = py::register_python_type(module.get(), type_name_LearningModelEvaluationResultPreview, &type_spec_LearningModelEvaluationResultPreview, bases.get(), nullptr);
2707+
state->type_LearningModelEvaluationResultPreview = py::register_python_type(module.get(), type_name_LearningModelEvaluationResultPreview, &type_spec_LearningModelEvaluationResultPreview, object_bases.get(), nullptr);
27712708
if (!state->type_LearningModelEvaluationResultPreview)
27722709
{
27732710
return nullptr;
27742711
}
27752712

2776-
state->type_LearningModelPreview = py::register_python_type(module.get(), type_name_LearningModelPreview, &type_spec_LearningModelPreview, bases.get(), nullptr);
2713+
state->type_LearningModelPreview = py::register_python_type(module.get(), type_name_LearningModelPreview, &type_spec_LearningModelPreview, object_bases.get(), nullptr);
27772714
if (!state->type_LearningModelPreview)
27782715
{
27792716
return nullptr;
27802717
}
27812718

2782-
state->type_LearningModelVariableDescriptorPreview = py::register_python_type(module.get(), type_name_LearningModelVariableDescriptorPreview, &type_spec_LearningModelVariableDescriptorPreview, bases.get(), nullptr);
2719+
state->type_LearningModelVariableDescriptorPreview = py::register_python_type(module.get(), type_name_LearningModelVariableDescriptorPreview, &type_spec_LearningModelVariableDescriptorPreview, object_bases.get(), nullptr);
27832720
if (!state->type_LearningModelVariableDescriptorPreview)
27842721
{
27852722
return nullptr;
27862723
}
27872724

2788-
state->type_MapVariableDescriptorPreview = py::register_python_type(module.get(), type_name_MapVariableDescriptorPreview, &type_spec_MapVariableDescriptorPreview, bases.get(), nullptr);
2725+
state->type_MapVariableDescriptorPreview = py::register_python_type(module.get(), type_name_MapVariableDescriptorPreview, &type_spec_MapVariableDescriptorPreview, object_bases.get(), nullptr);
27892726
if (!state->type_MapVariableDescriptorPreview)
27902727
{
27912728
return nullptr;
27922729
}
27932730

2794-
state->type_SequenceVariableDescriptorPreview = py::register_python_type(module.get(), type_name_SequenceVariableDescriptorPreview, &type_spec_SequenceVariableDescriptorPreview, bases.get(), nullptr);
2731+
state->type_SequenceVariableDescriptorPreview = py::register_python_type(module.get(), type_name_SequenceVariableDescriptorPreview, &type_spec_SequenceVariableDescriptorPreview, object_bases.get(), nullptr);
27952732
if (!state->type_SequenceVariableDescriptorPreview)
27962733
{
27972734
return nullptr;
27982735
}
27992736

2800-
state->type_TensorVariableDescriptorPreview = py::register_python_type(module.get(), type_name_TensorVariableDescriptorPreview, &type_spec_TensorVariableDescriptorPreview, bases.get(), nullptr);
2737+
state->type_TensorVariableDescriptorPreview = py::register_python_type(module.get(), type_name_TensorVariableDescriptorPreview, &type_spec_TensorVariableDescriptorPreview, object_bases.get(), nullptr);
28012738
if (!state->type_TensorVariableDescriptorPreview)
28022739
{
28032740
return nullptr;
28042741
}
28052742

2806-
state->type_ILearningModelVariableDescriptorPreview = py::register_python_type(module.get(), type_name_ILearningModelVariableDescriptorPreview, &type_spec_ILearningModelVariableDescriptorPreview, bases.get(), nullptr);
2743+
state->type_ILearningModelVariableDescriptorPreview = py::register_python_type(module.get(), type_name_ILearningModelVariableDescriptorPreview, &type_spec_ILearningModelVariableDescriptorPreview, object_bases.get(), nullptr);
28072744
if (!state->type_ILearningModelVariableDescriptorPreview)
28082745
{
28092746
return nullptr;

pywinrt/winsdk/src/py.Windows.AI.MachineLearning.Preview.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9
1+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.10
22

33
#pragma once
44

0 commit comments

Comments
 (0)