What to Do When the Bug Is in Someone Else's Code
summary
Fix upstream is gold standard: submit a patch, it often merges within days and ships (example: fixed for pandas 1.1.4). When waiting, use wrapper functions or opportunistic upgrading (feature detection or version checks) and scope fixes with a context manager. For urgent or isolation needs choose monkey patching, vendoring (beware import leaks) or maintaining a fork (use quilts or patched tarballs); pip/setup tools and vendored revealjs are real examples of tradeoffs and long term debt.
AI-written summary · about
chapters (13)
- 0:00Start
- 3:54What Can Go Wrong
- 4:12Long Upstream Release Cycles
- 7:06Opportunistic Upgrading
- 11:42Monkey Patching
- 14:13Why this Is a Terrible Idea
- 17:06Real Life Examples
- 18:30Vendoring
- 19:59Cautions
- 23:19Maintaining a Fork
- 25:13Downsides
- 27:27Recap of the Strategies
- 29:10Final Thoughts
related talks
18mHunting the Bugs
42mInheriting a Sloppy Codebase: A Practical Guide to Wrangling Chaotic Code
25mHow the magic of open source helps our project
31mHear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
26mDeep Diving: How to Explore a New Code Base
22mFrom Bug To PR: Turning Customer Pain Points Into Upstream Contributions
32mDeep diving: how to explore a new code base
34mKeeping up with Python: what makes upgrades hard, and what can we do about it
