MAINT: upgrade anaconda=2026.06#346
Conversation
Bump the Anaconda distribution from 2025.12 to 2026.06. The python pin stays at 3.13 (anaconda=2026.06 ships a py313 build). Verified the environment resolves cleanly via a conda dry-run solve. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s Conda environment definition by bumping the pinned Anaconda distribution version in environment.yml, keeping the existing python=3.13 pin and leaving the pip: dependencies unchanged.
Changes:
- Bumped
anacondapin from2025.12to2026.06inenvironment.yml.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Validation results — full re-execution under
|
| Check | Result |
|---|---|
Env resolves (python=3.13 + anaconda=2026.06) |
✅ clean (local conda dry-run + CI install) |
ci.yml — env install + PDF/notebook/HTML render (cached execution) |
✅ pass — but reused main's cache, so it never re-ran a notebook |
cache.yml — forced full re-execution of all 67 lectures |
❌ fail — 6 lectures error (the 12 build warnings are exactly these 6 × 2) |
Key version jumps (2025.12 → 2026.06)
| Package | 2025.12 | 2026.06 | |
|---|---|---|---|
| pandas | 2.3.3 | 3.0.3 | pandas-datareader |
| numpy | 2.3.5 | 2.4.6 | quantecon's DLE |
| scipy | 1.16.3 | 1.17.1 | |
| numba | 0.62.1 | 0.65.1 | |
| scikit-learn | 1.7.2 | 1.8.0 | |
| networkx | 3.5 | 3.6.1 | |
| matplotlib | 3.10.6 | 3.10.9 | |
| python | 3.13.9 | 3.13.13 |
Root cause 1 — numpy 2.4 breaks quantecon._dle.DLE.compute_sequence (5 lectures)
Affected: cattle_cycles, growth_in_dles, irfs_in_hall_model, lucas_asset_pricing_dles, permanent_income_dles.
Every one fails identically inside the library, at quantecon/_dle.py:215, when compute_sequence assigns the price terms:
ValueError: setting an array element with a sequence(caused byTypeError: only 0-dimensional arrays can be converted to Python scalars)
The expression self.R1_Price[i, 0] = beta * e1 @ Mc @ ... @ xp[:, i] / (e1 @ Mc @ xp[:, i]) evaluates to a size-1 array, and numpy 2.4 no longer implicitly converts a size-1 array to a scalar on assignment. This is a bug in QuantEcon/QuantEcon.py, not in the lectures — the lectures !pip install --upgrade quantecon at runtime, so they always get the latest release. Note: of the 8 DLE-importing lectures, only the 5 whose matrix dimensions hit this size-1 path fail; gorman_heterogeneous_households, hs_invertibility_example, and rosen_schooling_model execute fine.
Fix path: patch compute_sequence upstream to coerce the price terms to scalars (e.g. wrap the assigned expression in float(...) / .item()), cut a quantecon release, then re-validate here. There is no in-repo workaround short of pinning numpy<2.4, which conflicts with anaconda=2026.06.
Root cause 2 — pandas 3.0 breaks pandas-datareader (1 lecture)
Affected: doubts_or_variability (the only lecture importing pandas_datareader).
It fails at import time:
TypeError: deprecate_kwarg() missing 1 required positional argument: 'new_arg_name'
pandas-datareader (last released 2021, effectively unmaintained) decorates DataReader with @deprecate_kwarg("access_key", "api_key"), and pandas 3.0 changed the signature of the internal pandas.util._decorators.deprecate_kwarg. The lecture only uses it to pull four FRED series (PCND, PCESV, DPCERD3Q086SBEA, CNP16OV).
Fix path: this one is fixable in-repo — rewrite the FRED fetch to not depend on pandas-datareader (e.g. read the FRED CSV download endpoint directly with pandas.read_csv). That removes the unmaintained dependency permanently.
Notes
- A scan for non-fatal runtime deprecation/future warnings across the executed notebooks isn't possible from this run: the
cache.yml"Upload_build" step has noif: always(), so the failed build step short-circuited the executed-notebook upload. That scan is best run once the two blockers above are resolved and a clean full re-execution exists. (Worth addingif: always()to that upload step so future failed runs still publish the executed notebooks.) - Runs:
cache.ymlfull re-execution 27921715960 ❌ ·ci.yml27921712788 ✅
🤖 Generated with Claude Code
…or_variability) pandas-datareader (unmaintained, last released 2021) fails to import under pandas 3.0 — pandas.util._decorators.deprecate_kwarg changed signature, raising "deprecate_kwarg() missing 1 required positional argument: 'new_arg_name'". This blocked execution of doubts_or_variability under anaconda=2026.06. Fetch the four FRED series (PCND, PCESV, DPCERD3Q086SBEA, CNP16OV) directly from FRED's CSV endpoint via pandas.read_csv, removing the dependency. Verified locally that the pipeline still yields 236 quarterly observations (235 growth rates) with matching sample moments. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add `if: always()` to the build-cache upload step so a failed full re-execution still publishes the executed notebooks, enabling inspection of runtime warnings and deprecations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Follow-up actions
A fresh full re-execution is running (27923399210). It will still fail overall until QuantEcon.py#839 ships, but it should confirm This PR stays blocked pending the upstream |
Non-fatal deprecation / warning scan (full re-execution under
|
| Warning | Lectures | Note |
|---|---|---|
kaleido: "Support for the 'engine' argument is deprecated … Kaleido will be the only supported engine" |
BCG_complete_mkts, BCG_incomplete_mkts (×5), knowing_forecasts_of_others |
plotly image export passes a now-deprecated engine= argument; predates both 2025.12 and 2026.06 |
MatplotlibDeprecationWarning: "Passing the marker parameter of scatter() positionally is deprecated since Matplotlib 3.10; … keyword-only in 3.12" |
chang_credible |
ax.scatter(R[0], R[1], 150, 'black', 'o', …) — will error in matplotlib 3.12 |
Other warnings (benign, pre-existing — not regressions)
UserWarning ×5 (arma: non-positive ylim on a log axis, ignored). RuntimeWarning ×12 (amss2: divide-by-zero / invalid value in utility and residual evaluation; discrete_dp: max-iter before convergence; repeat_mh: invalid value in reduce). These are expected numerical/plotting warnings that also occur under 2025.12.
Optional low-priority cleanups (independent of this upgrade, not blockers)
chang_credible: pass the scatter marker as a keyword (marker='o') — becomes an error in matplotlib 3.12.BCG_*/knowing_forecasts_of_others: drop the deprecatedengine=argument from the plotly image export.
Net validation result: under anaconda=2026.06, the only execution blockers are the 5 DLE lectures (QuantEcon/QuantEcon.py#839); doubts_or_variability is fixed; and there is no new deprecation/warning fallout from numpy 2.4 or pandas 3.0.
What
Bumps the Anaconda distribution pinned in environment.yml from
2025.12to2026.06.The
python=3.13pin is unchanged —anaconda=2026.06ships apy313build on the default channel, so no Python version change is required. No other dependency pins are touched (thepip:section is untouched).Validation
A local
condadry-run solve confirms the environment resolves cleanly withpython=3.13+anaconda=2026.06.An Anaconda version bump does not invalidate the
jupyter-cache(the cache keys on notebook code, not package versions), so the standard CI build — which reusesmain's build cache — would skip re-execution and silently miss runtime regressions. To get a meaningful check, thecache.ymlworkflow is being dispatched against this branch to force a fresh full re-execution of every lecture under the new environment. The execution reports and executed-notebook outputs from that run are then reviewed for execution failures, new deprecation warnings, and numerical regressions.A validation summary will be posted as a comment once the full re-execution build completes.
🤖 Generated with Claude Code