-
Notifications
You must be signed in to change notification settings - Fork 117
SG-39698 ensure_functions copied from python-api with deprecation warning #1042
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
SG-39698 ensure_functions copied from python-api with deprecation warning #1042
Conversation
… says tha it will be removed soon
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1042 +/- ##
=======================================
Coverage 79.78% 79.79%
=======================================
Files 198 198
Lines 20773 20773
=======================================
+ Hits 16574 16576 +2
+ Misses 4199 4197 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Good start, Thanks!
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.
Good call
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.
Pull Request Overview
This PR copies deprecated ensure_*
utility functions from python-api to the local sgutils.py module as a temporary bridge while these functions are being phased out. The functions are marked with deprecation warnings to encourage migration to built-in Python string methods.
- Removes dependency on external python-api sgutils module
- Adds local implementations of
ensure_binary
,ensure_str
, andensure_text
functions - Implements comprehensive deprecation warnings for both module-level and function-level usage
Description
The ensure_* functions were copied from python-api to sgutils.py, as they are being removed from python-api but are likely still in use elsewhere in the codebase.
A deprecation warning was added to each function to indicate they will be removed in a future version.