-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
intersphinx: Handle the case where intersphinx_cache_limit is negative #12514
intersphinx: Handle the case where intersphinx_cache_limit is negative #12514
Conversation
7d3dc64
to
535977e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some tests for that as well?
By the way, I'm surprised no one ever complained...
847acac
to
cd7aa0a
Compare
@picnixz I have added a test case, but only test the negative case, I am not sure how to test the positive one for it needs more mocked data. |
cd7aa0a
to
fae1cb7
Compare
fae1cb7
to
eb537d9
Compare
If I have time tomorrow (I've got some reviews to do + some stuff to complete on CPython), I'll make a PR on your forked branch (or just dump the code here). But I'm not sure I'll have time. Otherwise, I think it's fine. I just need to remember how I mocked my own tests for those kind of things... |
cc81306
to
4f44c8e
Compare
rebased to master again. |
The documentation said: Set this (intersphinx_cache_limit) to a negative value to cache inventories for unlimited time. In the current implementation, a negative intersphinx_cache_limit causes inventories always expire, this patch ensures that it behaves as documented.
4f44c8e
to
d648dba
Compare
I can not run my test because of the following error:
|
You should update your version of pygments to include this commit: pygments/pygments@0f40614 (though it's weird because your PR is more recent ?) |
@picnixz did you want to add these tests or are we OK to merge? A |
I shamefully forgot. I'm fine with your test (much smaller, less complicate). |
There's no shame in being busy! Thanks for the quick reply A |
Subject: intersphinx: Handle the case where intersphinx_cache_limit is negative
Feature or Bugfix
Purpose
Ensuring the confval
intersphinx_cache_limit
behaves as documented.Detail
The documentation said:
In the current implementation, a negative
intersphinx_cache_limit
causesinventories always expire, this patch ensures that it behaves as documented.
Relates