-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Cannot find exec_module for _importlib_modulespec.exec_module with incremental #2451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Cannot find exec_module for _importlib_modulespec.exec_module
with incremental
Test case: class A: pass
class B: pass
class C: pass
class X:
attr: A
class Y:
attr: B
class Z(X, Y):
attr: C Example:
|
Looks like this is new since 0.4.5. Perhaps you can bisect? |
Cannot find exec_module for _importlib_modulespec.exec_module
with incremental
@gvanrossum First bad commit was 075a8da, from #2304. |
Also, here's a slightly smaller test case: class A: pass
class B: pass
class X:
attr: A
class Y:
attr: B
class Z(X, Y): pass The core bug seems to be when two different base classes define an attribute to be of different types. |
I've been doing some research. This apparently has something to do with functions defined inside of conditionals inside classes, like: class X:
if sys.version_info >= (1, 2, 3):
def f(self): pass
else:
def f(self): pass Previously, only global functions went through the first pass of semantic analysis. Now, because of the changes in #2304, methods are also analyzed. Immediately returning from |
AAAAND THE BUG IS...this innocent line:
Now methods are being evaluated, BUT |
Still trying to get a test case, but here's the traceback:
The text was updated successfully, but these errors were encountered: