[Python-Dev] Split unicodeobject.c into subfiles? (original) (raw)

Chris Jerdonek chris.jerdonek at gmail.com
Fri Oct 5 00:16:40 CEST 2012


On Thu, Oct 4, 2012 at 1:30 PM, Victor Stinner <victor.stinner at gmail.com> wrote:

I would like to split the huge unicodeobject.c file into smaller files. It's just the longest C file of CPython: 14,849 lines. ... I only see one argument against such refactoring: it will be harder to backport/forwardport bugfixes.

I am not siding with either side of the change yet, but an additional argument against is that history may become less convenient to navigate and track (e.g. hg annotate may lose information depending on how the split is done).

Do we have a preferred way to split files? For example, hg rename could be used just for the largest chunk. Or hg copy could be used on all chunks but one. I imagine (but have not confirmed) that the latter would preserve hg annotate and let merges propagate to all files, but it would also result in spurious merge conflicts in every one of the files resulting from the split.

--Chris



More information about the Python-Dev mailing list