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

Warn/ask to verify for deprecation notices when making a major release #407

Open
gforcada opened this issue Mar 15, 2023 · 4 comments
Open

Comments

@gforcada
Copy link
Contributor

It would be nice if zest.releaser would warn/mention to double check if deprecation warnings (produced by the package about to be released) are taken care of if the next release is about to be a major one.

This would help deleting deprecated code at the right time and thus not having to carry over until the next major release 🍀

@reinout
Copy link
Collaborator

reinout commented Mar 17, 2023

This sounds like a really tough one. How would we get our hands on the deprecation warnings? By running the project? By running the tests? Projects can be run in 10 different ways, tests can be run in 10 different ways... Docker, virtualenv, buildout, venv. Is zest.releaser installed inside the project environment or outside? Etc.

As you notice, my first impression is "impossible to do without tripling the size of the code". You'll notice I'm being blunt/direct/practical in a very very Dutch way about this :-) Perhaps @mauritsvanrees thinks this is more doable? Perhaps in the plone context, something generic and practical can be done?

@gforcada
Copy link
Contributor Author

I was thinking of scanning the project code for zope.deprecation imports or usages of warnings.warn stdlib modules 😅

My main interest here, is not to clean up the code to not use deprecated code, but rather to remove the package own deprecated code 🍀 🗑️

@mauritsvanrees
Copy link
Member

Sounds like something for an extension, running just like check-manifest and pyroma in the prereleaser.before stage.

But really, fixing deprecations is not something I want to do when I am about to make a release, especially if I want to make a dozen package releases for a new Plone release. But of course an extension could simply warn, and I could ignore it if I choose.

@gforcada
Copy link
Contributor Author

Oh right, we have extensions 👍🏾 I forgot about them 😄 I will see if I can write one for such things.

Actually a standalone linter might make sense, so we can run it at any point, probably not on your average PR though 🤔

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

No branches or pull requests

3 participants