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

Deprecate prepare_module #3166

Merged
merged 14 commits into from
Nov 5, 2021
Merged

Deprecate prepare_module #3166

merged 14 commits into from
Nov 5, 2021

Conversation

albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented Oct 26, 2021

In version 1.13, prepare_module was deprecated.

This PR adds a deprecation warning and removes it from all the library, using dataset_module_factory or metric_module_factory instead.

Fix #3165.

@albertvillanova albertvillanova marked this pull request as ready for review October 27, 2021 09:27
module_path, hash, base_path, namespace = prepare_module(
path,
return_associated_base_path=True,
return_namespace=True,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lhoestq could you please verify that this PR does not break this because of the parameter return_namespace?

Before this PR, this parameter no longer existed in the signature of prepare_module...

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for these changes :)

@@ -1263,13 +1263,18 @@ def prepare_module(
**download_kwargs,
) -> Union[Tuple[str, str], Tuple[str, str, Optional[str]]]:
"""For backward compatibility. Please use dataset_module_factory or metric_module_factory instead."""
warnings.warn(
"'prepare_module' was superseded by 'dataset_module_factory' and 'metric_module_factory' in version 1.13 and "
"will be removed in version 1.15.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.15 will be the next release, maybe wait for 1.16 ?

Suggested change
"will be removed in version 1.15.",
"will be removed in version 1.16.",

Copy link
Member Author

@albertvillanova albertvillanova Nov 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lhoestq, indeed, prepare_module was deprecated in 1.13 version, therefore +2 to be removed.

But I agree that we are making minor releases so often, that maybe we should change the rule to +3 or +4 or even to next major release!

@lhoestq
Copy link
Member

lhoestq commented Nov 5, 2021

Sounds good, thanks !

@lhoestq lhoestq merged commit b6bfe88 into master Nov 5, 2021
@lhoestq lhoestq deleted the fix-3165 branch November 5, 2021 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate prepare_module
2 participants