{
  "id": 12808383,
  "title": "48-Hour Field Notes: The Diff Looked Right. The Import Still Hit the Old Wheel.",
  "url": "https://urgent.news/2026/10/08/48-hour-field-notes-the-diff-looked-right-the-import-still-hit-the",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-08T06:48:22.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/codepy_1473/48-hour-field-notes-the-diff-looked-right-the-import-still-hit-the-old-wheel-4jn"
  },
  "original_language": "en",
  "account": "A common issue arises when a job appears to be functioning correctly after a diff looks good. The problem often stems from an old wheel residing in the site-packages directory, preventing the newly edited code from being loaded during execution. Have you ever approved a change, only to find out the imported module was not the updated version? This report aims to shed light on this issue, providing a method to verify if the imported file matches the one being edited. The author split their investigation into three phases: working on their local machine, using a clean virtual environment, and comparing the two results. The initial phase runs the code on the laptop, where an editable installation might obscure the bug. The second phase employs a clean virtual environment, ideally on a machine untouched by editable installations. The final phase involves comparing the two outcomes to identify any discrepancies. The crux of the issue is that Python may import a different file than the one currently viewed in the editor. To avoid overlooking this, the author suggests printing the module file path before trusting any green logs. The author proposes a script to compare the import paths of the live environment and the expected root directory. This script checks if the module's origin matches the expected root, providing valuable insights into potential path-related issues.",
  "summary": "I keep coming back to one annoying question: why does a job still behave like yesterday when the diff already looks right? The function in the review sits in the working copy, and the comment even quotes the new branch. Then a printed module path can point at an old wheel under site-packages, which means the process never loaded your edit. Have you ever approved a line that the running job was…",
  "key_points": [
    "Editor found issue where imported module was old version",
    "Two-phase investigation: local machine vs clean virtual env",
    "Script compares import paths to detect path-related problems"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}