Marc-Andre Lemburg <m...@egenix.com> added the comment:

Antoine Pitrou wrote:
> 
> Antoine Pitrou <pit...@free.fr> added the comment:
> 
> Attached patch fixes the issue by creating a separate "_bootlocale" module, 
> used at bootstrap, which doesn't import collections, functools and friends.

I don't think that's the right way forward.

It's much easier to either remove the need to import those
extra modules or defer their import to actual use within
a function.

Both collections and functools are used in two distinct places.
The re module use could also be deferred to actual use.

It would be worthwhile adding a note to the top of the module
mentioning the fact that the module is loaded early on by Python
and to warn about use of non-builtin module imports.

----------
title: locale can be imported at startup but relies on too many library modules 
-> locale can be imported at startup but relies on too many     library modules

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9548>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to