Make requester a public attribute#3056
Merged
EnricoMi merged 3 commits intoPyGithub:mainfrom Oct 9, 2024
Merged
Conversation
as an escape hatch for unsupported APIs - accessible as `Github.requester` or `GitHubObject.requester` - add public Requester methods to docs
This comment was marked as off-topic.
This comment was marked as off-topic.
Closed
EnricoMi
reviewed
Oct 9, 2024
Collaborator
EnricoMi
left a comment
There was a problem hiding this comment.
You could also test the requester property on one GithubObject implementation, e.g. Repository.
Collaborator
|
This looks reasonable to do. |
Collaborator
|
Thanks for the contribution! |
|
When is this scheduled for release? (Disclaimer I couldn't find release practices elsewhere in the repo, so I figured I would comment directly here) |
Contributor
|
Seems like this was released in 2.5.0 Is this usable on the repo or org objects? I see Seems like a great feature - would be great if there were one or two examples in the docs. Is there a good example of this in use somewhere? |
atodorov
added a commit
to kiwitcms/github-app
that referenced
this pull request
Apr 18, 2025
atodorov
added a commit
to kiwitcms/github-app
that referenced
this pull request
Apr 18, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There will always be new APIs not yet supported by PyGitHub (e.g. #2718). This adds an escape hatch for users to send requests directly without having to start from scratch or use private APIs while waiting for PyGitHub to add support.
Changes:
object._requester.__requesteris now available via public.requesterattribute on MainClass, GitHubObject, etc.Fixes #2071 which received only positive feedback, but was closed for inactivity.