Drop munch library (?) #318

Closed
opened 2026-06-15 13:07:59 +00:00 by kparal · 3 comments
Owner

It's now only used for tests, in just a couple of places. It's an old library from Py2 world, I believe. In Py3 there are now better ways to work with objects, and tests are now often generated anyway, saving a few keystrokes no longer makes much sense. Let's consider getting rid of it.

It's now only used for tests, in just a couple of places. It's an old library from Py2 world, I believe. In Py3 there are now better ways to work with objects, and tests are now often generated anyway, saving a few keystrokes no longer makes much sense. Let's consider getting rid of it.
Owner

+1 from me, I never entirely got the point of it.

+1 from me, I never entirely got the point of it.
jgroman self-assigned this 2026-06-24 12:09:20 +00:00
jgroman added this to the Sprint 11 project 2026-06-24 12:09:36 +00:00
Owner

Turns out that bodhi-client API returns objects of type munch.Munch so munch module is loaded anyway as a transitive dependency.
While we can drop munch from direct dependencies and access bodhi-client objects using bracket notation, they are still technically Munch type and we'd have to reintroduce munch module as soon as we started using more thorough mypy type checks.
@adamwill @kparal What say you? Keep munch or remove it anyway?

Turns out that `bodhi-client` API returns objects of type `munch.Munch` so `munch` module is loaded anyway as a transitive dependency. While we can drop `munch` from direct dependencies and access bodhi-client objects using bracket notation, they are still technically Munch type and we'd have to reintroduce `munch` module as soon as we started using more thorough mypy type checks. @adamwill @kparal What say you? Keep `munch` or remove it anyway?
Author
Owner

If that's the case, let's keep it for now. Let's just add a comment in requirements.txt to explain that we keep it as long as we keep bodhi-client (because it returns this type). Other thoughts?

If that's the case, let's keep it for now. Let's just add a comment in requirements.txt to explain that we keep it as long as we keep bodhi-client (because it returns this type). Other thoughts?
jgroman added reference feature/318-drop-munch-module 2026-06-30 12:49:13 +00:00
jgroman removed reference feature/318-drop-munch-module 2026-06-30 12:49:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quality/blockerbugs#318
No description provided.