GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — shadowing error with `traceback` module leads to unexpected code execution · Issue #138170 · python/cpython Closed as duplicate Closed as duplicate Copy link Labels DescriptionBug reportBug description:Python's Here is a minimal example in Python 3.13.5 with the CPython interpreter. I create two files, each with one line of code, and put them in the same directory: a.py # this will raise an exception traceback.py # this will be called unexpectedly When I run I'm aware that module import shadowing is a known feature of the language. Usually, this issue only arises when the developer has either invoked Note that built-in modules receive special treatment to prevent precisely this. You can also get this behavior by shadowing other modules which are imported from It seems that this is because when modules are imported in order to print a traceback, they are imported in sys.path order without checking builtins first. The strange behavior first appeared after PR 110721 was approved. CPython versions tested on:3.13 Operating systems tested on:Linux, macOS Linked PRsActivity
MetadataMetadataAssigneesLabelsProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |