Repository navigation
Description
Summary
A full forced execution of every lecture under anaconda 2026.06 (which upgrades pandas 2.3.3 → 3.0.3, proposed in #923) fails on hansen_singleton_1982 and hansen_singleton_1983. Both break at import of pandas_datareader, which is incompatible with pandas 3.0. These lectures execute cleanly on main (pandas 2.3.3), so this is a genuine regression introduced by the anaconda 2026.06 upgrade. Blocks #923.
Why normal CI did not catch it
The project builds with execute_notebooks: "cache" and PR CI restores the build cache from main. jupyter-cache keys on notebook code, not on the environment, so a dependency-only PR like #923 reuses cached outputs and never re-executes the notebooks under the new stack — the preview check only proves the conda environment solves. This failure was found by temporarily forcing a full re-execution under 2026.06 (run 27897336159).
Error
File .../site-packages/pandas_datareader/data.py:273
--> 273 @deprecate_kwarg("access_key", "api_key")
274 def DataReader(
TypeError: deprecate_kwarg() missing 1 required positional argument: 'new_arg_name'
Cause
pandas_datareader is installed at runtime via !pip install pandas-datareader (currently 0.10.0 — last released 2021, effectively unmaintained). It relies on the private pandas API pandas.util._decorators.deprecate_kwarg, whose signature changed in pandas 3.0, so the decorator at pandas_datareader/data.py:273 raises immediately on import. There is no pandas-3.0-compatible pandas-datareader release to pin to.
Affected code
| File | Lines | Code |
|---|---|---|
lectures/hansen_singleton_1982.md |
59, 70, 1037, 1053 | !pip install pandas-datareader → from pandas_datareader import data as web → web.DataReader(...) (FRED + Fama-French) |
lectures/hansen_singleton_1983.md |
83, 1476, 1491 | same pattern |
Suggested fix
Drop pandas_datareader and fetch the series directly:
- FRED —
pandas.read_csvfrom the FRED CSV download endpoint, or thefredapipackage. - Fama-French — download the zip from Ken French's data library and parse it.
After migrating, re-run a full forced execution under anaconda 2026.06 to confirm.
Verification
- Fails under anaconda 2026.06 (pandas 3.0.3): run 27897336159 (forced full execution).
- Passes under anaconda 2025.12 (pandas 2.3.3) on
main: the weeklycache.ymlfull build does not fail on these two lectures.
Also observed — pre-existing, NOT caused by #923 (track separately)
ar1_bayes and ar1_turningpts also fail in the forced run, but for an unrelated reason: az.plot_trace(trace, figsize=(17,6)) is rejected by the rewritten arviz plotting backend (ValueError: Keyword arguments ['figsize'] have been passed as **kwargs but have no active aesthetic mapped to them). They pull an unpinned arviz via !pip install arviz pymc and have been failing on main's weekly cache build for 5+ weeks, independent of the pandas upgrade.
Activity
Add vendored data + maintenance scripts for hansen_singleton lectures (…
Add vendored data + maintenance scripts for hansen_singleton lectures (…
[hansen_singleton] Replace pandas-datareader with direct FRED / Fama-…