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

Update caching.py #125

Closed
wants to merge 1 commit into from
Closed

Update caching.py #125

wants to merge 1 commit into from

Conversation

bbrangeo
Copy link

Description

Related Issue

Example

Copy link

@airnst airnst left a comment

Choose a reason for hiding this comment

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

See comment.

@@ -88,7 +83,7 @@ def caching(
requests_cache.install_cache(
cache_name=CACHE_NAME, backend=backend, expire_after=expire_after
)
remove_expired_responses()
requests_cache.delete(expired=True)()
Copy link

@airnst airnst Feb 29, 2024

Choose a reason for hiding this comment

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

This fails, since it does not return a callable object (see screenshot). At least if the cache is empty. Should be requests_cache.delete(expired=True) without the trailing parentheses.

Suggested change
requests_cache.delete(expired=True)()
requests_cache.delete(expired=True)

image

@lucbettaieb
Copy link
Contributor

lucbettaieb commented Feb 29, 2024

Upvoting this!

edit:
Not sure the release process, but the pip binary is broken so I made this PR to incorporate the changes now. @bbrangeo , not trying to take this from you; so feel free to push the fix to your branch so it can be incorporated. I just want to see it fixed :)
#127

@CecSve
Copy link
Contributor

CecSve commented Mar 1, 2024

We have merged #127

@CecSve CecSve closed this Mar 1, 2024
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.17%. Comparing base (59960ff) to head (5e69c70).
Report is 32 commits behind head on master.

Files with missing lines Patch % Lines
pygbif/caching.py 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #125      +/-   ##
==========================================
+ Coverage   80.00%   80.17%   +0.17%     
==========================================
  Files          26       26              
  Lines         675      671       -4     
==========================================
- Hits          540      538       -2     
+ Misses        135      133       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

5 participants