-
Notifications
You must be signed in to change notification settings - Fork 190
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
Fix cbin_file_path #3524
Fix cbin_file_path #3524
Conversation
if cbin_file is None: | ||
if cbin_file is not None: | ||
warnings.warn( | ||
"The `cbin_file` argument is deprecated, please use `cbin_file_path` instead", DeprecationWarning |
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.
Did we need a stack level for this? I forget?
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 catch
@@ -119,7 +131,7 @@ def __init__(self, folder_path=None, load_sync_channel=False, stream_name="ap", | |||
self._kwargs = { | |||
"folder_path": str(Path(folder_path).resolve()), | |||
"load_sync_channel": load_sync_channel, | |||
"cbin_file": str(Path(cbin_file).resolve()), | |||
"cbin_file_path": str(Path(cbin_file_path).resolve()), |
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.
One more question because I forget the json mechanics. Is this breaking for trying to read the extractor or will this just work?
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.
No this is back compatible since we kept both arguments
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.
I wonder if it would be nice for provenance to explain why this PR worked. The changes here by themselves don't make sense without doing that the tools scan for "path" in the name. I guess in the future people can read my comment and the issue.
But as the user said this fixes it.
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.
I would suggest adding the date on the deprecation warnings so we eventually remove them. and a minor typing thing on the docstring.
if cbin_file is None: | ||
if cbin_file is not None: | ||
warnings.warn( | ||
"The `cbin_file` argument is deprecated, please use `cbin_file_path` instead", |
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.
Maybe let's say when?
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.
unfortunately I think we'll have to keep this forever because of back-compatibility...
Co-authored-by: Heberto Mayorquin <[email protected]>
Fixes #3523