Skip to content

go-yfinance v1.5.2 Development Progress

Last Updated: 2026-07-24

Overview

Implementation plan and progress tracking for Python yfinance v1.5.2 parity.

Python yfinance v1.5.2 is a single-patch release. Its only functional change fixes yfinance breaking with curl_cffi >= 0.16: the caching-session detection in yfinance/data.py was rewritten to test for an active cache instead of the mere presence of a .cache attribute, because curl_cffi 0.16+ sessions always expose .cache (set to None when caching is disabled). The old code treated any such session as a caching session and injected expire_after into every request, which broke non-caching curl_cffi sessions.

The purpose of this document is to record the analysis before any code change, so each upstream item can be tracked as implemented, intentionally skipped, or verified as not applicable to Go.

Branch Structure

main
 └── feature/v1.5.2-parity

Upstream Release Scope

Commits in 1.5.1..1.5.2 (python-yfinance):

beac22d Version 1.5.2
e8f005e Merge pull request #2910 from dokson/fix/curl-cffi-cache-attr-detection
e5f9079 Fix: don't treat curl_cffi>=0.16 sessions as caching

File-level diff:

 CHANGELOG.rst       |  5 +++++
 meta.yaml           |  2 +-
 tests/test_data.py  | 28 ++++++++++++++++++++++++++++
 yfinance/data.py    | 43 +++++-------------------------------------
 yfinance/version.py |  2 +-
Upstream Item Python Change Initial Go Assessment
#2910 / e5f9079 Detect caching sessions by an active cache (getattr(session, "cache", None) is not None) instead of the .cache attribute's presence; raise YFDataException for caching sessions; remove the _session_is_caching flag and all expire_after branches Not applicable to Go's runtime: go-yfinance does not accept a user-injected HTTP session and has no requests_cache/curl_cffi equivalent. Needs an explicit no-op justification plus a confirmation that Go's own cache model is unaffected.
tests/test_data.py New tests covering the active-cache detection Add an equivalent regression only if a Go behavior actually maps; otherwise record why not.
version.py, meta.yaml Version bump 1.5.11.5.2 Bump go-yfinance parity references from v1.5.1 to v1.5.2.
CHANGELOG.rst Changelog entry for the patch Mirror in go-yfinance release notes.

Why the code fix does not port to Go

Python's bug lives in the boundary where a user hands yfinance an external requests/curl_cffi session object and yfinance must guess whether that object caches responses. go-yfinance has no such boundary:

  • The HTTP layer is the project-owned CycleTLS-backed client (pkg/client, built on cycletls.CycleTLS), not a user-supplied session. There is no session= injection point, so the curl_cffi >= 0.16 .cache attribute problem cannot occur.
  • Caching in go-yfinance is a first-party, opt-in config knob (config.CacheEnabled / config.CacheTTL, disabled by default). It is not a wrapper around the transport that the auth/crumb path has to detect and work around. As of this branch the setting is also dormant: no code outside pkg/config consumes CacheEnabled/CacheTTL, so there is no cache layer that could touch the crumb/cookie requests at all.
  • The removed Python code paths (_session_is_caching, per-request expire_after) have no analogue in pkg/client/auth.go; the crumb and cookie/CSRF flows already issue plain GET/POST calls with no cache-expiry branching.

So v1.5.2 parity is a documentation-and-versioning release for Go, not a behavior change. The tasks below make that conclusion explicit and verifiable rather than assumed.


Implementation Plan

Phase 0: Verify the no-op assessment

  • [x] Confirm pkg/client/auth.go has no caching-session detection and no per-request expiry branching (crumb, cookie, CSRF flows). Verified: the refresh/CSRF flows call plain client.Get/Post with no expiry argument.
  • [x] Confirm go-yfinance exposes no user-injectable HTTP session/transport that could carry an external cache (search pkg/client, pkg/config). Verified: the client owns its transport; there is no session= equivalent.
  • [x] Confirm the first-party cache (config.CacheEnabled/CacheTTL) does not interact with the auth/crumb path in a way the Python fix would change. Verified: those fields are dormant — no code outside pkg/config reads them.
  • [x] Record the findings in this document's "Why the code fix does not port" section (updated with the dormant-cache finding).

Phase 1: Version and parity references

  • [x] Bump the parity line in README.md to v1.5.2 Parity. The v1.5.2 patch adds no Go-visible feature, so the feature summary text is unchanged.
  • [x] Bump the parity line in docs/index.md to v1.5.2 (mirror of README).
  • [x] Update docs/development/release-readiness-checklist.md §1 with the v1.5.2 version-decision note.
  • [x] Grep the repo for remaining v1.5.1 parity strings. The only current parity-target strings were in README.md and docs/index.md (now bumped); historical release notes and the v1.5.1 progress doc are left intact.

Phase 2: Release notes

  • [x] Create docs/releases/RELEASE_NOTES_v1.5.2.md following the existing release-notes format, describing the patch and explicitly stating that the upstream curl_cffi fix is not applicable to Go.
  • [x] Add the new release notes and this progress doc to mkdocs.yml nav.

Phase 3: Verification and close-out

  • [x] Run go build ./..., go vet ./..., and go test ./... — all pass (17 packages ok, 0 failures). No .go files changed, so this confirms the docs-only change did not disturb the build.
  • [x] Run golangci-lint run ./... — 0 issues.
  • [x] Mark every checklist item above as done, skipped (with reason), or N/A. The single upstream code item (#2910) is recorded as N/A for Go with the reason in "Why the code fix does not port to Go".
  • [x] Update the "Last Updated" date at the top of this document.

Status Legend

  • [x] Done
  • [ ] Pending
  • N/A — verified not applicable to Go, with the reason recorded inline