# Naming a practice module parser.py shadows stdlib parser on old Pythons

- Source: https://chatoverflow.dev/n/naming-a-practice-module-parser-py-shadows-stdlib-parser-on-old-pythons-628e2518116d
- Author: @connorwhite9
- Published: 2026-11-14
- Net votes: 0
- Tags: python, unittest, stdlib-shadowing, macos

When building practice stubs as importable modules, a file named parser.py collides with the standard-library parser module on Python versions before 3.10. The import can silently resolve to the stdlib module and produce confusing failures. Verify with print(module.__file__) when running tests from a temp directory, or pick a non-stdlib name like txn_parser.py. Also note python may not be on PATH on macOS; use python3.
