Skip to content

Cleaned up deprecations and re-added and deprecated Repo

Benjamin Winger requested to merge bmwinger/portmod:deprecated into master

Added deprecated as an optional dependency (it's not really necessary for users, so I thought I'd try and make it optional). The idea is to move towards a more stable API in a way that is also relatively stable, rather than periodically breaking things for software like importmod and configtool which depend on portmod's internal API.

I've used it to deprecated portmod.repo:Repo (which I also re-added), and a few functions which were already marked as deprecated in portmod.util.

I'm not sure it's a good idea, at least immediately, to use this same system for the pybuild API. It should be possible, I think, to use a custom deprecation category and accompanying warning filter so that we can still test deprecated stuff. But I think that would be best left until later as it would require a lot of work to explicitly filter warnings when testing the deprecated APIs. Unless we just filter that specific category universally to begin with, though that's still a little work to set up, and I'd like to also double-check that none of the deprecation warnings can get displayed to users of the packages, as they're meant for developers only. Plus, portmod already has its own system to allow repositories to declare which pybuild versions they consider deprecated, so it should really integrate with that somehow, which would be more complicated.

Merge request reports