Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

dylink_import_module_symbols under repyportability violates Python import override conventions #27

@choksi81

Description

@choksi81

When doing from repyportability import * and add_dy_support(locals()) to add Repy and dylink calls to a Python program, dylink_import_module_symbols no longer respects the usual overriding conventions. Specifically,

# Import a variable ``foo''
dy_import_module_symbols("examplelib.repy")

# Override it locally
foo = "local override"

# Importing it again should reset foo to the library's version
dy_import_module_symbols("examplelib.repy")

assert(foo != "local override")
# XXX Failed to reset!

I'll add six unit tests that document the Python / Python-with-repyportability / Repy behavior for "import x" / "from x import *" (and the corresponding dylink calls).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions