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

Conversation

MUKESHRAJMAHENDRAN
Copy link
Contributor

@MUKESHRAJMAHENDRAN MUKESHRAJMAHENDRAN commented Nov 12, 2024

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Related issues

Comments:

  • This pull request addresses an issue with the use of deprecation warnings in narwhals/narwhals/utils.py. The current implementation uses the generic warn function, which does not correctly set the stacklevel for tracebacks. This has been rectified by using issue_deprecation_warning from narwhals.utils to ensure consistency and clarity for developers.

Key Changes:

  • Replaced warn with issue_deprecation_warning to improve the clarity and accuracy of deprecation warnings.

Checklist

  • Code follows style guide (ruff)
    Please let me know if there are any further changes or tests needed.

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

)
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

@MarcoGorelli MarcoGorelli merged commit 626e5bf into narwhals-dev:main Nov 12, 2024
22 checks passed
@MUKESHRAJMAHENDRAN
Copy link
Contributor Author

Thanks @MarcoGorelli for the good first issue and suggestions. This is my first pull request in open-source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: use issue_deprecation_warning in generate_unique_token
2 participants