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

Promote deprecation warnings to future warnings #974

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

maximlt
Copy link
Member

@maximlt maximlt commented Nov 6, 2024

This concerns all the deprecated features listed in the table below. Then we release (2.1.2 or 2.2.0), remove in the next minor release (2.2.0 or 2.3.0), with a couple months between the two releases. The last two deprecations at the end of the table may need more time before removal as they were more recently promoted to ParamDeprecationWarning (in 2.1.0 in March of this year).

Warning Description
ParamDeprecationWarning since 2.0.0 param.parameterized module / param.parameterized.recursive_repr: no replacement
ParamDeprecationWarning since 2.0.0 Parameter slots / Number.set_hook: no replacement
ParamDeprecationWarning since 2.0.0 param.parameterized module / param.parameterized.overridable_property: no replacement
ParamDeprecationWarning since 2.0.0 Parameter slots / List.class_: use instead item_type
ParamDeprecationWarning since 2.0.0 param.__init__ module / param.produce_value: no replacement
ParamDeprecationWarning since 2.0.0 param.__init__ module / param.as_unicode: no replacement
ParamDeprecationWarning since 2.0.0 param.__init__ module / param.is_ordered_dict: no replacement
ParamDeprecationWarning since 2.0.0 param.__init__ module / param.hashable: no replacement
ParamDeprecationWarning since 2.0.0 param.__init__ module / param.named_objs: no replacement
ParamDeprecationWarning since 2.0.0 param.__init__ module / param.abbreviate_paths: no replacement
ParamDeprecationWarning since 2.0.0 param.parameterized module / param.parameterized.batch_watch: use instead batch_call_watchers
ParamDeprecationWarning since 2.0.0 param.parameterized module / param.parameterized.all_equal: no replacement
ParamDeprecationWarning since 2.0.0 param.parameterized module / param.parameterized.add_metaclass: no replacement
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.print_param_defaults: use instead for k,v in p.param.objects().items(): print(f"{p.__class__.name}.{k}={repr(v.default)}")
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.set_default: use instead for k,v in p.param.objects().items(): print(f"{p.__class__.name}.{k}={repr(v.default)}
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param._add_parameter: use instead .param.add_parameter
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.params: use instead .param.values() or .param['param']
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.set_param: use instead .param.update
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.get_param_values: use instead .param.values().items() (or .param.values() for the common case of dict(....param.get_param_values()))
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.params_depended_on: use instead .param.method_dependencies
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.defaults: use instead {k:v.default for k,v in p.param.objects().items()}
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.print_param_values: use instead for k,v in p.param.objects().items(): print(f"{p.__class__.name}.{k}={repr(v.default)}")
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.message: use instead .param.log(param.MESSAGE, ...)
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.verbose: use instead .param.log(param.VERBOSE, ...)
ParamDeprecationWarning since 2.0.0, soft-deprecated since 1.12.0 Parameterized .param namespace / .param.debug: use instead .param.log(param.DEBUG, ...)
ParamDeprecationWarning since 2.0.0 param.__init__ module / param.normalize_path: no replacement
ParamDeprecationWarning since 2.1.0, ParamPendingDeprecationWarning since 2.0.0 Instantiating most parameters with positional arguments beyond default is deprecated
ParamDeprecationWarning since 2.1.0, ParamPendingDeprecationWarning since 2.0.0 For Selector parameters that accept objects as first positional argument, and ClassSelector parameters that accept class_ as first positional argument, passing any argument by position is deprecated.

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.24%. Comparing base (71e8e47) to head (d6109d3).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #974      +/-   ##
==========================================
- Coverage   87.26%   87.24%   -0.03%     
==========================================
  Files           9        9              
  Lines        4948     4948              
==========================================
- Hits         4318     4317       -1     
- Misses        630      631       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maximlt maximlt requested review from philippjfr and hoxbro November 18, 2024 08:12
Copy link
Member

@hoxbro hoxbro left a comment

Choose a reason for hiding this comment

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

LGTM

I think we should update the warning in the next minor release, 2.2.0.

@maximlt
Copy link
Member Author

maximlt commented Nov 26, 2024

I think we should update the warning in the next minor release, 2.2.0.

Agree, let's make the next release 2.2.0.

@maximlt maximlt merged commit b964a5d into main Nov 26, 2024
16 checks passed
@maximlt maximlt deleted the cast_deprecations_to_future_warning branch November 26, 2024 15:40
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.

2 participants