-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make compatible with towncrier>=24.7
towncrier 24.7 changed the way that its find_fragments() function works to accept a Config dataclass instead of specific components of the config. This commit adds a new version of lookup_towncrier_fragments() to use the new API and chooses which one to use based on the version of towncrier obtained from importlib.metadata. It also slightly changes the way that towncrier config can be obtained: the previous get_towncrier_config() function (which returned a dict) is now renamed as get_towncrier_config_as_dict() and get_towncrier_config() returns the new Config dataclass object for towncrier versions above 22.12.0rc1 and raises NotImplementedError for older versions. This API change should be ok as get_towncrier_config() was only called in one place before.
- Loading branch information
Showing
3 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters