Re: [Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

2010-04-11 Thread Georg Brandl
Am 11.04.2010 00:25, schrieb Barry Warsaw: On Apr 10, 2010, at 08:28 PM, Georg Brandl wrote: Am 10.04.2010 18:12, schrieb Guido van Rossum: On Sat, Apr 10, 2010 at 8:58 AM, Barry Warsaw ba...@python.org wrote: On Apr 09, 2010, at 05:41 PM, Guido van Rossum wrote: On Fri, Apr 9, 2010 at 3:54

Re: [Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

2010-04-10 Thread Barry Warsaw
On Apr 09, 2010, at 05:41 PM, Guido van Rossum wrote: On Fri, Apr 9, 2010 at 3:54 PM, Paul Moore p.f.mo...@gmail.com wrote: Would it be better to name this one _PyImport_ExecCodeModuleExEx (with an underscore) so that we *don't* need to create an ExExEx version in future? (Sorry, Barry :-)) I

Re: [Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

2010-04-10 Thread Guido van Rossum
On Sat, Apr 10, 2010 at 8:58 AM, Barry Warsaw ba...@python.org wrote: On Apr 09, 2010, at 05:41 PM, Guido van Rossum wrote: On Fri, Apr 9, 2010 at 3:54 PM, Paul Moore p.f.mo...@gmail.com wrote: Would it be better to name this one _PyImport_ExecCodeModuleExEx (with an underscore) so that we

Re: [Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

2010-04-10 Thread Georg Brandl
Am 10.04.2010 18:12, schrieb Guido van Rossum: On Sat, Apr 10, 2010 at 8:58 AM, Barry Warsaw ba...@python.org wrote: On Apr 09, 2010, at 05:41 PM, Guido van Rossum wrote: On Fri, Apr 9, 2010 at 3:54 PM, Paul Moore p.f.mo...@gmail.com wrote: Would it be better to name this one

Re: [Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

2010-04-10 Thread Barry Warsaw
On Apr 10, 2010, at 08:28 PM, Georg Brandl wrote: Am 10.04.2010 18:12, schrieb Guido van Rossum: On Sat, Apr 10, 2010 at 8:58 AM, Barry Warsaw ba...@python.org wrote: On Apr 09, 2010, at 05:41 PM, Guido van Rossum wrote: On Fri, Apr 9, 2010 at 3:54 PM, Paul Moore p.f.mo...@gmail.com wrote:

[Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

2010-04-09 Thread Barry Warsaw
I've run into a minor snag implementing the __cached__ attribute on imported modules. From PEP 3147: As part of this PEP, we will add an `__cached__` attribute to modules, which will always point to the actual `pyc` file that was read or written. When the environment variable

Re: [Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

2010-04-09 Thread Guido van Rossum
It may be undocumented but it doesn't start with _ and it exists to preserve backwards compatibility. So I recommend adding PyImport_ExecCodeModuleExEx(). On Fri, Apr 9, 2010 at 1:24 PM, Barry Warsaw ba...@python.org wrote: I've run into a minor snag implementing the __cached__ attribute on

Re: [Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

2010-04-09 Thread Barry Warsaw
On Apr 09, 2010, at 02:52 PM, Guido van Rossum wrote: It may be undocumented but it doesn't start with _ and it exists to preserve backwards compatibility. So I recommend adding PyImport_ExecCodeModuleExEx(). Cool, thanks. Now I can't wait for PyImport_ExecCodeModuleExExEx() :) -Barry

Re: [Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

2010-04-09 Thread Paul Moore
On 9 April 2010 23:00, Barry Warsaw ba...@python.org wrote: On Apr 09, 2010, at 02:52 PM, Guido van Rossum wrote: It may be undocumented but it doesn't start with _ and it exists to preserve backwards compatibility. So I recommend adding PyImport_ExecCodeModuleExEx(). Cool, thanks.  Now I

Re: [Python-Dev] PEP 3147, __cached__, and PyImport_ExecCodeModuleEx()

2010-04-09 Thread Guido van Rossum
On Fri, Apr 9, 2010 at 3:54 PM, Paul Moore p.f.mo...@gmail.com wrote: On 9 April 2010 23:00, Barry Warsaw ba...@python.org wrote: On Apr 09, 2010, at 02:52 PM, Guido van Rossum wrote: It may be undocumented but it doesn't start with _ and it exists to preserve backwards compatibility. So I