On Sun, Apr 12, 2020 at 8:36 AM Hai Shi email@example.com wrote:
I notice some modules not in modules directory(for example: _warnings、marshal in python directory). Do we need port those modules to modules directory?
FWIW, this is something I've been meaning to look at for a while and is relatively high on my "back burner"  TODO list. :) Not only do we have some "extension" modules defined in Python/, but we also have some core runtime functionality defined in the Modules/ directory (e.g. in gcmodule.c).
In practice neither has been a problem over the years. However, it does make discovery a bit more complicated, both for new contributors and for tools. So I consider it at the least worth looking into the value (and downsides, if any) of moving the seemingly out-of-place pieces to the appropriate locations.
Anyway, I haven't looked at this super closely (and likely won't for a while), so at this point the above is mostly just my gut reaction. Take it for what it's worth. :)
 as in "on the back burner of the stove"