Skip to content

french_rev uses deprecated pandas frequency aliases ('M', 'AS') that intro already migrated — 3 FutureWarnings shown to readers #57

Description

@mmcky

lectures/french_rev.md still uses pandas frequency aliases that lecture-python-intro has already migrated away from, so three FutureWarnings print to the reader in-browser on every run of this lecture.

Observed live in a headless-Chromium Pyodide session at https://quantecon.github.io/lecture-wasm/french-rev/ after "Run all cells" (3 warnings, 19 images, 0 tracebacks):

  • <ipython-input-10-…>:7: FutureWarning: 'M' is deprecated … use 'ME'
  • <ipython-input-10-…>:14: FutureWarning: 'AS' is deprecated … use 'YS'
  • <ipython-input-12-…>:9: FutureWarning: 'M' is deprecated … use 'ME'

Mapping those back to source: cell 10 is file lines 518-544 (freq='M' at 527, freq='AS' at 535); cell 12 is 652-690 (freq='M' at 663).

Upstream already has the fix — lecture-python-intro/lectures/french_rev.md reads freq='ME' at :520, freq='YS' at :528 and freq='ME' at :654. So this is a three-token port, not a design decision.

Why nothing caught it

The gap is structural and worth noting beyond this lecture:

  • This repo's CI never executes. ci.yml's build step is myst build --html with no execution, so no warning any cell emits can ever surface here.
  • Upstream's executing CI cannot cover these strings, because intro already uses ME/YS. There is no build anywhere that runs this code as written.

So the wasm twin can drift arbitrarily far from intro on anything that only shows up at execution time, and the first observer is a reader.

Not urgent, but it does have a deadline

Pre-existing since 1e0d4cd (2025-05-17) and untouched by the host repoint — git show eceed27 -- lectures/french_rev.md | grep freq= is empty, confirming #55 did not introduce it. Cosmetic today. When Pyodide's bundled pandas drops the deprecated aliases, both cells will raise instead of warn, and a lecture whose CI never executes will go from "prints a warning" to "broken" with no build failure in between.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions