Skip to content

MAINT: upgrade anaconda=2026.06#346

Open
mmcky wants to merge 3 commits into
mainfrom
maint-anaconda-2026.06
Open

MAINT: upgrade anaconda=2026.06#346
mmcky wants to merge 3 commits into
mainfrom
maint-anaconda-2026.06

Conversation

@mmcky

@mmcky mmcky commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What

Bumps the Anaconda distribution pinned in environment.yml from 2025.12 to 2026.06.

The python=3.13 pin is unchanged — anaconda=2026.06 ships a py313 build on the default channel, so no Python version change is required. No other dependency pins are touched (the pip: section is untouched).

Validation

A local conda dry-run solve confirms the environment resolves cleanly with python=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 reuses main's build cache — would skip re-execution and silently miss runtime regressions. To get a meaningful check, the cache.yml workflow 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

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>
Copilot AI review requested due to automatic review settings June 22, 2026 00:01
@netlify

netlify Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploy Preview for lustrous-melomakarona-3ee73e ready!

Name Link
🔨 Latest commit 6006786
🔍 Latest deploy log https://app.netlify.com/projects/lustrous-melomakarona-3ee73e/deploys/6a3889ff6c684200082f45f7
😎 Deploy Preview https://deploy-preview-346--lustrous-melomakarona-3ee73e.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 anaconda pin from 2025.12 to 2026.06 in environment.yml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request June 22, 2026 00:10 Inactive
@mmcky

mmcky commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Validation results — full re-execution under anaconda=2026.06

Bottom line: the upgrade is currently blocked. The environment resolves and installs fine, but a forced full re-execution of every lecture fails on 6 lectures, traced to two upstream library incompatibilities (numpy 2.4 and pandas 3.0) — none of the failures are in lecture code. These are genuine new regressions: main's own weekly full re-execution (cache.yml) is green every week (last success 2026-06-15, under numpy 2.3.5 / pandas 2.3.3).

What was validated

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.ymlforced full re-execution of all 67 lectures fail — 6 lectures error (the 12 build warnings are exactly these 6 × 2)

Key version jumps (2025.122026.06)

Package 2025.12 2026.06
pandas 2.3.3 3.0.3 ⚠️ major — breaks pandas-datareader
numpy 2.3.5 2.4.6 ⚠️ breaks 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 by TypeError: 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 no if: 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 adding if: always() to that upload step so future failed runs still publish the executed notebooks.)
  • Runs: cache.yml full re-execution 27921715960 ❌ · ci.yml 27921712788

🤖 Generated with Claude Code

mmcky and others added 2 commits June 22, 2026 11:03
…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>
@mmcky

mmcky commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up actions

  • doubts_or_variability (pandas 3.0 blocker) — fixed in this PR (f74e554). Replaced the unmaintained pandas-datareader with a direct FRED CSV download via pandas.read_csv. Verified locally that the pipeline still produces 236 quarterly observations (235 growth rates) with matching sample moments.
  • numpy 2.4 DLE blocker — filed upstream: DLE.compute_sequence fails under NumPy 2.4 (setting an array element with a sequence) QuantEcon.py#839, with the exact _dle.py reproduction and a suggested .item() patch. This needs a quantecon release before the 5 affected lectures can pass, since they !pip install --upgrade quantecon at runtime.
  • CI: cache.yml now uploads _build on failure too (6006786, if: always()), so failed full-re-execution runs still publish the executed notebooks for warning inspection.

A fresh full re-execution is running (27923399210). It will still fail overall until QuantEcon.py#839 ships, but it should confirm doubts_or_variability now passes and will produce the executed-notebook artifact for a non-fatal deprecation/warning scan.

This PR stays blocked pending the upstream quantecon release.

@mmcky

mmcky commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Non-fatal deprecation / warning scan (full re-execution under anaconda=2026.06)

Now that if: always() publishes the executed notebooks, I scanned every executed lecture from the re-run for runtime warnings.

Headline: the numpy 2.4 / pandas 3.0 jumps introduced no new deprecation or future warnings in the lecture code. 0 FutureWarning, 0 PendingDeprecationWarning, and every DeprecationWarning present comes from matplotlib or plotly/kaleido API changes — none from numpy or pandas. The only numpy/pandas impact was the hard failures already tracked (the doubts_or_variability pandas-3.0 break, now fixed, and the DLE/numpy-2.4 break, QuantEcon/QuantEcon.py#839).

DeprecationWarnings (9 total — all pre-existing, not from this bump, non-blocking)

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 deprecated engine= 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.

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.

2 participants