Skip to content

DOC: clarify unsupported caching sessions - #2846

Open
ikejourney wants to merge 1 commit into
ranaroussi:mainfrom
ikejourney:docs-caching-session-unsupported
Open

DOC: clarify unsupported caching sessions#2846
ikejourney wants to merge 1 commit into
ranaroussi:mainfrom
ikejourney:docs-caching-session-unsupported

Conversation

@ikejourney

Copy link
Copy Markdown

Closes #2486.

Summary

Clarify that caching sessions such as requests_cache.CachedSession are unsupported.

The current code already rejects sessions with a .cache attribute. This updates the exception text and the advanced caching docs to explain why those sessions are not supported with yfinance's curl_cffi session handling, and points users toward yfinance's built-in persistent cache configuration instead.

This also adds a small regression test for the caching-session rejection path.

Tests

  • python3 -m py_compile yfinance/data.py tests/test_http.py
  • git diff --check

Could not run the target unittest locally because this environment is missing repository dependencies (requests / pandas).

@ValueRaider

Copy link
Copy Markdown
Collaborator

Is this redundant after #2910 ?

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.

Unable to use request_cache to cache the yfinance response

3 participants