[house_auction] Pin prettytable<3.18 for base-Anaconda wcwidth compatibility#939
Merged
Conversation
…ibility prettytable 3.18.0 requires wcwidth>=0.3.5 (it calls wcwidth.width()), but base Anaconda 2026.06 ships wcwidth 0.2.14. The in-lecture '!pip install -U wcwidth' from #937 can't fix this: the kernel imports wcwidth at startup, so the already-cached module isn't reloaded by an in-session pip upgrade. Pin prettytable<3.18 (which works with wcwidth 0.2.14) instead. See #938. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the house_auction lecture’s in-notebook dependency installation to avoid the prettytable 3.18+ / base-Anaconda wcwidth incompatibility that causes full -W builds to fail.
Changes:
- Replaces the runtime
pip install -U prettytable wcwidthwith a version constraint that installsprettytable<3.18in the lecture.
📖 Netlify Preview Ready!Preview URL: https://pr-939--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild Info
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pins
house_auction's in-lecture install toprettytable<3.18, reverting the!pip install -U prettytable wcwidthfrom #937 (which does not actually fix the full-build failure — see below).The failure. On a full
-Wcache build,house_auctionfails withAttributeError: module 'wcwidth' has no attribute 'width'.prettytable3.18.0 callswcwidth.width()and requireswcwidth>=0.3.5, but base Anaconda (2026.06) shipswcwidth0.2.14, which has no.width.Why #937's in-lecture upgrade can't work. The Jupyter kernel imports
wcwidthat startup (via IPython/ipykernel), so it is already cached insys.modulesas 0.2.14 before any cell runs. A runtime!pip install -U wcwidthupgrades the package on disk but does not reload the already-imported module in the running kernel — only a kernel restart would. #937 was verified in a clean venv (a fresh process, which naturally picks up the newwcwidth), which masked this. It also means a base-Anaconda reader running the notebook top-to-bottom hits the same failure, not just CI.The fix.
prettytable≤ 3.17.0 depends only onwcwidth(unpinned) and works with base Anaconda's 0.2.14, so pinning<3.18removes the need for anywcwidthupgrade. This keeps the lecture runnable in base Anaconda — pinningwcwidthinenvironment.ymlinstead would only green CI while leaving a base-Anaconda reader broken.Follow-up. Tracked in #938: drop the
<3.18pin and return to the latestprettytableonce a base Anaconda release shipswcwidth>=0.3.5.🤖 Generated with Claude Code