You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have fixed a bug that caused specfile to traceback when section names with conditional macro expansions containing spaces were present in the spec file. (#476)
context_management: add a type stub override to fix typing. Type checkers like mypy and pyright can now correctly determine the types for .sources(), .sections(), and the other Specfile methods that return context managers. (#457)
There is a new convenience method Sections.get_or_create() that allows you to manipulate a section
without checking if it exists first. If a section doesn't exist, it will be appended to the end. (#441)
For example, this will work properly even on spec files without %changelog:
with spec.sections() as sections:
changelog = sections.get_or_create("changelog")
changelog[:] = ["%autochangelog"]