Skip to content

co_filename does not match __file__ for frozen stdlib modules #89815

Open

Description

@ericsnowcurrently
BPO 45652
Nosy @ericsnowcurrently, @FFY00

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2021-10-28.17:45:27.885>
labels = ['interpreter-core', 'type-bug', '3.11']
title = 'co_filename does not match __file__ for frozen stdlib modules'
updated_at = <Date 2021-10-28.17:45:27.885>
user = 'https://github.com/ericsnowcurrently'

bugs.python.org fields:

activity = <Date 2021-10-28.17:45:27.885>
actor = 'eric.snow'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Interpreter Core']
creation = <Date 2021-10-28.17:45:27.885>
creator = 'eric.snow'
dependencies = []
files = []
hgrepos = []
issue_num = 45652
keywords = []
message_count = 1.0
messages = ['405209']
nosy_count = 2.0
nosy_names = ['eric.snow', 'FFY00']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue45652'
versions = ['Python 3.11']

Activity

  1. ericsnowcurrently commented on Oct 28, 2021

    @ericsnowcurrently
    MemberAuthor

    Frozen modules currently have co_filename set to "<frozen NAME>". It would be good to have it match __file__ instead. This will require require also fixing any code objects in the module's co_consts (and so on). It may make sense to take care of the while unmarshaling, but could be done (less efficiently) after the fact.

  2. added
    3.11only security fixes
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    type-bugAn unexpected behavior, bug, or error
    on Oct 28, 2021
  3. transferred this issue fromon Apr 10, 2022
  4. added a commit that references this issue on Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions