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

Remove print_all_param_defaults function #1029

Merged
merged 3 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/reference/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ List (created after the release of version `2.2.0`) of removed APIs:

| Removed in | Warning | Description |
|-|-|-|
| `2.3.0` | None | `param.parameterized.print_all_param_defaults` / This functions was undocumented, unused, and broken. |
| `2.2.0` | `ParamFutureWarning` since `2.0.0` | Parameterized namespace / `instance._param_watchers` (getter and setter): use instead the property `inst.param.watchers` |
| `2.2.0` | `ParamFutureWarning` since `2.0.0` | Warn on failed validation of the *default* value of a Parameter after the inheritance mechanism has completed |
| `2.2.0` | `ParamFutureWarning` since `2.0.0` | Running unsafe `instance.param.objects(instance=True)` during Parameterized instance initialization, instead run it after having called `super().__init__(**params)` |
Expand Down
16 changes: 1 addition & 15 deletions param/parameterized.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
_validate_error_prefix,
accept_arguments,
iscoroutinefunction,
descendents,
descendents, # noqa: F401
gen_types,
)

Expand Down Expand Up @@ -5288,20 +5288,6 @@ def __str__(self):
return f"<{self.__class__.__name__} {self.name}>"


def print_all_param_defaults():
"""Print the default values for all imported Parameters."""
print("_______________________________________________________________________________")
print("")
print(" Parameter Default Values")
print("")
classes = descendents(Parameterized)
classes.sort(key=lambda x:x.__name__)
for c in classes:
c.print_param_defaults()
print("_______________________________________________________________________________")



# As of Python 2.6+, a fn's **args no longer has to be a
# dictionary. This might allow us to use a decorator to simplify using
# ParamOverrides (if that does indeed make them simpler to use).
Expand Down
Loading