Skip to content

gracefully handle if git is not installed#229

Merged
mergify[bot] merged 2 commits intosphinx-contrib:mainfrom
blmaier:fix-git-missing
Dec 19, 2024
Merged

gracefully handle if git is not installed#229
mergify[bot] merged 2 commits intosphinx-contrib:mainfrom
blmaier:fix-git-missing

Conversation

@blmaier
Copy link
Copy Markdown
Contributor

@blmaier blmaier commented Dec 2, 2024

The following error occurs in _get_contributors() if git is not installed.

FileNotFoundError: [Errno 2] No such file or directory: 'git': 'git'

Treat this the same as if git fails, catch the error and print a warning.

Copy link
Copy Markdown
Member

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

Nice fix, thank you!

@blmaier
Copy link
Copy Markdown
Contributor Author

blmaier commented Dec 5, 2024

Hi @dhellmann, is this blocked on the failing tests? They appear to be an unrelated issue with xmlrpc.

@dhellmann
Copy link
Copy Markdown
Member

Yes, we will have to remove the use of the plugin that relies on that old XMLRPC interface so the tests work. I'm pretty sure that just means changing this line to set the flag to False

@dhellmann
Copy link
Copy Markdown
Member

The "History Update" job is failing because there is no corresponding change in history.rst explaining this fix.

@blmaier
Copy link
Copy Markdown
Contributor Author

blmaier commented Dec 9, 2024

I added a history entry.

For the XML issue, it appears to be an issue in this package here: https://github.com/sphinx-contrib/spelling/blob/main/sphinxcontrib/spelling/filters.py#L165-L166
The pypi documentation recommends switching to their JSON API. https://warehouse.pypa.io/api-reference/xml-rpc.html#list-packages

@blmaier
Copy link
Copy Markdown
Contributor Author

blmaier commented Dec 9, 2024

I missed that the XML bug is an open issue here as well #227

@dhellmann
Copy link
Copy Markdown
Member

@Mergifyio rebase

The following error occurs in `_get_contributors()` if git is not
installed.

> FileNotFoundError: [Errno 2] No such file or directory: 'git': 'git'

Treat this the same as if `git` fails, catch the error and print a
warning.
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Dec 19, 2024

rebase

✅ Branch has been successfully rebased

@mergify mergify bot merged commit 65a9b84 into sphinx-contrib:main Dec 19, 2024
@dhellmann
Copy link
Copy Markdown
Member

This fix is included in release 8.0.1. Thank you!

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