Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated properties from FormalParameter #5921

Merged
merged 1 commit into from Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 1 addition & 28 deletions onnx/cpp2py_export.cc
Expand Up @@ -233,34 +233,7 @@ PYBIND11_MODULE(onnx_cpp2py_export, onnx_cpp2py_export) {
.def_property_readonly("option", &OpSchema::FormalParameter::GetOption)
.def_property_readonly("is_homogeneous", &OpSchema::FormalParameter::GetIsHomogeneous)
.def_property_readonly("min_arity", &OpSchema::FormalParameter::GetMinArity)
.def_property_readonly("differentiation_category", &OpSchema::FormalParameter::GetDifferentiationCategory)
// Legacy camel cased names. We retain them for backward compatibility.
// TODO(#5074): Remove these before the 1.16 release.
.def_property_readonly(
"typeStr",
[](const OpSchema::FormalParameter& self) {
auto warnings = py::module::import("warnings");
warnings.attr("warn")(
"OpSchema.FormalParameter.typeStr is deprecated and will be removed in 1.16. "
"Use OpSchema.FormalParameter.type_str instead.");
return self.GetTypeStr();
})
.def_property_readonly(
"isHomogeneous",
[](const OpSchema::FormalParameter& self) {
auto warnings = py::module::import("warnings");
warnings.attr("warn")(
"OpSchema.FormalParameter.isHomogeneous is deprecated and will be removed in 1.16. "
"Use OpSchema.FormalParameter.is_homogeneous instead.");
return self.GetIsHomogeneous();
})
.def_property_readonly("differentiationCategory", [](const OpSchema::FormalParameter& self) {
auto warnings = py::module::import("warnings");
warnings.attr("warn")(
"OpSchema.FormalParameter.differentiationCategory is deprecated and will be removed in 1.16. "
"Use OpSchema.FormalParameter.differentiation_category instead.");
return self.GetDifferentiationCategory();
});
.def_property_readonly("differentiation_category", &OpSchema::FormalParameter::GetDifferentiationCategory);

op_schema
.def(
Expand Down