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

Deprecate str() to generate RSS #117

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

nerok
Copy link

@nerok nerok commented Aug 8, 2020

This PR adds a decorator that can be used to deprecate any function, and it is used to deprecate str() in podcast, so it closes #112. It not_supported_by_itunes_warning.py could also be adapted to utilize this decorator.

I'll be honest and say that I am not sure that this is the simplest, easiest and most stable solution for a function deprecation, but it is at least cleaner than having to add a warning to the start of all deprecated functions.

Neither #93, #96 nor #97 would be able to use this, so there might be that a more uniform approach would be preferred.

With regards to decorator.py or util.py as the location for the decorator, I am not opinionated. It was only easier for me to have a smaller file to understand the system.

@nerok
Copy link
Author

nerok commented Aug 8, 2020

I extracted the deprecation_warning to its own function, now they certainly should be moved away from decorators.py, but I'll wait to see if the change as a whole is in accordance with your preferences first.

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.

Do not use str() to generate RSS
1 participant