Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/17/2014 06:06 PM, Brett Cannon wrote: > On Thu Apr 17 2014 at 5:21:14 PM, "Martin v. Löwis" > wrote: > >> Am 17.04.14 20:47, schrieb Brett Cannon: >>> Because people keep bringing it up, below is the results of >>> hacking up the interpreter to

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Brett Cannon
On Thu Apr 17 2014 at 5:21:14 PM, "Martin v. Löwis" wrote: > Am 17.04.14 20:47, schrieb Brett Cannon: > > Because people keep bringing it up, below is the results of hacking up > > the interpreter to include a sys.path entry for ./python35.zip instead > > of hard-coding to /usr/lib/python35.zip a

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Martin v. Löwis
Am 17.04.14 20:47, schrieb Brett Cannon: > Because people keep bringing it up, below is the results of hacking up > the interpreter to include a sys.path entry for ./python35.zip instead > of hard-coding to /usr/lib/python35.zip and simply zipped up Lib/ > recursively. TL;DR, zipimport performance

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Martin v. Löwis
Am 17.04.14 20:47, schrieb Brett Cannon: > Because people keep bringing it up, below is the results of hacking up > the interpreter to include a sys.path entry for ./python35.zip instead > of hard-coding to /usr/lib/python35.zip and simply zipped up Lib/ > recursively. TL;DR, zipimport performance

