[Python-3000] [stdlib-sig] PEP 3108 - stdlib reorg/cleanup

Brett Cannon brett at python.org
Tue Apr 29 22:46:45 CEST 2008


On Tue, Apr 29, 2008 at 5:07 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Raymond Hettinger wrote:
>
> >
> > > * UserList/UserString [done: 3.0]
> > >
> >
> > Note that these were updated and moved to the collections module in Py3.0.
> >
> >
> > > anydbm             dbm.tools [1]_
> > > whichdb            dbm.tools [1]_
> > >
> >
> > Were there any better naming suggestions than dbm.tools?  The original
> names seem much more informative.
> >
>
>  Maybe they're more informative if you've been using them for a long time.
> As a non-DB-API user, anydbm seems just as generic to me as dbm.tools, and
> whichdb.whichdb is just redundant.
>
>  dbm.tools.open and dbm.tools.whichdb seem fine as names for the functions.
>
>
>
> >
> > > For modules that are renamed, stub modules will be created with the
> > > original names and be kept in a directory within the stdlib (e.g. like
> > > how lib-old was once used).
> > >
> >
> > What is the purpose of the new directory?  Are there some use
> > cases for intermixing the new and old names?  Is there something
> > that the 2-to-3 converter won't be able to handle?
> >
>
>  The reason is noted in the PEP - it's to keep case insensitive filesystems
> (such as NTFS) from spitting the dummy when we try to put both a
> ConfigParser.py (old name) and configparser.py (new name) in the Python Lib
> directory.
>
>  I'd like to see the PEP address the question of how it is going to deal
> with getting duplicate copies of modules in sys.modules when some code in an
> application uses the old name and some code uses the new name.
>

There is not much that can be done without introducing a custom
importer to handle the mapping of names in sys.modules to the same
module object. Otherwise it's going to be done using ``from _ import
*``.

-Brett


More information about the Python-3000 mailing list