Skip to content

provide __file__ to extension init function #57638

@scoder

Description

@scoder
BPO 13429
Nosy @loewis, @jcea, @amauryfa, @scoder, @ericsnowcurrently
Files
  • ext_module_init_file_path.patch: Patch that implements a protocol between dynlib loader and module creator, similar to the existing _Py_PackageContext
  • ext_module_reinit_context.patch: Patch that implements both protocols also for the module reinit case
  • ext_module_init_file_path_2.patch: Updated patch that does not reset _Py_ModuleImportContext after use
  • 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 = <Date 2017-07-25.06:13:22.128>
    created_at = <Date 2011-11-18.15:46:57.922>
    labels = ['extension-modules', 'interpreter-core', 'type-feature']
    title = 'provide __file__ to extension init function'
    updated_at = <Date 2017-07-25.06:13:22.125>
    user = 'https://github.com/scoder'

    bugs.python.org fields:

    activity = <Date 2017-07-25.06:13:22.125>
    actor = 'scoder'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-07-25.06:13:22.128>
    closer = 'scoder'
    components = ['Extension Modules', 'Interpreter Core']
    creation = <Date 2011-11-18.15:46:57.922>
    creator = 'scoder'
    dependencies = []
    files = ['23725', '23726', '23728']
    hgrepos = []
    issue_num = 13429
    keywords = ['patch']
    message_count = 15.0
    messages = ['147881', '147888', '147905', '147909', '147910', '147920', '147922', '147928', '147929', '147932', '148002', '150247', '175138', '175187', '299041']
    nosy_count = 6.0
    nosy_names = ['loewis', 'jcea', 'amaury.forgeotdarc', 'scoder', 'Arfrever', 'eric.snow']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue13429'
    versions = ['Python 3.5']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      extension-modulesC modules in the Modules dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions