Export headers in GithubException#1887
Merged
s-t-e-v-e-n-k merged 1 commit intoPyGithub:masterfrom Mar 23, 2021
Merged
Conversation
Since the headers that led to an exception are also useful, firstly pass them into the constructor, and then export them in a property. Test one specific use case to make sure of coverage. Fixes PyGithub#1814
Contributor
|
Hi @s-t-e-v-e-n-k, just came across this as PyGithub 1.55 got released yesterday and our calls to |
Collaborator
Author
|
Good point, I'll edit the release notes |
1 task
TomasTomecek
added a commit
to TomasTomecek/packit-service
that referenced
this pull request
Apr 28, 2021
We need to update how we mock GithubException since 1.55 it now accepts HTTP headers in form of a positional argument as well: PyGithub/PyGithub#1887 Kudos @lbarcziova Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
TomasTomecek
added a commit
to TomasTomecek/packit-service
that referenced
this pull request
Apr 28, 2021
We need to update how we mock GithubException since 1.55 it now accepts HTTP headers in form of a positional argument as well: PyGithub/PyGithub#1887 This is implemented with inspect.signature so our tests work for both versions of pygithub <1.55 and >=1.55 because 1.55 is not in stable Fedora yet. Kudos @lbarcziova Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
softwarefactory-project-zuul bot
added a commit
to packit/packit-service
that referenced
this pull request
Apr 28, 2021
tests: GithubException now accepts also headers We need to update how we mock GithubException since 1.55 it now accepts HTTP headers in form of a positional argument as well: PyGithub/PyGithub#1887 Kudos @lbarcziova Reviewed-by: None <None> Reviewed-by: Laura Barcziová <None>
sergeyklay
added a commit
to sergeyklay/gstore
that referenced
this pull request
Jun 6, 2021
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.
Since the headers that led to an exception are also useful, firstly pass
them into the constructor, and then export them in a property. Test one
specific use case to make sure of coverage.
Fixes #1814