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

Add expiration argument back to GithubIntegration.create_jwt #2439

Merged
merged 2 commits into from Mar 17, 2023

Conversation

EnricoMi
Copy link
Collaborator

Fixes #2432.

@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2023

Codecov Report

Base: 98.77% // Head: 98.77% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (1172288) compared to base (def5223).
Patch coverage: 100.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2439   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         117      117           
  Lines       11674    11677    +3     
=======================================
+ Hits        11531    11534    +3     
  Misses        143      143           
Impacted Files Coverage Δ
github/GithubIntegration.py 96.61% <100.00%> (+0.18%) ⬆️
github/Requester.py 97.43% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@s-t-e-v-e-n-k s-t-e-v-e-n-k left a comment

Choose a reason for hiding this comment

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

Looking good, just one niggle.

@@ -61,6 +61,27 @@ def testCreateJWT(self):
)
sys.modules["time"].time = self.origin_time

def testCreateJWTWithExpiration(self):
self.origin_time = sys.modules["time"].time
sys.modules["time"].time = lambda: 1550055331.7435968
Copy link
Collaborator

Choose a reason for hiding this comment

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

This feels awkward. Why not use a mock here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't like it either, just copied from existing testCreateJWT above.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Then we should fix both places, and I'd rather circle back and fix one, rather than both.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is meant to be a quick fix, to get a fix for 1.58.0 out, asap. People are rightly annoyed: #2430 (comment)

Cleaning up test code can be done for 1.59.0.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't have time to cut a release right now, but I'll get this merged.

@s-t-e-v-e-n-k s-t-e-v-e-n-k merged commit 822fc05 into PyGithub:master Mar 17, 2023
7 checks passed
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.

v1.58.0 TypeError: create_jwt() got an unexpected keyword argument 'expiration'
3 participants