[Python-Dev] guidance sought: merging port related changes to Library modules

Andrew MacIntyre andymac@bullseye.apana.org.au
Sat, 12 Jan 2002 22:28:46 +1100 (EDT)


In preparing a set of patches intended to bring the OS/2 EMX port into
CVS, I have a dilemma as to how best to integrate some changes to standard
library modules.

As background to this request I note that EMX and Cygwin have similar
philosophies and attributes, being Posix/Unixish runtime environments on
OSes with PC-DOS ancestry. Both rely on the GNU toolchain for software
development.

As a result of feedback on the previous set of patches, I am pruning
cosmetic changes and attempting to minimise the footprint of the necessary
changes.

The particular changes I am looking for guidance on (or BDFL
pronouncement on, as the case may be) involve os.py and the functionality
in ntpath.py.

The approach used in the port as released in binary form was to create a
module called os2path.py (probably should really be called os2emxpath.py),
which replicates the functionality of ntpath.py with OS2/EMX specific
changes.

Most of the changes have to do with using different path separator
characters, with a few other changes reflecting slightly different
behavour under EMX.  EMX promotes the use of '/' as the path separator
rather than '\', though it works with the latter.  I don't know if Cygwin
promotes the same convention.

If I were to merge os2path.py into ntpath.py (which I incline towards
instinctively) I believe that using references to os.sep and os.altsep
rather than explicit '\\' and '/' strings would significantly reduce the
extent of conditionalisation required, but in the process introduce
significant source changes into ntpath.py (although the logical changes
would be much less significant).

If rationalising the use of separator characters (by moving away from
hard-coded strings) in ntpath.py is unattractive, then I think I'd prefer
to keep os2path.py (renamed to os2emxpath.py) as is, rather than revert
to the DOS standard path separators.

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac@bullseye.apana.org.au  | Snail: PO Box 370
        andymac@pcug.org.au            |        Belconnen  ACT  2616
Web:    http://www.andymac.org/        |        Australia