Skip to content

fix(Install): Name the extras when a plain install tries to fetch data - #45

Merged
szemyd merged 1 commit into
mainfrom
claude/aperiodic-bare-install
Nov 11, 2026
Merged

szemyd merged 1 commit into
mainfrom
claude/aperiodic-bare-install

Conversation

@szemyd

@szemyd szemyd commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

The bug

A plain pip install aperiodic (the README's first instruction) installs no HTTP client. The first data call then falls to the Pyodide transport and crashes:

ModuleNotFoundError: No module named 'pyodide'
RuntimeWarning: coroutine 'get_symbols_async' was never awaited

This turned up while testing the 4.4.0 release. aperiodic.login() works on a plain install, since it only uses the standard library, so the very next call is where people hit it. The bug itself is older than #43.

The fix

  • Clear error: outside Pyodide, the Pyodide transport is only ever chosen because httpx is missing. It now raises an ImportError that names the fix: pip install "aperiodic[polars]" or pip install "aperiodic[pandas]". This happens in run_async, fetch_json and download_parquet_bytes, and run_async closes the coroutine first, so there's no "never awaited" warning.
  • Detection: _has_pyodide_ffi() returns False instead of raising when there's no pyodide package at all.
  • README: installation now leads with pip install "aperiodic[polars]" # or "aperiodic[pandas]", and says a plain install is enough to sign in but not to fetch data.
  • Pyodide unaffected: inside Pyodide, or in tests that fake it through sys.modules, nothing changes.

Checks

  • New TestPlainInstall tests cover detection returning False, sync calls naming the extra and closing the coroutine, and async calls naming the extra. All three fail on main and pass here.
  • A fresh venv with a plain install, calling get_symbols(...), now ends with the ImportError above instead of the pyodide crash.
  • ruff 0.14.1 (CI's version) is clean.
  • The full suite shows the same 34 integration failures as main (they need a real key and network); 199 pass.

Generated by Claude Code

A plain `pip install aperiodic` has no HTTP client, so data calls fell to
the Pyodide transport and crashed with "No module named 'pyodide'". Outside
Pyodide that transport now raises an ImportError naming the extras
(aperiodic[polars] or aperiodic[pandas]), the Pyodide check returns False
instead of raising, and the README installs an extra first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MoDcuvZ8WqH4mnxq31Muur
@szemyd
szemyd merged commit 9524199 into main Nov 11, 2026
28 of 31 checks passed
@szemyd
szemyd deleted the claude/aperiodic-bare-install branch November 11, 2026 00:00
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