On 3/7/07, Barry Warsaw <barry at python.org> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Mar 7, 2007, at 4:36 PM, Brett Cannon wrote: > > >> >> Third party package renaming is also supported, via several public > >> >> interfaces accessible by any Python module. > >> >> > >> > > >> > I guess a .pth file could install the mappings for the third-party > >> > modules. > >> > >> How would that work? .pth files don't execute arbitrary Python code, > > > > It does through imports, though. > > I think it's important to import on demand only though. And I agree. > I should > probably make that clear in the PEP <wink>. IOW, "import email" > should not by side-effect import all sub-modules just because there's > a remapping involved. This actually would be quite easy to do, but > it's one of the reasons why the Python 2.5 email package hack goes > through so much trouble. > I am not suggesting that every rename be imported. All I am saying is that a .pth file could ``import pkg.old_names`` and that old_names module adds the mappings, that's all. It doesn't do anything that you are not proposing be done automatically. -Brett
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4