Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 734626 - sys-apps/portage: enable DeprecationWarning message by default where appropriate
Summary: sys-apps/portage: enable DeprecationWarning message by default where appropriate
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-29 23:23 UTC by Zac Medico
Modified: 2020-07-29 23:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2020-07-29 23:23:35 UTC
Since DeprecationWarning messages are silent by default, they're not very effective for warning about pending removal. So, we should probably enable some of these messages by default as discussed in #gentoo-portage:

> <[Arfrever]> Maybe also pass module="portage\..*" to warnings.filterwarnings
> <[Arfrever]> So warnings.filterwarnings("default", category=DeprecationWarning, module="portage\..*") would enable only DeprecationWarnings originating from portage modules.
> <[Arfrever]> zmedico: You can add above call somewhere in portage/__init__.py if you want :) .
> <zmedico> [Arfrever]: are disadvantages to this? sounds like maybe a good idea.
> <[Arfrever]> I have not noticed disadvantages.
> <[Arfrever]> (I locally have most warnings enabled by PYTHONWARNINGS environment variable.)
> <[Arfrever]> zmedico: If warnings.filterwarnings() was called inside Portage, then users would not be able to override its effect :) .
> <[Arfrever]> Priority from highest to lowest: warnings.filterwarnings(), -W option, ${PYTHONWARNINGS}, internal defaults