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

Add Deprecation Warnings for Project Renaming #58

Closed
4 tasks done
koladev32 opened this issue May 23, 2024 · 0 comments · Fixed by #59
Closed
4 tasks done

Add Deprecation Warnings for Project Renaming #58

koladev32 opened this issue May 23, 2024 · 0 comments · Fixed by #59

Comments

@koladev32
Copy link
Owner

koladev32 commented May 23, 2024

As part of our transition from djangorestframework-simple-apikey to drf-apikey, we need to add deprecation warnings to the old package. These warnings will alert users upon installation and usage that the package has been renamed and direct them to the new package.

Objective

To ensure that all current users of djangorestframework-simple-apikey are aware of the name change and understand how to migrate to drf-apikey. This will help in a smooth transition and prevent confusion.

Tasks

  • Update the package initialization code to include a Python warnings.warn() statement that fires when the package is imported.
  • Ensure that the warning message includes clear instructions on how to transition to the new package name and the starting version number.
  • Update the README and documentation to reflect the deprecation and point users to the new package.
  • Release a new version of the old package (1.2.4) with these warnings.

Proposed Warning Message

When users import the old package, they should receive the following warning:

import warnings
warnings.warn(
    "This package, 'djangorestframework-simple-apikey', has been renamed to 'drf-apikey' and will no longer be updated. "
    "Please switch to the new package to continue receiving updates and support. "
    "For more information and migration instructions, please visit: [New Package URL]",
    DeprecationWarning
)
@koladev32 koladev32 linked a pull request May 23, 2024 that will close this issue
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 a pull request may close this issue.

1 participant