Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Eric Snow
On Wed, May 29, 2013 at 2:22 PM, Brett Cannon wrote: > So module_to_init it is unless someone can convince me the bikeshed is > a different colour. Whatever the name is, it should reflect what is happening during the with statement, and more particularly that the thing will end at the end of the

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Eric Snow
On Wed, May 29, 2013 at 10:49 AM, R. David Murray wrote: > Perhaps 'managed_module'? I was just thinking the same thing. -eric ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mai

Re: [Python-Dev] performance testing recommendations in devguide

2013-05-29 Thread Serhiy Storchaka
29.05.13 21:00, Eric Snow написав(ла): Critically sensitive performance subjects * interpreter start-up time * module import overhead * attribute lookup overhead (including MRO traversal) * function call overhead * instance creation overhead * dict performance (the underlying namespace type) * tu

Re: [Python-Dev] performance testing recommendations in devguide

2013-05-29 Thread M.-A. Lemburg
On 29.05.2013 21:19, Antoine Pitrou wrote: > > Hi, > > On Wed, 29 May 2013 21:59:21 +0300 > Carlos Nepomuceno wrote: >> >> [1] "pybench - run the standard Python PyBench benchmark suite. This is >> considered >> an unreliable, unrepresentative benchmark; do not base decisions >> off it. It is i

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Brett Cannon
On Wed, May 29, 2013 at 2:56 PM, R. David Murray wrote: > On Wed, 29 May 2013 20:10:44 +0200, Antoine Pitrou > wrote: >> On Wed, 29 May 2013 12:55:01 -0400 >> Brett Cannon wrote: >> > > Perhaps 'managed_module'? >> > >> > managed_module is better than managed_initialization. >> >> I don't under

Re: [Python-Dev] performance testing recommendations in devguide

2013-05-29 Thread Maciej Fijalkowski
On Wed, May 29, 2013 at 9:19 PM, Antoine Pitrou wrote: > > Hi, > > On Wed, 29 May 2013 21:59:21 +0300 > Carlos Nepomuceno wrote: >> >> [1] "pybench - run the standard Python PyBench benchmark suite. This is >> considered >> an unreliable, unrepresentative benchmark; do not base decisions >> off

Re: [Python-Dev] performance testing recommendations in devguide

2013-05-29 Thread Antoine Pitrou
Hi, On Wed, 29 May 2013 21:59:21 +0300 Carlos Nepomuceno wrote: > > [1] "pybench - run the standard Python PyBench benchmark suite. This is > considered > an unreliable, unrepresentative benchmark; do not base decisions > off it. It is included only for completeness." "unrepresentative" is th

Re: [Python-Dev] performance testing recommendations in devguide

