Skip to content

Disable cache expiration if timeout is -1 instead of None#3579

Merged
bsipocz merged 2 commits intoastropy:mainfrom
lpsinger:cache-timeout--1
Apr 16, 2026
Merged

Disable cache expiration if timeout is -1 instead of None#3579
bsipocz merged 2 commits intoastropy:mainfrom
lpsinger:cache-timeout--1

Conversation

@lpsinger
Copy link
Copy Markdown
Contributor

There does not appear to be a way to set the value of cache_timeout to None in a .ini file because there is no value that will be decoded to None and will also validate as an integer.

There does not appear to be a way to set the value of
`cache_timeout` to `None` in a .ini file because there is no value
that will be decoded to None and will also validate as an integer.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.22%. Comparing base (fc6a0dd) to head (65efd63).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3579   +/-   ##
=======================================
  Coverage   73.22%   73.22%           
=======================================
  Files         226      226           
  Lines       21000    21000           
=======================================
  Hits        15378    15378           
  Misses       5622     5622           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bsipocz bsipocz added bug query astroquery internals labels Apr 15, 2026
@bsipocz bsipocz added this to the 0.4.12 milestone Apr 15, 2026
Copy link
Copy Markdown
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

Thank you @lpsinger, this makes all sense. It also makes me wonder if we should have some actual testing of the config cfg file rather than setting the values directly in the tests.

@lpsinger
Copy link
Copy Markdown
Contributor Author

Thank you @lpsinger, this makes all sense. It also makes me wonder if we should have some actual testing of the config cfg file rather than setting the values directly in the tests.

That's a good idea. I suggest that should be a separate PR.

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Apr 16, 2026

That's a good idea. I suggest that should be a separate PR.

Certainly! This still needs a changelog entry before merge, but I can do it now.

@bsipocz bsipocz merged commit 0e87c73 into astropy:main Apr 16, 2026
1 check was pending
@lpsinger lpsinger deleted the cache-timeout--1 branch April 16, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug query astroquery internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants