Skip to content

EXTEND doesn't treat bare identifiers and package specs as extension specifiers. #119

@python-processing-unit

Description

@python-processing-unit

According to the specification section 8.2:

The EXTEND operator accepts loader-specification forms (bare identifiers and package-style specs) and MUST pass those specifiers to the extension loader rather than evaluating them as ordinary expressions.

In the implementation, however, bare identifiers and package-spec forms passed to EXTEND are evaluated as expressions instead of being treated as loader specs. This causes extension registration to fail or return incorrect results, and explains the observed EXTEND search-path and loader-resolution failures.

Prefix REPL. Enter statements, blank line to run buffer.
>>> BOOL: result = EXTEND(extend_core)
Traceback (most recent call last):
  File "<repl>", line 1, in <top-level>
    BOOL: result = EXTEND(extend_core)
    State log index: 1  State id: s_000001
RuntimeError: extend_core is not defined
>>>

The same failure occurs with package-spec forms:

>>> BOOL: result = EXTEND(extpackage..submod)
Traceback (most recent call last):
  File "<repl>", line 1, in <top-level>
    BOOL: result = EXTEND(extpackage..submod)
    State log index: 2  State id: s_000002
RuntimeError: extpackage is not defined
>>>

Metadata

Metadata

Labels

bugSomething isn't workingpatchRequires a patch version change.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions