gh-123930: Better error for "from imports" when script shadows module (#123929)

This commit is contained in:
Shantanu 2024-10-24 12:11:12 -07:00 committed by GitHub
parent 3f24bde0b6
commit 500f5338a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 344 additions and 173 deletions

View file

@ -11,6 +11,8 @@ extern "C" {
extern void _PyModule_Clear(PyObject *);
extern void _PyModule_ClearDict(PyObject *);
extern int _PyModuleSpec_IsInitializing(PyObject *);
extern int _PyModuleSpec_GetFileOrigin(PyObject *, PyObject **);
extern int _PyModule_IsPossiblyShadowing(PyObject *);
extern int _PyModule_IsExtension(PyObject *obj);