zestsoftware / zest.releaser

Python software releasing made easy and repeatable
https://zestreleaser.readthedocs.io
GNU General Public License v2.0
198 stars 62 forks source link

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

Open gforcada opened 1 year ago

gforcada commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 🤔