-
Notifications
You must be signed in to change notification settings - Fork 19
Deprecate 'slient' param in get_blocks_() #672
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #672 +/- ##
==========================================
+ Coverage 26.07% 28.05% +1.98%
==========================================
Files 215 215
Lines 47590 43948 -3642
Branches 18395 16805 -1590
==========================================
- Hits 12407 12328 -79
+ Misses 33158 29617 -3541
+ Partials 2025 2003 -22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
How about: // Helper function to parse the 'silent' argument for get_blocks_() method
// This function handles backward compatibility with the deprecated 'slient' parameter
static inline bool check_silent(py::args args, py::kwargs kwargs) {
// ...
}
.def("get_blocks_", [](const UniTensor& self, py::args args, py::kwargs kwargs) {
return self.get_blocks_(check_silent(...));
}
.def("get_blocks_", [](UniTensor& self, py::args args, py::kwargs kwargs) {
return self.get_blocks_(check_silent(...));
} |
- Restore 'slient' parameter support to fix API breaking change from
previous commit
- Add FutureWarning for deprecated 'slient' parameter using py::warnings
- Implement robust argument validation with detailed error messages
- Bump pybind11 requirement to >=3.0 (py::warnings available since
pybind11 3.0)
- Add comprehensive test suite covering deprecation warnings, argument
validation, and edge cases
de9cc2b to
7910138
Compare
Extracted the function. |
jysh1214
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
"slient" argument was corrected to "silent" in #666. However, that change broke the current Python API. This PR adds "slient" back and marks it deprecated until v2.0.0.