2013-05-29 Thread Antoine Pitrou
Hi, On Wed, 29 May 2013 12:00:44 -0600 Eric Snow wrote: > The devguide doesn't have anything on performance testing that I could > find. See http://bugs.python.org/issue17449 > Tools I'm aware of: > * pybench (relatively limited in real-world usefulness) > * timeit module (for quick comparisio

Re: [Python-Dev] performance testing recommendations in devguide

2013-05-29 Thread Carlos Nepomuceno
> Date: Wed, 29 May 2013 12:00:44 -0600 > From: ericsnowcurren...@gmail.com > To: python-dev@python.org > Subject: [Python-Dev] performance testing recommendations in devguide > > The devguide doesn't have anything on performance testing that I could > find.

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread R. David Murray
On Wed, 29 May 2013 20:10:44 +0200, Antoine Pitrou wrote: > On Wed, 29 May 2013 12:55:01 -0400 > Brett Cannon wrote: > > > Perhaps 'managed_module'? > > > > managed_module is better than managed_initialization. > > I don't understand how it's "managed". "manage", "manager", etc. is the > kind o

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread R. David Murray
On Wed, 29 May 2013 20:10:44 +0200, Antoine Pitrou wrote: > On Wed, 29 May 2013 12:55:01 -0400 > Brett Cannon wrote: > > > Perhaps 'managed_module'? > > > > managed_module is better than managed_initialization. > > I don't understand how it's "managed". "manage", "manager", etc. is the > kind o

Re: [Python-Dev] Bilingual scripts

2013-05-29 Thread Barry Warsaw
On May 29, 2013, at 01:01 PM, Nick Coghlan wrote: >PEP 432 is also related, as it includes the "pysystem" proposal [1] >(an alternate Python CLI that will default to -Es behaviour, but is >otherwise similar to the standard "python" interpreter). I *knew* this was being specified somewhere, but I

Re: [Python-Dev] Bilingual scripts

2013-05-29 Thread Barry Warsaw
On May 28, 2013, at 12:23 PM, Toshio Kuratomi wrote: >> Note that the Gentoo example also takes into account versions that might act >> differently based on the interpreter's implementation. So a -python3 suffix >> may not be enough. Maybe now we're getting into PEP 425 compatibility tag >> terr

Re: [Python-Dev] Bilingual scripts

2013-05-29 Thread Barry Warsaw
On May 28, 2013, at 08:02 PM, Antoine Pitrou wrote: >On Tue, 28 May 2013 13:27:18 -0400 >Barry Warsaw wrote: >> On May 25, 2013, at 09:53 AM, Antoine Pitrou wrote: >> >> >How about always running the version specific targets, e.g. >> >nosetests-2.7? >> >> We have nosetests-2.7 and nosetests3 in

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Antoine Pitrou
On Wed, 29 May 2013 12:55:01 -0400 Brett Cannon wrote: > > Perhaps 'managed_module'? > > managed_module is better than managed_initialization. I don't understand how it's "managed". "manage", "manager", etc. is the kind of dumb words everybody uses when they don't manage (!) to explain what they

[Python-Dev] performance testing recommendations in devguide

2013-05-29 Thread Eric Snow
The devguide doesn't have anything on performance testing that I could find. We do have a number of relatively useful resources in this space though, like pybench and (eventually) speed.python.org. I'd like to add a page to the devguide on performance testing, including an explanation of our perf

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Brett Cannon
On Wed, May 29, 2013 at 12:49 PM, R. David Murray wrote: > On Wed, 29 May 2013 12:25:45 -0400, Brett Cannon wrote: >> In case you want to suggest a name, the context manager returns the >> module that should be initialized/loaded. So typical usage will be:: >> >> class Loader: >> def load_m

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread R. David Murray
On Wed, 29 May 2013 12:25:45 -0400, Brett Cannon wrote: > In case you want to suggest a name, the context manager returns the > module that should be initialized/loaded. So typical usage will be:: > > class Loader: > def load_module(self, fullname): > with importlib.util.module_to_ini

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Brett Cannon
On Wed, May 29, 2013 at 11:58 AM, R. David Murray wrote: > On Thu, 30 May 2013 00:59:02 +1000, Nick Coghlan wrote: >> On Thu, May 30, 2013 at 12:47 AM, Brett Cannon wrote: >> > I am willing to compromise to module_to_initialize, module_to_init, or >> > module_to_load. Pick one. =) >> >> I see th

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Antoine Pitrou
Le Wed, 29 May 2013 11:58:21 -0400, "R. David Murray" a écrit : > On Thu, 30 May 2013 00:59:02 +1000, Nick Coghlan > wrote: > > On Thu, May 30, 2013 at 12:47 AM, Brett Cannon > > wrote: > > > I am willing to compromise to module_to_initialize, > > > module_to_init, or module_to_load. Pick one.

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread R. David Murray
On Thu, 30 May 2013 00:59:02 +1000, Nick Coghlan wrote: > On Thu, May 30, 2013 at 12:47 AM, Brett Cannon wrote: > > I am willing to compromise to module_to_initialize, module_to_init, or > > module_to_load. Pick one. =) > > I see this as *really* similar to a database transaction, and those > st

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Nick Coghlan
On Thu, May 30, 2013 at 12:47 AM, Brett Cannon wrote: > I am willing to compromise to module_to_initialize, module_to_init, or > module_to_load. Pick one. =) I see this as *really* similar to a database transaction, and those start with "session.begin()". Could you tolerate "with begin_module_in

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Brett Cannon
On Wed, May 29, 2013 at 10:34 AM, Nick Coghlan wrote: > On Wed, May 29, 2013 at 11:04 PM, Brett Cannon wrote: >>> with initialise_module(name) as m: >>> # Module initialisation code goes here >>> # Module is rolled back if initialisation fails >> >> But you're not initializing

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Nick Coghlan
On Wed, May 29, 2013 at 11:04 PM, Brett Cannon wrote: >> with initialise_module(name) as m: >> # Module initialisation code goes here >> # Module is rolled back if initialisation fails > > But you're not initializing the module; more like getting the module, either > new or fro

Re: [Python-Dev] decoding setuptools entry point scripts (was: Bilingual scripts)

2013-05-29 Thread R. David Murray
On Tue, 28 May 2013 22:20:33 -0400, Tres Seaver wrote: > > So, my point is that the information on what python code is actually > > being called ought to be in the stub script file, as a comment if > > nothing else, for discoverability reasons. > > > > I'm not bothered enough to work up a patch,

Re: [Python-Dev] Structural cleanups to the main CPython repo

2013-05-29 Thread Nick Coghlan
On Wed, May 29, 2013 at 12:19 PM, Nick Coghlan wrote: > Anway, I'll come up with some specific patches and put them on the > tracker, starting with moving the source files for the binary > executables and making the simpler pythonrun/lifecycle split. I can > look into splitting lifecycle.c into se

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-29 Thread Brett Cannon
On May 29, 2013 1:09 AM, "Nick Coghlan" wrote: > > On Wed, May 29, 2013 at 10:14 AM, Brett Cannon wrote: > >> (FWIW, I think "ModuleManager" is a rather bad name :-) > > > > I'm open to suggestions, but the thing does manage the module so it at > > least makes sense. > > I suggest ModuleInitialis