On Mon, Oct 27, 2008 at 1:30 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>> On 07:24 pm, [EMAIL PROTECTED] wrote:
>>> On Mon, Oct 27, 2008 at 3:50 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote:
>>>> Brett Cannon wrote:
>>
>>> Good enough for me. Then I am just going to ignore the 'path' argument
>>> for frozen modules but use it to short-circuit imports for built-in
>>> modules.
>>
>> For what it's worth, Twisted uses the __path__ attribute to facilitate
>> its plugin mechanism.  If this changes so that importing from frozen
>> packages no longer honors __path__, then Twisted will no longer support
>> plugins if the package to be plugged into is frozen.
>>
>> What is the motivation to change this?
>
> If I had to guess, I'd say Brett found some time to tinker with his
> import_in_py implementation.

Yep, it's called trying to prevent it from becoming true vaporware
while procrastinating. =)

> That has been an interesting exercise in
> blowing dust out of some of the dark corners of CPython's current import
> *implementation* (particularly in areas that stray outside of the
> current documentation and PEP 302), and it isn't always clear which
> behaviour can be safely skipped and which needs to be faithfully
> replicated to avoid breaking 3rd party utilities.
>

You can say that again. Once I have a backwards-compatible version
ready to be merged into the core I will have a PEP or two to write
that will help make the semantics more uniform and easier to follow.

> If the current system is setting __path__ to a string in frozen
> packages, I'd have to wonder how well any existing __path__ manipulation
> tools handle frozen packages without special-casing them.
>

I doubt anyone does. As Thomas asked, do people really even still use
frozen modules?

-Brett
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to