You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: GraalPy's 'from m import *' swallows a missing __all__ name, failing the aenum premise test #2083
Split from #2082. tests/utilities/test_compat_aenum_nonetype_1958_unit.py::TheAenumPremiseTests::test_aenum_alone_fails_on_the_builtin has failed on every full GraalPy run since #2006. It gets NameError: name '_Addendum' is not defined at aenum/_constant.py:107, where the test expects AttributeError.
Cause (from GraalPy's source, not reproduced locally): in oracle/graalpython's ImportStarNode.java, a single catch (PException e) { e.expectAttributeError(...) } handles both "no __all__" and "a name in __all__ is missing". On a missing name, GraalPy falls back to the module dict, which skips _ names. CPython raises AttributeError instead.
Repro:m.py holds __all__ = ['a', 'missing', '_b']; a = 1; _b = 2, and from m import * raises AttributeError on CPython but should give NameError: _b on GraalPy. No upstream issue was found.
Next: gate the premise test on GraalPy with a reason that cites the upstream behaviour (third-party runtimes are best effort). Reporting it upstream is the owner's call.
Fixed in b561d0f, a test-only push to main. On GraalPy, TheAenumPremiseTests now asserts the NameError on _Addendum that GraalPy actually raises. Everywhere else it still asserts CPython's AttributeError. The comment cites ImportStarNode.doImport: there, the per-name getAttr for each __all__ entry sits inside the same try as the __all__ lookup, so a missing name falls into the module-dict fallback, which skips _ names. If GraalPy is fixed, the assertion fails and tells us. The fix was checked on a real GraalPy 25.4.4 (1 failed before, 1 passed after) and on CPython 3.14.9.
Activity
test: expect aenum's NameError on _Addendum on GraalPy (#2083)
JarryShaw commentedon Oct 23, 2026
Fixed in b561d0f, a test-only push to
main. On GraalPy,TheAenumPremiseTestsnow asserts theNameErroron_Addendumthat GraalPy actually raises. Everywhere else it still asserts CPython'sAttributeError. The comment citesImportStarNode.doImport: there, the per-namegetAttrfor each__all__entry sits inside the sametryas the__all__lookup, so a missing name falls into the module-dict fallback, which skips_names. If GraalPy is fixed, the assertion fails and tells us. The fix was checked on a real GraalPy 25.4.4 (1 failed before, 1 passed after) and on CPython 3.14.9.