Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for towncrier>=24.7.0 #27

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

bjlittle
Copy link
Contributor

@bjlittle bjlittle commented Aug 26, 2024

This pull-request updates sphinx-changelog to work with towncrier>=24.7.0.

As sphinx-changelog uses private towncrier functions it's liable to break for minor releases.

In this case the signature of towncrier._builder.find_fragments changed under-the-hood, which was the source of the issue.

Note that, towncrier is also now a little bit richer and can traverse up directory trees to find the configuration file and also has better base_directory management, and so some of the defensive code within sphinx-changelog melts away.

I've tested this pull-request change against building my own project, and renders its changelog as expected 👍

I also built the sphinx-changelog docs and checked the test_changelogs page, which appears to render fine.

I guess you want to ensure these changes are compatible with your own projects.

fragments, fragment_filenames = find_fragments(
base_directory, config.sections, fragment_directory, definitions
base_directory, config, strict=False
Copy link
Contributor Author

@bjlittle bjlittle Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've set strict=False here to ensure the same sphinx-changelog behaviour.

If we opt to set this to True then users may have to explicitly include their template file to the configured ignore files.

Copy link
Member

@Cadair Cadair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for doing this. I think this looks good I shall merge it and then do an rc release for wider testing.

@Cadair Cadair merged commit 386c67a into OpenAstronomy:main Aug 26, 2024
1 check passed
@Cadair
Copy link
Member

Cadair commented Aug 26, 2024

1.6.0rc1 is out, I have opened sunpy/sunpy#7787 and astropy/astropy#16883 for testing. If you have any other things you want to test with the rc please let me know how it goes :)

@bjlittle
Copy link
Contributor Author

bjlittle commented Aug 27, 2024

@Cadair Thanks for pushing this through, very much appreciated 🍻

There isn't any further testing that I personally want to make.

As an aside, if it helps, I'm happy to be a maintainer and crank the handle over on https://github.com/conda-forge/sphinx_changelog-feedstock, as I tend to mainly pull packages from conda-forge rather than pypi.

So I'm keen to keep the conda-forge channel in sync with the latest package release on PyPI.

@Cadair
Copy link
Member

Cadair commented Aug 27, 2024

I shall publish the final release tomorrow then. I have added you to the feedstock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants