This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients brett.cannon, lemburg, mark.dickinson, orsenthil, pitrou, rhettinger, vstinner
Date 2010-08-11.08:07:37
SpamBayes Score 3.364431e-08
Marked as misclassified No
Message-id <4C625A56.2010409@egenix.com>
In-reply-to <1281392378.3173.16.camel@localhost.localdomain>
Content
Antoine Pitrou wrote:
> 
> Antoine Pitrou <pitrou@free.fr> added the comment:
> 
>> I said "warn about the use of non-builtin modules", not disallow
>> their use. AFAIK, the purpose of the exercise is to reduce the
>> number of non-builtin modules being loaded early on during
>> Python startup.
> 
> The purpose of the exercise is to avoid, as much as possible, the
> numerous issues that have already been encountered because of the
> startup procedure relying on locale in various conditions for
> initialization of the standard streams.
> 
> You are proposing that we commit a one-time fix to fix the current
> situation. Recent history shows that similar problems will arise again,
> and waste useful developer time for committing urgency fixes in order to
> fix the build (not to mention that the symptoms are sometimes difficult
> to diagnose, such as in this very issue). I am proposing a broader
> change which prevents, as much as possible, similar problems from
> reappearing and will relieve us from a dispensable burden.

No, what I'm proposing is to make "import locale" safe during
boot time. By separating out some functions into a separate
module which is then supposed to be used by the boot process,
you don't really solve the problem. Other code in the boot process
may very well still import the main locale module and thus
cause the same problems you were trying to solve by separating
out the problematic code - even if this is just code that gets
run via sitecustomize.py or other such hooks.

The changes I'm suggesting will be beneficial to all
standard uses of the module without any such workarounds
based on conventions.
History
Date User Action Args
2010-08-11 08:07:42lemburgsetrecipients: + lemburg, brett.cannon, rhettinger, mark.dickinson, orsenthil, pitrou, vstinner
2010-08-11 08:07:39lemburglinkissue9548 messages
2010-08-11 08:07:37lemburgcreate