Re: [Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable

2014-04-17 Thread Leandro Pereira de Lima e Silva
This looks like an issue to be addressed at PEP-8 since it looks like a styling issue. I haven't seen any other recommendations there on how to use a certain data structure, though. Cheers, Leandro Em 17/04/2014 16:24, "Guido van Rossum" escreveu: > It's definitely something that should be put

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Guido van Rossum
On Thu, Apr 17, 2014 at 1:31 PM, Brett Cannon wrote: > > On Thu Apr 17 2014 at 3:21:49 PM, Guido van Rossum > wrote: > >> I'm sorry to keep asking dumb questions, but your description didn't job >> my understanding of what you are comparing here. What is slower than what? >> > > Startup where t

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Brett Cannon
On Thu Apr 17 2014 at 3:21:49 PM, Guido van Rossum wrote: > I'm sorry to keep asking dumb questions, but your description didn't job > my understanding of what you are comparing here. What is slower than what? > Startup where the stdlib is entirely in a zip file is slower than the status quo of

Re: [Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable

2014-04-17 Thread Guido van Rossum
No, I don't think it belongs in the style guide. It is not about code formatting or naming, it is about data structure design and API design. On Thu, Apr 17, 2014 at 12:49 PM, Leandro Pereira de Lima e Silva < leandro...@cpti.cetuc.puc-rio.br> wrote: > This looks like an issue to be addressed at

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Donald Stufft
On Apr 17, 2014, at 2:23 PM, Jurko Gospodnetić wrote: > Hi. > > On 17.4.2014. 19:57, Guido van Rossum wrote: >> On Thu, Apr 17, 2014 at 10:33 AM, Jurko Gospodnetić >> mailto:jurko.gospodne...@pke.hr>> wrote: >> >> I would really love to have better startup times in production, >> >> Wh

Re: [Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable

2014-04-17 Thread Guido van Rossum
It's definitely something that should be put in some documentation, probably at the point when people have learned enough to be designing their own programs where this issue comes up -- before they're wizards but well after they have learned the semantic differences between lists and tuples. On T

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Guido van Rossum
I'm sorry to keep asking dumb questions, but your description didn't job my understanding of what you are comparing here. What is slower than what? On Thu, Apr 17, 2014 at 11:47 AM, Brett Cannon wrote: > Because people keep bringing it up, below is the results of hacking up the > interpreter to

[Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Brett Cannon
On Thu Apr 17 2014 at 3:10:46 PM, Brett Cannon wrote: > Actually ignore this data, I think I may have messed something up. I'll > reply after I check something > Unfortunately my check says the data is accurate, so zip startup is really just slow. -Brett > > On Thu Apr 17 2014 at 2:47:52 PM,

[Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Brett Cannon
Actually ignore this data, I think I may have messed something up. I'll reply after I check something On Thu Apr 17 2014 at 2:47:52 PM, Brett Cannon wrote: > Because people keep bringing it up, below is the results of hacking up the > interpreter to include a sys.path entry for ./python35.zip in

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Jurko Gospodnetić
Hi. On 17.4.2014. 19:57, Guido van Rossum wrote: On Thu, Apr 17, 2014 at 10:33 AM, Jurko Gospodnetić mailto:jurko.gospodne...@pke.hr>> wrote: I would really love to have better startup times in production, What's your use case? I understand why startup time is important for Hg, but I'

[Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable

2014-04-17 Thread Brett Cannon
On Thu Apr 17 2014 at 2:43:35 PM, Leandro Pereira de Lima e Silva < leandro...@cpti.cetuc.puc-rio.br> wrote: > Hello there! > > I've stumbled upon this discussion on python-dev about what the choice > between using a list or a tuple is all about in 2003: > 1. https://mail.python.org/pipermail/pyth

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Giampaolo Rodola'
On Thu, Apr 17, 2014 at 8:17 PM, Antoine Pitrou wrote: > On Thu, 17 Apr 2014 18:09:22 + > Brett Cannon wrote: > > > > > >I would really love to have better startup times in production, but > I > > > would also really hate to lose the ability to hack around in stdlib > > > sources during

[Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Brett Cannon
Because people keep bringing it up, below is the results of hacking up the interpreter to include a sys.path entry for ./python35.zip instead of hard-coding to /usr/lib/python35.zip and simply zipped up Lib/ recursively. TL;DR, zipimport performance no longer measures up (probably because of stat c

[Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable

2014-04-17 Thread Leandro Pereira de Lima e Silva
Hello there! I've stumbled upon this discussion on python-dev about what the choice between using a list or a tuple is all about in 2003: 1. https://mail.python.org/pipermail/python-dev/2003-March/033962.html 2. https://mail.python.org/pipermail/python-dev/2003-March/034029.html There's a vague c

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Ethan Furman
On 04/17/2014 10:33 AM, Jurko Gospodnetić wrote: In general, what I really like about using Python for software development is the ability to open any stdlib file and easily go poking around using stuff like 'import pdb;pdb.set_trace()' or simple print statements. +1 -- ~Ethan~ _

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Jurko Gospodnetić
Hi. On 17.4.2014. 20:15, Mark Young wrote: I think he meant modifying the source files themselves for debugging purposes (e.g. putting print statements in itertools.py). Exactly! :-) Best regards, Jurko Gospodnetić ___ Python-Dev mailing

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Guido van Rossum
I still do that! On Thu, Apr 17, 2014 at 11:17 AM, Antoine Pitrou wrote: > On Thu, 17 Apr 2014 18:09:22 + > Brett Cannon wrote: > > > > > >I would really love to have better startup times in production, but > I > > > would also really hate to lose the ability to hack around in stdlib >

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Antoine Pitrou
On Thu, 17 Apr 2014 18:09:22 + Brett Cannon wrote: > > > >I would really love to have better startup times in production, but I > > would also really hate to lose the ability to hack around in stdlib > > sources during development just to get better startup performance. > > > >In gener

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Mark Young
I think he meant modifying the source files themselves for debugging purposes (e.g. putting print statements in itertools.py). 2014-04-17 14:09 GMT-04:00 Brett Cannon : > > > On Thu Apr 17 2014 at 1:34:23 PM, Jurko Gospodnetić < > jurko.gospodne...@pke.hr> wrote: > >>Hi. >> >> On 14.4.2014.

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Brett Cannon
On Thu Apr 17 2014 at 1:34:23 PM, Jurko Gospodnetić < jurko.gospodne...@pke.hr> wrote: >Hi. > > On 14.4.2014. 23:51, Brett Cannon wrote: > > Now the question is whether the maintenance cost of having to rebuild > > Python for a select number of stdlib modules is enough to warrant > > putting i

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Guido van Rossum
On Thu, Apr 17, 2014 at 10:33 AM, Jurko Gospodnetić < jurko.gospodne...@pke.hr> wrote: > I would really love to have better startup times in production, What's your use case? I understand why startup time is important for Hg, but I'd like to understand what other situations occur frequently en

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Jurko Gospodnetić
Hi. On 14.4.2014. 23:51, Brett Cannon wrote: Now the question is whether the maintenance cost of having to rebuild Python for a select number of stdlib modules is enough to warrant putting in the effort to make this work. I would really love to have better startup times in production, but

Re: [Python-Dev] [Python-checkins] cpython (merge 3.4 -> default): Merge 3.4

2014-04-17 Thread Benjamin Peterson
On Thu, Apr 17, 2014, at 8:55, matthias.klose wrote: > http://hg.python.org/cpython/rev/1d1aefd00f07 > changeset: 90382:1d1aefd00f07 > parent: 90380:517de1983677 > parent: 90381:1a00e04a233d > user:d...@ubuntu.com > date:Thu Apr 17 17:55:03 2014 +0200 > summary: > Merg

Re: [Python-Dev] is the concept of 'reference ownership' no long applicable in Python 3.4?

2014-04-17 Thread Mark Dickinson
On Thu, Apr 17, 2014 at 5:33 PM, Mark Dickinson wrote: > This looks like a doc build issue: when I build the documentation locally > for the default branch, I still see the expected "Return value: New > reference." lines. > Opened http://bugs.python.org/issue21286 for this issue. -- Mark _

Re: [Python-Dev] is the concept of 'reference ownership' no long applicable in Python 3.4?

2014-04-17 Thread Mark Dickinson
On Thu, Apr 17, 2014 at 4:34 PM, Jianfeng Mao wrote: > I noticed the following changes in the C API manuals from 3.3.5 (and > earlier versions) to 3.4. I don’t know if these changes are deliberate and > imply that we C extension developers no longer need to care about > ‘reference ownership’ beca

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-17 Thread Nathaniel Smith
On Wed, Apr 16, 2014 at 12:51 PM, Julian Taylor wrote: > Hi, > In NumPy what we want is the tracing, not the exchangeable allocators. > I don't think it is a good idea for the core of a whole stack of > C-extension based modules to replace the default allocator or allowing > other modules to repla

Re: [Python-Dev] [numpy wishlist] PyMem_*Calloc

2014-04-17 Thread Nathaniel Smith
On Wed, Apr 16, 2014 at 7:35 PM, Victor Stinner wrote: > Hi, > > 2014-04-16 7:51 GMT-04:00 Julian Taylor : >> In NumPy what we want is the tracing, not the exchangeable allocators. > > Did you read the PEP 445? Using the new malloc API, in fact you can > have both: install new allocators and set u

Re: [Python-Dev] Language Summit notes

2014-04-17 Thread Mark Dickinson
On Wed, Apr 16, 2014 at 11:26 PM, Antoine Pitrou wrote: > What does this mean exactly? Under OS X and Linux, Python is typically > installed by default. Under OS X, at least, I think there are valid reasons to not want to use the system-supplied Python. On my up-to-date OS X 10.9.2 machine, I s

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-17 Thread Brett Cannon
On Wed Apr 16 2014 at 4:53:25 PM, Terry Reedy wrote: > > On Wednesday, April 16, 2014 2:57:35 PM, Terry Reedy > > wrote: > > > PS. In the user process sys.modules, there are numerous null > > entries like these: > > >>> sys.modules['idlelib.os'] > >

[Python-Dev] is the concept of 'reference ownership' no long applicable in Python 3.4?

2014-04-17 Thread Jianfeng Mao
Hi, I noticed the following changes in the C API manuals from 3.3.5 (and earlier versions) to 3.4. I don't know if these changes are deliberate and imply that we C extension developers no longer need to care about 'reference ownership' because of some improvements in 3.4. Could anyone clarify i

Re: [Python-Dev] Language Summit notes

2014-04-17 Thread R. David Murray
On Thu, 17 Apr 2014 01:23:13 -0400, Terry Reedy wrote: > On 4/16/2014 6:26 PM, Antoine Pitrou wrote: > > >> AP exams are starting to allow Python, but it's 10% of the AP CS exams. > > > > "AP"? > > (I thought that was me, but it sounds unlikely :-)) > > AP = Advanced Placement. US and Canadian h