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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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).

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

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

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.

1 participant