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 pitrou
Recipients alexandre.vassalotti, belopolsky, benjamin.peterson, mark.dickinson, pitrou
Date 2010-07-01.16:18:33
SpamBayes Score 0.00023357096
Marked as misclassified No
Message-id <1278001111.3211.9.camel@localhost.localdomain>
In-reply-to <1277994538.26.0.802894816163.issue9104@psf.upfronthosting.co.za>
Content
> > You can make the dictionary values as lists for the 'blocked'
> > argument for import_fresh_module(). That would work [for io].
> 
> I don't understand how having multiple modules in the blocked list
> will help in io case.  io.py will simply not work if _io is blocked. 

Which you avoid by giving an empty list of blocked modules, using
Alexandre's suggestion.

> I don't like that approach because it makes pure python code hard to
> discover.

Ok, but this code exists and it would be much better if it were
supported.

> The io/_pyio approach also prevents io.py from bring used by
> alternative python implementations unmodified.

It would be foolish to use it unmodified anyway, unless you like
low-speed I/O (and a JIT isn't a magic bullet).

The reason this was done like this is that the io module is imported at
startup: we want to avoid unnecessary parsing of extraneous code (and
unnecessary importing additional dependencies), and we also want to
reduce opportunities for failing to initialize the standard I/O streams
(especially stderr...).

> This will not solve the io issue, but will add some flexibility.

Which is pointless unless such flexibility is needed by someone.
History
Date User Action Args
2010-07-01 16:18:35pitrousetrecipients: + pitrou, mark.dickinson, belopolsky, alexandre.vassalotti, benjamin.peterson
2010-07-01 16:18:34pitroulinkissue9104 messages
2010-07-01 16:18:33pitroucreate