[Python-Dev] Mixed up core/module source file locations in CPython

Eric Snow ericsnowcurrently at gmail.com
Sat Nov 16 19:40:18 CET 2013


If you look at the Python and Modules directories in the cpython repo,
you'll find modules in Python/ and core files (like python.c and
main.c) in Modules/.  (It's like parking on a driveway and driving on
a parkway. <wink>)  It's not that big a deal and not that hard to
figure out (so I'm fine with the status quo), but it is a bit
surprising.  When I was first getting familiar with the code base  a
few years ago (as a C non-expert), it was a not insignificant but not
major stumbling block.

The situation is mostly a consequence of history, if I understand
correctly.  The subject has come up before and I don't recall any
objections to doing something about it.  I haven't had the time to
track down those earlier discussions, though I remember Benjamin
having some comment about it.

Would it be too disruptive (churn, etc.) to clean this up in 3.5?  I
see it similarly to when I moved a light switch from outside my
bathroom to inside.  For a while, but not that long, I kept
unconsciously reaching for the switch that was no longer there on the
outside.  Regardless I'm glad I did it.  Likewise, moving the handful
of files around is a relatively inconsequential change that would make
the project just a little less surprising, particularly for new
contributors.

-eric

p.s. Either way I'll probably take some time (it shouldn't take long)
after the PEP 451 implementation is done to put together a patch that
moves the files around, just to see what difference it makes.


More information about the Python-Dev mailing list