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

chore: add issue_deprecation_warning to generate_unique_token function #1359

Merged
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
7 changes: 3 additions & 4 deletions narwhals/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,12 +538,11 @@ def is_ordered_categorical(series: Series) -> bool:


def generate_unique_token(n_bytes: int, columns: list[str]) -> str: # pragma: no cover
warn(
msg = (
"Use `generate_temporary_column_name` instead. `generate_unique_token` is "
"deprecated and it will be removed in future versions",
DeprecationWarning,
stacklevel=2,
"deprecated and it will be removed in future versions"
)
issue_deprecation_warning(msg, _version="1.13.0")
Copy link
Member

Choose a reason for hiding this comment

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

technically this might have beeen slightly earlier, but this is close enough, and the difference woudln't affect when we'd enforce it

return generate_temporary_column_name(n_bytes=n_bytes, columns=columns)


Expand Down
Loading