Uh oh!
There was an error while loading. Please reload this page.
add and migrate constants from ctypes/__init__.pyi to _ctypes.pyi - #8643
Conversation
This comment has been minimized.
This comment has been minimized.
AlexWaygood
commented
Aug 29, 2022
Hmm, I'm not sure what's up with the pytype crash. This might be as a result of the circular import :( I'll try bumping the pytype version in CI to see if that helps, since I think pytype's done some work on improving their name-resolution logic recently. |
junkmd
commented
Aug 29, 2022
A similar situation existed here. |
AlexWaygood
commented
Aug 29, 2022
No, looks like that didn't fix it As a workaround for now, maybe you could leave |
This comment has been minimized.
This comment has been minimized.
Akuli
commented
Aug 29, 2022
We could also use |
junkmd
commented
Aug 29, 2022
It is curious that no other modules using circular imports have this error, such as I will add workarounds to |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Akuli
commented
Aug 29, 2022
Circular imports don't automatically mean that pytype will crash. They only crash pytype when hitting some corner case that wasn't considered before. |
This comment has been minimized.
This comment has been minimized.
junkmd
commented
Aug 29, 2022
@Akuli I added all the modules in According to the error messages, some errors seem to occur in various modules importing Do I have to change the |
Akuli
commented
Aug 29, 2022
Because Instead, we can:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
junkmd
commented
Aug 29, 2022
@Akuli |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
I have moved some constants in
ctypes/__init__.pyito_ctypes.pyias defined in the implementation.I also added some constants defined in
_ctypes.I will move other stuffs eventually, but I will try to do it little by little.
stdlib/_ctypes#8571 and migrate some stuffs inctypes/__init__.pyiinto_ctypes.pyi, but circular import occurs #8633