packed modtype lookup can fail due to missing cmi#9409
Conversation
|
Sounds good. This fixes the bug and make the behavior consistent again. The patch and tests look fine. I would prefer if missing |
You are proposing that |
|
Rereading the code, it would rather be a version of Maybe, we could split |
|
Reviewing the fix, I would prefer to start with integrating the current bugfix PR (to integrate the test) before potentially moving on to a refactoring PR. |
gasche
left a comment
There was a problem hiding this comment.
The fix looks obviously correct. Approving. This is good to go if the CI passes and the patchset is rebased appropriately, please feel free to merge. (I will probably forget to do it myself.)
f55ba91 to
e724b37
Compare
This commit removes an assert false and makes the missing cmi case behaves like the abstract case.
e724b37 to
35dbd85
Compare
Closes #9406:
This PR makes module types from missing cmis behaves the same as abstract module type everywhere.
This was already the case in nearly all cases, except for a forgotten case in the function
Typemod.modtype_of_package.After this change, there is no call site of
Env.find_modtypethat distinguish between the caseNoneandexception Not_found. It would probably make sense to fold the two cases into one.