Re: [Python-Dev] PEP 461 - Adding % and {} formatting to bytes

2014-01-17 Thread Brett Cannon
On Fri, Jan 17, 2014 at 9:50 AM, Eric V. Smith wrote: > On 01/17/2014 07:34 AM, Eric V. Smith wrote: > > On 1/17/2014 6:42 AM, Nick Coghlan wrote: > >> > >> On 17 Jan 2014 18:03, "Eric Snow" >> > wrote: > >>> > >>> On Thu, Jan 16, 2014 at 11:30 AM, Eric V. Smi

Re: [Python-Dev] PEP 461 Final?

2014-01-17 Thread Brett Cannon
On Fri, Jan 17, 2014 at 11:49 AM, Ethan Furman wrote: > Here's the text for your reading pleasure. I'll commit the PEP after I > add some markup. > > Major change: > > - dropped `format` support, just using %-interpolation > > Coming soon: > > - Rationale section ;) > >

Re: [Python-Dev] PEP 461 - Adding % and {} formatting to bytes

2014-01-17 Thread Brett Cannon
On Fri, Jan 17, 2014 at 11:16 AM, Barry Warsaw wrote: > On Jan 17, 2014, at 11:00 AM, Brett Cannon wrote: > > >I would rephrase it to "switch to %-formatting for bytes usage for their > >common code base". > > -1. %-formatting is so neanderthal. :) > Very

Re: [Python-Dev] .clinic.c vs .c.clinic

2014-01-20 Thread Brett Cannon
On Mon, Jan 20, 2014 at 3:05 AM, Larry Hastings wrote: > > On 01/19/2014 08:29 AM, Ethan Furman wrote: > > On 01/19/2014 03:32 AM, Georg Brandl wrote: > > Am 19.01.2014 11:19, schrieb Larry Hastings: > > Not kidding, my best idea so far is "foo.clinic.h.h", > > > Why not always put clinic into it

Re: [Python-Dev] .clinic.c vs .c.clinic

2014-01-20 Thread Brett Cannon
On Mon, Jan 20, 2014 at 10:44 AM, Oleg Broytman wrote: > On Mon, Jan 20, 2014 at 04:07:51PM +0100, Stefan Krah > wrote: > > Bonus points for any other directory name that is > > more self-descriptive. ;) > >Argument Clinic is a PyArg_Parse* preprocessor, AFAIU. Why not call > the directory "

Re: [Python-Dev] .clinic.c vs .c.clinic

2014-01-20 Thread Brett Cannon
On Mon, Jan 20, 2014 at 2:09 PM, Barry Warsaw wrote: > On Jan 20, 2014, at 12:05 AM, Larry Hastings wrote: > > >Contestant 5: "Put in __clinic__ directory, add .h" > > > >foo.c -> __clinic__/foo.c.h > >foo.h -> __clinic__/foo.h.h > > This is cached output right? Yes, it's generated enti

Re: [Python-Dev] Enable Hostname and Certificate Chain Validation

2014-01-22 Thread Brett Cannon
On Wed, Jan 22, 2014 at 3:56 PM, Benjamin Peterson wrote: > > > On Wed, Jan 22, 2014, at 12:25 PM, Nick Coghlan wrote: > > On 23 Jan 2014 00:39, "Benjamin Peterson" wrote: > > > Speaking of requests, I think another way to address this issue would > be > > > import a requests-like APIs into the s

Re: [Python-Dev] Python 3 marketing document?

2014-01-24 Thread Brett Cannon
On Thu, Jan 23, 2014 at 10:48 PM, Dan Stromberg wrote: > Has anyone published a web page or wiki page about what's great about > Python 3.x? > In case you want a video I gave a presentation at PyCon US 2013 on Python 3.3 and tried to cover everything from 3.0 on. http://www.youtube.com/watch?v=

Re: [Python-Dev] lambda (x, y):

2014-01-24 Thread Brett Cannon
On Fri, Jan 24, 2014 at 10:50 AM, Ram Rachum wrote: > I don't like how in Python 3.x, you can't do this: > > lambda (x, y): whatever > > It's quite useful in Python 2 > > if I understand correctly, it's a side effect of such packed arguments not > being allowed in function definitions. (i.e.

Re: [Python-Dev] str.rreplace

2014-01-24 Thread Brett Cannon
On Fri, Jan 24, 2014 at 11:46 AM, Ram Rachum wrote: > You see, Antoine, *you* know that it's better asked on python-ideas > because you know it doesn't exist in Python, therefore it's an idea for an > addition. However, when a person like me asks this question, he does not > know whether it exist

Re: [Python-Dev] str.rreplace

2014-01-24 Thread Brett Cannon
should have gone there first (or to python-list). If you have any doubt as to whether a question should go here or not, then err on the side of caution and post to python-ideas or python-list first. -Brett > > > > On Fri, Jan 24, 2014 at 7:31 PM, Brett Cannon wrote: > >&

Re: [Python-Dev] str.rreplace

2014-01-24 Thread Brett Cannon
rreplace? If not I think it would be useful because ...". The assumption is that if you are asking if something exists then you would like it to exist, in which case you should have a reason for wanting it. -Brett > > > On Fri, Jan 24, 2014 at 7:41 PM, Brett Cannon wrote: > >

Re: [Python-Dev] str.rreplace

2014-01-24 Thread Brett Cannon
On Fri, Jan 24, 2014 at 6:02 PM, Mark Lawrence wrote: > On 24/01/2014 22:56, Brian Curtin wrote: > >> On Fri, Jan 24, 2014 at 4:50 PM, Mark Lawrence >> wrote: >> >>> On 24/01/2014 22:44, Brian Curtin wrote: >>> On Fri, Jan 24, 2014 at 11:40 AM, Mark Lawrence < breamore...@yahoo.co.

Re: [Python-Dev] lambda (x, y):

2014-01-25 Thread Brett Cannon
On Sat, Jan 25, 2014 at 12:41 AM, Greg Ewing wrote: > Brett Cannon wrote: > >> >> On Fri, Jan 24, 2014 at 10:50 AM, Ram Rachum > r...@rachum.com>> wrote: >> >> lambda (x, y): whatever >> >> http://python.org/dev/peps/pep-3113/ >&g

Re: [Python-Dev] Deprecation policy

2014-01-25 Thread Brett Cannon
On Sat, Jan 25, 2014 at 8:29 AM, Ezio Melotti wrote: > Hi, > a couple of years ago I suggested to define and document our > deprecation policy in this thread: > https://mail.python.org/pipermail/python-dev/2011-October/114199.html > I didn't receive many replies and eventually nothing was done. >

Re: [Python-Dev] Python 3.4, marshal dumps slower (version 3 protocol)

2014-01-27 Thread Brett Cannon
On Mon, Jan 27, 2014 at 10:42 AM, Paul Moore wrote: > On 27 January 2014 15:35, Victor Stinner wrote: > > Version 2 is the fastest in Python 3.3 and 3.4, but version 4 with > > Python 3.4 produces the smallest file. > > Which version is used when creating pyc files? This benchmark might > sugges

Re: [Python-Dev] [Python-checkins] cpython: whatsnew: move of reload, update new windows-only ssl functions entry.

2014-02-01 Thread Brett Cannon
atsnew/3.4.rst > @@ -765,6 +765,10 @@ > it will normally be desirable to override the default implementation > for performance reasons. (Contributed by Brett Cannon in :issue:`18072`.) > > +The :func:`~importlib.reload` function has been moved from :mod:`imp` > +to :mod:`im

Re: [Python-Dev] [Python-checkins] cpython: whatsnew: move of reload, update new windows-only ssl functions entry.

2014-02-02 Thread Brett Cannon
On Feb 2, 2014 1:08 PM, "R. David Murray" wrote: > > On Sat, 01 Feb 2014 13:20:48 -0500, Brett Cannon wrote: > > On Sat, Feb 1, 2014 at 12:27 PM, r.david.murray > > wrote: > > > > > http://hg.python.org/cpython/rev/b3f034f5000f > > > chan

Re: [Python-Dev] Guidance regarding what counts as breaking backwards compatibility

2014-02-03 Thread Brett Cannon
On Sat, Feb 1, 2014 at 9:14 PM, Nick Coghlan wrote: > On 2 February 2014 11:06, Steven D'Aprano wrote: > > Hi all, > > > > Over on the Python-ideas list, there's a thread about the new statistics > > module, and as the author of that module, I'm looking for a bit of > > guidance regarding backwa

Re: [Python-Dev] BugFix for "time" native module in Python 2.7

2014-02-03 Thread Brett Cannon
On Mon, Feb 3, 2014 at 2:41 PM, Виктор Щерба wrote: > Hi, guys! > > I have found a bug in module "time" function "sleep" in Python 2.7 under > Windows XP / Server 2003 and lower. > I fix this bug locally. But how could I send you hg patch or pull request > or, maybe, commit to sandbox? > Please

Re: [Python-Dev] test whatever failed

2014-02-04 Thread Brett Cannon
This is a mailing list for the development *of* Python, not *with* Python. The best way to get help would be to email python-l...@python.org or python-h...@python.org. On Tue, Feb 4, 2014 at 10:15 AM, Milani Adelaide wrote: > Dear support, > we tried to install Phyton-3.3.3 but we got some prob

Re: [Python-Dev] The docstring hack for signature information has to go

2014-02-05 Thread Brett Cannon
On Wed, Feb 5, 2014 at 11:04 AM, Georg Brandl wrote: > Am 05.02.2014 14:52, schrieb "Martin v. Löwis": > > Am 03.02.14 15:43, schrieb Larry Hastings: > >> A: We create a PyMethodDefEx structure with an extra field: "const char > >> *signature". We add a new METH_SIGNATURE (maybe just METH_SIG?)

Re: [Python-Dev] python 3 niggle: None < 1 raises TypeError

2014-02-18 Thread Brett Cannon
I'll reply inline, but tl;dr: I'm with Tim on this. On Tue, Feb 18, 2014 at 5:08 AM, M.-A. Lemburg wrote: > On 18.02.2014 05:25, Tim Peters wrote: > > [M.-A. Lemburg] > >> Now, the choice to have None compare less than all other objects > >> may have been arbitrary, but IMO it was a good, consi

Re: [Python-Dev] PEP 463: Exception-catching expressions

2014-02-21 Thread Brett Cannon
On Fri, Feb 21, 2014 at 8:52 AM, Antoine Pitrou wrote: > On Fri, 21 Feb 2014 14:15:59 +1100 > Chris Angelico wrote: > > > > A number of functions and methods have parameters which will cause > > them to return a specified value instead of raising an exception. The > > current system is ad-hoc a

Re: [Python-Dev] PEP 463: Exception-catching expressions

2014-02-21 Thread Brett Cannon
On Fri, Feb 21, 2014 at 9:49 AM, Eli Bendersky wrote: > On Fri, Feb 21, 2014 at 6:46 AM, Nick Coghlan wrote: > >> On 22 February 2014 00:37, Eli Bendersky wrote: >> > This goes against anything I understand about how exceptions should and >> > should not be used. >> >> I think you're thinking o

Re: [Python-Dev] PEP 463: Exception-catching expressions

2014-02-22 Thread Brett Cannon
On Fri, Feb 21, 2014 at 8:41 PM, Greg Ewing wrote: > Ethan Furman wrote: > >> On 02/21/2014 03:29 PM, Greg Ewing wrote: >> >> value = lst[2] except "No value" if IndexError >>> >> >> It does read nicely, and is fine for the single, non-nested, case (which >> is probably the vast majority), bu

Re: [Python-Dev] PEP 463: Exception-catching expressions

2014-02-22 Thread Brett Cannon
On Sat, Feb 22, 2014 at 4:13 AM, Antoine Pitrou wrote: > On Fri, 21 Feb 2014 09:37:29 -0800 > Guido van Rossum wrote: > > I'm put off by the ':' syntax myself (it looks to me as if someone > forgot a > > newline somewhere) but 'then' feels even weirder (it's been hard-coded in > > my brain as me

Re: [Python-Dev] GSoC 2014 - Email Module

2014-02-26 Thread Brett Cannon
On Wed, Feb 26, 2014 at 4:46 AM, Surya wrote: > > > > On Wed, Feb 26, 2014 at 8:16 AM, Terry Reedy wrote: > >> On 2/25/2014 8:56 PM, Surya wrote: >> >>> Hey there, >>> >>> I am Surya, studying final year of Engineering. I have looked into Core >>> Python's ideas list and got interested in Email

Re: [Python-Dev] Start writing inlines rather than macros?

2014-02-27 Thread Brett Cannon
On Thu, Feb 27, 2014 at 5:47 AM, Victor Stinner wrote: > Hi, > > 2014-02-27 11:22 GMT+01:00 Kristján Valur Jónsson : > > Now, Larry Hastings pointed out that we support C89 which doesn’t support > > Inlines. Rather than suggesting here that we update that compatibility > > requirement, > > In pra

Re: [Python-Dev] Start writing inlines rather than macros?

2014-02-27 Thread Brett Cannon
On Thu, Feb 27, 2014 at 12:22 PM, Sturla Molden wrote: > Brett Cannon wrote: > > > The Visual Studio team has publicly stated they will never support C99, > > so dropping C89 blindly is going to alienate a big part of our user base > > unless we switch to C++ instead.

Re: [Python-Dev] Removing doc from pythonhosted.org

2014-03-02 Thread Brett Cannon
Best place for PyPI-related things is distutils-...@python.org. But for bug reports related to PyPI, file them at https://bitbucket.org/pypa/pypi/issues(it's actually linked off of PyPI). On Sat, Mar 1, 2014 at 1:30 PM, Giampaolo Rodola' wrote: > I'm not sure whether this is the right mailing li

Re: [Python-Dev] Cherry-pick between Python 3.4 RC2 and final?

2014-03-04 Thread Brett Cannon
On Tue, Mar 4, 2014 at 8:33 AM, Antoine Pitrou wrote: > On Tue, 04 Mar 2014 11:16:41 +0100 > mar...@v.loewis.de wrote: > > > > Quoting Nick Coghlan : > > > > > If you don't want to do an rc3 despite the cherry picked changes since > > > rc2, then you need to make it easy for people to test the ch

Re: [Python-Dev] Python 3.4 change in importlib/__init__.py breaking cxFreeze?

2014-03-10 Thread Brett Cannon
On Mon Mar 10 2014 at 11:41:27 AM, Jurko Gospodnetić < jurko.gospodne...@pke.hr> wrote: >Hi Nick. > > On 10.3.2014. 14:25, Nick Coghlan wrote:> What is supposed to happen > when that code gets loaded from a ZIP archive? > > > > __file__ is expected to always be set (including when loaded fro

Re: [Python-Dev] Python 4: don't remove anything, don't break backward compatibility

2014-03-10 Thread Brett Cannon
On Mon Mar 10 2014 at 11:50:54 AM, Victor Stinner wrote: > 2014-03-10 16:25 GMT+01:00 Stefan Richthofer : > > I don't see the point in this discussion. > > As far as I know, the major version is INTENDED to > > indicate backward-incompatible changes. > > This is not a strict rule. I would like to

Re: [Python-Dev] Python 4: don't remove anything, don't break backward compatibility

2014-03-10 Thread Brett Cannon
On Mon Mar 10 2014 at 12:08:55 PM, Victor Stinner wrote: > >> I suggest to wait less than 8 years > >> for Python 4. > > > > Why? What's special about 8 years? > > It's the time between Python 2.0 and 3.0. > But I'm willing to bet that's going to be an anomaly. Python 3 came into existence when

Re: [Python-Dev] Python 4: don't remove anything, don't break backward compatibility

2014-03-10 Thread Brett Cannon
On Mon Mar 10 2014 at 12:47:21 PM, Chris Barker wrote: > On Mon, Mar 10, 2014 at 8:04 AM, Steven D'Aprano wrote: > > >> If Python 4 is a conservative release, I don't see any reason to bump >> the major version number until after Python 3.9. > > > and why even then? > > >> Perhaps we need a long-

Re: [Python-Dev] PEP 463: Exception-catching expressions

2014-03-12 Thread Brett Cannon
On Tue Mar 11 2014 at 11:59:23 PM, Chris Angelico wrote: > On Wed, Mar 12, 2014 at 2:20 PM, Ethan Furman wrote: > > I sure hope this is accepted. I could have used it at least a half-dozen > > times in the last week -- which is more often than I would have used the > > ternary-if! :) > > Where

Re: [Python-Dev] Requesting pronouncement on PEP 463: Exception-catching expressions

2014-03-12 Thread Brett Cannon
On Wed, Mar 12, 2014 at 12:10 AM, Chris Angelico wrote: > PEP 463, Exception-catching expressions, is stable and I believe ready > for pronouncement. Drumroll please... > > http://www.python.org/dev/peps/pep-0463/ > > PEP: 463 > Title: Exception-catching expressions > Version: $Revision$ > Last-M

Re: [Python-Dev] Requesting pronouncement on PEP 463: Exception-catching expressions

2014-03-12 Thread Brett Cannon
On Wed, Mar 12, 2014 at 11:16 AM, Chris Angelico wrote: > On Thu, Mar 13, 2014 at 2:14 AM, Brett Cannon wrote: > > While I'm +0 on the idea, I'm -1 on the syntax; I just don't like having > a > > colon in an expression. > > Which is why there are alterna

Re: [Python-Dev] Any non-3.4.0 docs in "default"?

2014-03-13 Thread Brett Cannon
On Thu, Mar 13, 2014 at 11:16 AM, Larry Hastings wrote: > > > I'm strongly considering literally copying over all the content in Doc/ > from the default branch to the 3.4 branch. Not cherry-picking doc changes, > simply copying everything en masse. I have two questions for the core devs. > > 1)

Re: [Python-Dev] getattr vs hashattr

2014-03-17 Thread Brett Cannon
On Fri, Mar 14, 2014 at 3:01 PM, Chris Withers wrote: > On 03/12/2014 04:49 PM, Chris Angelico wrote: >> >>> You can use hasattr() in place of AttributeError >>> >> > Is that true now? It used to be that hasattr swallowed all exceptions > rather than just AttributeError making is a very dangerous

Re: [Python-Dev] [python-committers] default hg.python.org/cpython is now 3.5

2014-03-17 Thread Brett Cannon
On Mon, Mar 17, 2014 at 4:51 AM, Victor Stinner wrote: > Until when should we fix bugs in the branch 3.3? Branches 3.1 and 3.2 only > accept security fixes, right? > Typically we do one last release before shutting the last bugfix branch down, but that's Georg's call since 3.3.5 was released so r

Re: [Python-Dev] Issues about relative& absolute import way for Porting from python2.4 to python2.7

2014-03-19 Thread Brett Cannon
This mailing list is for the development *of* Python, the the *use* of Python. Your best option for getting an answer is to ask on python-list or python-help. On Tue, Mar 18, 2014 at 9:50 PM, 北冰洋 wrote: > Dear, > > I just wrote a sample like this: > testPy/ > __init__.py > cli

[Python-Dev] Making proxy types easier to write and maintain

2014-03-19 Thread Brett Cannon
On Wed Mar 19 2014 at 2:46:48 PM, Antoine Pitrou wrote: > > Hello, > > It is known to be cumbersome to write a proxy type that will correctly > proxy all special methods (this has to be done manually on the type, > since special methods are not looked up on the instance: a __getattr__ > method wo

Re: [Python-Dev] PEP 466: Proposed policy change for handling network security enhancements

2014-03-22 Thread Brett Cannon
On Sat Mar 22 2014 at 8:55:36 PM, Nick Coghlan wrote: > On 23 March 2014 10:08, Antoine Pitrou wrote: > > On Sat, 22 Mar 2014 23:54:37 +0100 > > Thomas Wouters wrote: > >> > >> Or not rely on the standard library for their security. Much as I > realize > >> it is necessary for rudimentary SSL s

Re: [Python-Dev] PEP 466: Proposed policy change for handling network security enhancements

2014-03-25 Thread Brett Cannon
On Tue Mar 25 2014 at 4:21:51 AM, Georg Brandl wrote: > Am 25.03.2014 08:51, schrieb Nick Coghlan: > > >> I think that calling it Python 2.8 would be a bad idea for the reasons > >> that have already been stated. > >> > >> Perhaps it should just be called Python 2.7 Enhanced Security ("Python > >

[Python-Dev] PEP 466 (round 5): selected network security enhancements for Python 2.7

2014-03-26 Thread Brett Cannon
On Wed Mar 26 2014 at 8:02:08 AM, Nick Coghlan wrote: > Guido and Antoine persuaded me that selective backports would be a > better idea for the network security enhancements than the wholesale > module backports previously suggested, while Alex and Donald provided > the necessary additional deta

Re: [Python-Dev] PEP 466: Proposed policy change for handling network security enhancements

2014-03-26 Thread Brett Cannon
On Wed Mar 26 2014 at 2:15:39 AM, Georg Brandl wrote: > Am 26.03.2014 00:06, schrieb Nick Coghlan: > > > > On 26 Mar 2014 08:32, "Georg Brandl" > <mailto:g.bra...@gmx.net>> wrote: > >> > >> Am 25.03.2014 23:15, schrieb Nick Cog

[Python-Dev] multiprocessing BaseManager's "serializer" argument

2014-03-27 Thread Brett Cannon
Creating the bug is the best bet as then the reason can be discussed there. If there are no objections then you can create a patch to make sure it's tested and documented. On Thu Mar 27 2014 at 12:20:00 PM, Yuriy Taraday wrote: > Hello. > > Is there any reason BaseManager's "serializer" argument

Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

2014-03-27 Thread Brett Cannon
On Thu Mar 27 2014 at 2:42:40 PM, Guido van Rossum wrote: > Much better, but I'm still not happy with including %s at all. Otherwise > it's accept-worthy. (How's that for pressure. :-) > But if we only add %b and leave out %s then how is this going to lead to Python 2/3 compatible code since %b

Re: [Python-Dev] Python 4?

2014-04-03 Thread Brett Cannon
On Thu, Apr 3, 2014 at 9:51 AM, Skip Montanaro wrote: > I saw mention recently of Python 4 and assumed all such references > were either April Fool's jokes or pie-in-the-sky dreams for a new > version of Python which may never arrive. > It's the latter. Some of us have been tossing around "Pytho

Re: [Python-Dev] [Python-checkins] cpython: fix #21076: turn signal module constants into enums

2014-04-04 Thread Brett Cannon
This broke compilation on at least OS X, but I'm willing to bet for all UNIX-based systems. I have a fix in the works. On Fri, Apr 4, 2014 at 9:34 AM, giampaolo.rodola wrote: > http://hg.python.org/cpython/rev/c9239171e429 > changeset: 90128:c9239171e429 > user:Giampaolo Rodola' > da

Re: [Python-Dev] [Python-checkins] cpython: fix #21076: turn signal module constants into enums

2014-04-04 Thread Brett Cannon
On Fri, Apr 4, 2014 at 10:12 AM, Brett Cannon wrote: > This broke compilation on at least OS X, but I'm willing to bet for all > UNIX-based systems. I have a fix in the works. > Fix is in rev c6e63bb132fb <http://hg.python.org/cpython/rev/c6e63bb132fb>. > > > O

Re: [Python-Dev] [Python-checkins] cpython: fix #21076: turn signal module constants into enums

2014-04-04 Thread Brett Cannon
On Fri Apr 04 2014 at 10:34:06 AM, Victor Stinner wrote: > 2014-04-04 16:21 GMT+02:00 Brett Cannon : > > Fix is in rev c6e63bb132fb. > > Hum, this one was not enough for me. I also modified Modules/ > Setup.config.in: > Wasn't for me either in the end as it failed w

[Python-Dev] issue with itertools leads the crash

2014-04-08 Thread Brett Cannon
Please a file a bug at bugs.python.org, otherwise this is most likely going to get lost track of. On Tue Apr 08 2014 at 11:30:15 AM, Kirill wrote: > issue with itertools leads the crash > > The following code leads to system failure and crash on Ubuntu 12.04.3 > with Python 2.7.6. > > import

Re: [Python-Dev] Receiving email updates for the bug tracker

2014-04-11 Thread Brett Cannon
On Fri, Apr 11, 2014 at 1:47 PM, Antony Lee wrote: > Hi, > Sorry for the slightly off-topic(?) question but I would like to know how > to receive email notifications for activity on bugs I've opened on the > bugs.python.org -- so far I don't receive anything even though I'm on the > nosy list. >

Re: [Python-Dev] Receiving email updates for the bug tracker

2014-04-11 Thread Brett Cannon
On Fri, Apr 11, 2014 at 3:25 PM, Antony Lee wrote: > Nope, the email is correct... > Then you can try reporting a bug at http://psf.upfronthosting.co.za/roundup/meta/ > > 2014-04-11 12:12 GMT-07:00 Brett Cannon : > > >> >> >> On Fri, Apr 11, 2014 at

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

2014-04-14 Thread Brett Cannon
It was realized during PyCon that since we are freezing importlib we could now consider freezing all the modules to cut out having to stat or read them from disk. So for day 1 of the sprints I I decided to hack up a proof-of-concept to see what kind of performance gain it would get. Freezing every

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

2014-04-14 Thread Brett Cannon
On Mon, Apr 14, 2014 at 6:15 PM, Skip Montanaro wrote: > On Mon, Apr 14, 2014 at 4:51 PM, Brett Cannon wrote: > > Thoughts? > > Interesting idea, but YAGNI? > Not at all. Think of every script you execute that's written in Python. One of the things the Mercurial fol

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

2014-04-14 Thread Brett Cannon
On Mon, Apr 14, 2014 at 6:07 PM, Glenn Linderman wrote: > On 4/14/2014 2:51 PM, Brett Cannon wrote: > > consider freezing all the modules > > ... > > Now the question is whether the maintenance cost of having to rebuild > Python for a select number of stdlib modules &g

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

2014-04-15 Thread Brett Cannon
On Tue, Apr 15, 2014 at 11:19 AM, Daniel Holth wrote: > IIRC it is no longer the case that ZIP imports (involving only one > file for a lot of modules) are much faster than regular FS imports? > It's definitely minimized since Python 3.3 and the caching of stat results at the directory level for

[Python-Dev] Timing breakdown of Py_InitializeEx_Private()

2014-04-15 Thread Brett Cannon
To finish my timing work I decided to see where Py_InitializeEx_Private() spends its time. The following is a breakdown measured in microseconds running using -E: INIT: setlocale: 11 envvar: 2 random init: 2 interp creation: 15 thread creation: 6 GIL: 10 _Py_ReadyTypes(): 930 more types: 44 builti

Re: [Python-Dev] Timing breakdown of Py_InitializeEx_Private()

2014-04-15 Thread Brett Cannon
he diff can be found at https://gist.github.com/brettcannon/9cd3960dd067bb7a45bd . -Brett > > > On Tue, Apr 15, 2014 at 2:26 PM, Brett Cannon wrote: > >> To finish my timing work I decided to see where Py_InitializeEx_Private() >> spends its time. The following is a

Re: [Python-Dev] Timing breakdown of Py_InitializeEx_Private()

2014-04-16 Thread Brett Cannon
On Apr 16, 2014 3:47 AM, "Christian Heimes" wrote: > > On 16.04.2014 04:35, Guido van Rossum wrote: > > Well, that's the part that does "import site". Anything that speeds up > > the code in Lib/site.py might help. :-) > > Antoine, Victor and me have implemented a couple of speed ups for > "import

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

2014-04-17 Thread Brett Cannon
> >>> sys.modules['idlelib.os'] > > >>> sys.modules['idlelib.tokenize'__] > > >>> sys.modules['idlelib.io <http://idlelib.io>'] > > >>> > > On 4/16/2014 3:10 PM, Dr. Brett Ca

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 en

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

2014-04-17 Thread Brett Cannon
slower Avg: 0.312374 -> 0.921807: 2.95x slower Significant (t=-797.79) Stddev: 0.00372 -> 0.00667: 1.7956x larger -Brett On Mon Apr 14 2014 at 5:51:23 PM, Brett Cannon wrote: > It was realized during PyCon that since we are freezing importlib we could > now consider freezing all the m

[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

[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 ./p

[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 1

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

2014-04-17 Thread Brett Cannon
n the status quo of reading from files. IOW it looks like speeding up startup from an import perspective requires either freezing modules -- for about a 10% boost -- or some fundamental change in import that no one has thought of yet. -Brett > > > On Thu, Apr 17, 2014 at 11:47 AM, Brett

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-

Re: [Python-Dev] devguide: Add note about Kushal Das' privs

2014-04-18 Thread Brett Cannon
geset: 686:c14c8a195fec > > > user:Brett Cannon > > > date:Mon Apr 14 17:18:37 2014 -0400 > > > summary: > > > Add note about Kushal Das' privs > > > > I have no objection to Kushal getting commit rights, but is there a > >

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

2014-04-23 Thread Brett Cannon
On Fri Apr 18 2014 at 5:03:33 PM, Ezio Melotti wrote: > Hi, > > On Thu, Apr 17, 2014 at 9:09 PM, Brett Cannon wrote: > > > > > > On Thu Apr 17 2014 at 1:34:23 PM, Jurko Gospodnetić > > wrote: > >> > >>Hi. > >> > >> On 14.

[Python-Dev] Import java classes from python

2014-04-24 Thread Brett Cannon
On Thu Apr 24 2014 at 1:10:39 PM, babu wrote: > Hi, I am new to python. I have a requirement to import java class from > python. Is there any possibility to import java class from python. > This list is for the development *of* Python, not the *use* of Python. But to quickly answer your questio

[Python-Dev] API and process questions (sparked by Claudiu Popa on 16104

2014-04-28 Thread Brett Cannon
On Mon Apr 28 2014 at 11:32:58 AM, Jim J. Jewett wrote: > (1) Should fixes to a docstring go in with a patch, even if they > aren't related to the changing functionality? > It should probably be its own commit. > > Bytestring compilation has several orthogonal parameters. Most -- but > not a

Re: [Python-Dev] Python-Dev Digest, Vol 129, Issue 81

2014-04-28 Thread Brett Cannon
On Mon Apr 28 2014 at 4:58:35 PM, Mike Miller wrote: > Hi, note the pep, it makes allowances for security enhancements. > The PEP in question is about fixing fundamentally broken security issues in Python 2.7 (e.g. updating OpenSSL). Tweaking where Python is installed by default on Windows is no

[Python-Dev] EuroPython CPython Sprint?

2014-05-08 Thread Brett Cannon
On Thu May 08 2014 at 10:25:44 AM, Stéphane Wirtel wrote: > Hi all, > > What do you think about a CPython sprint at EuroPython 2014? > Great, although I think that answer would be considered obvious since there is no real negative to holding sprints. =) Are you indirectly asking if anyone plans

[Python-Dev] Where is our official policy of what platforms we do support?

2014-05-14 Thread Brett Cannon
Over the past week or so there have been 2 patches to add support for various UNIX OSs. Now I thought we had stopped trying to add new esoteric OSs (e.g. I had never heard of MirOS until the patch for it came in), but I can't find a PEP that spells out what it takes to get a platform supported ( ht

Re: [Python-Dev] Where is our official policy of what platforms we do support?

2014-05-14 Thread Brett Cannon
On Wed May 14 2014 at 10:43:18 AM, Antoine Pitrou wrote: > On Wed, 14 May 2014 14:20:26 + > Brett Cannon wrote: > > Over the past week or so there have been 2 patches to add support for > > various UNIX OSs. Now I thought we had stopped trying to add new esoteric > &g

Re: [Python-Dev] Where is our official policy of what platforms we do support?

2014-05-14 Thread Brett Cannon
quot; as part of the list > > of requisites. > > > > js > > -><- > > > > On 14 May 2014 11:20, Brett Cannon wrote: > > > Over the past week or so there have been 2 patches to add support for > > > various UNIX OSs. Now I thought we had stoppe

Re: [Python-Dev] Where is our official policy of what platforms we do support?

2014-05-14 Thread Brett Cannon
On Wed May 14 2014 at 11:33:27 AM, Matthias Klose wrote: > Am 14.05.2014 17:08, schrieb Brett Cannon: > > On Wed May 14 2014 at 11:02:50 AM, R. David Murray < > rdmur...@bitdance.com> > > wrote: > > > >> On Wed, 14 May 2014 11:31:15 -0300, "Joao S. O

Re: [Python-Dev] Where is our official policy of what platforms we do support?

2014-05-15 Thread Brett Cannon
On Thu May 15 2014 at 10:24:45 AM, Skip Montanaro wrote: > On Thu, May 15, 2014 at 8:26 AM, Antoine Pitrou > wrote: > > We already have such buildbots, they are in the "unstable" category. > > You can browse through existing buildbots here: > > https://www.python.org/dev/buildbot/ > > I can't se

[Python-Dev] Update to PEP 11 to clarify garnering platform support

2014-05-16 Thread Brett Cannon
t Wed May 14 11:18:22 2014 -0400* *+++ b/pep-0011.txt Fri May 16 13:48:30 2014 -0400* @@ -2,22 +2,21 @@ Title: Removing support for little used platforms Version: $Revision$ Last-Modified: $Date$ -Author: mar...@v.loewis.de (Martin von Löwis) +Author: Martin von Löwis , + Brett C

[Python-Dev] [Python-checkins] Daily reference leaks (8391f99208f6): sum=181

2014-05-29 Thread Brett Cannon
I think the memory leak was caused by http://hg.python.org/cpython/rev/7d20e30bd540 because http://hg.python.org/cpython/file/0eedac3d0b0a/Python/import.c#l903 sets the 'res' variable and then overwrites it unconditionally w/o PY_DECREF beforehand. On Thu May 29 2014 at 4:02:17 AM, wrote: > resu

[Python-Dev] Language Summit Follow-Up

2014-05-29 Thread Brett Cannon
On Wed May 28 2014 at 10:14:39 PM, Glyph Lefkowitz wrote: > At the language summit, Alex and I volunteered to put together some > recommendations on what changes could be made to Python (the language) in > order to facilitate a smoother transition from Python 2 to Python 3. One > of the things t

Re: [Python-Dev] [Python-checkins] cpython: Issue #20383: Introduce importlib.util.module_from_spec().

2014-05-30 Thread Brett Cannon
On Fri May 30 2014 at 3:39:47 PM, Eric Snow wrote: > On Fri, May 30, 2014 at 12:55 PM, brett.cannon > wrote: > > http://hg.python.org/cpython/rev/b26d021081d2 > > changeset: 90915:b26d021081d2 > > parent: 90913:69011f6ce573 > > user:Brett Cannon >

Re: [Python-Dev] use cases for "python-config" versus "pkg-config python"

2014-06-02 Thread Brett Cannon
Patches sent to python-dev are typically ignored. Could you open an issue on bugs.python.org and upload it there? On Mon Jun 02 2014 at 2:20:43 PM, Michael Haubenwallner < michael.haubenwall...@ssi-schaefer.com> wrote: > Hi, > > following up myself with a patch proposal: > > On 05/28/2014 04:51 P

[Python-Dev] Division of tool labour in porting Python 2 code to 2/3

2014-06-06 Thread Brett Cannon
After Glyph and Alex's email about their asks for assisting in writing Python 2/3 code, it got me thinking about where in the toolchain various warnings and such should go in order to help direct energy to help develop whatever future toolchain to assist in porting. There seems to be three places

Re: [Python-Dev] Division of tool labour in porting Python 2 code to 2/3

2014-06-06 Thread Brett Cannon
On Fri Jun 06 2014 at 2:29:13 PM, Terry Reedy wrote: > On 6/6/2014 12:37 PM, Brett Cannon wrote: > > After Glyph and Alex's email about their asks for assisting in writing > > Python 2/3 code, it got me thinking about where in the toolchain various > > warnings and

Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler

2014-06-06 Thread Brett Cannon
On Fri Jun 06 2014 at 2:59:24 PM, wrote: > On Fri, Jun 06, 2014 at 10:49:24PM +0400, Brian Curtin wrote: > > > None of the options are particularly good, but yes, I think that's an > > option we have to consider. We're supporting 2.7.x for 6 more years on > > a compiler that is already 6 years ol

Re: [Python-Dev] Division of tool labour in porting Python 2 code to 2/3

2014-06-07 Thread Brett Cannon
On Sat Jun 07 2014 at 9:11:54 AM, Claudiu Popa wrote: > On Fri, Jun 6, 2014 at 7:37 PM, Brett Cannon wrote: > > After Glyph and Alex's email about their asks for assisting in writing > > Python 2/3 code, it got me thinking about where in the toolchain various > > warn

[Python-Dev] cpython and python debugger documentation

2014-06-09 Thread Brett Cannon
On Sat Jun 07 2014 at 5:55:29 PM, Le Pa wrote: > Hi, > > I am interested in learning how the cpython interpreter is designed and > implemented, > and also how the python debugger works internally. My ultimate purpose is > to > modify > them for my distributed computing needs. Are there any docume

[Python-Dev] Help with the build system and my first patch

2014-06-09 Thread Brett Cannon
On Mon Jun 09 2014 at 2:07:22 AM, Steven Stewart-Gallus < sstewartgallu...@mylangara.bc.ca> wrote: > Hello, > > I would like some help understanding the build system. I am currently > working on an issue (http://bugs.python.org/issue21627) and plan to > create some common functionality in Python/s

Re: [Python-Dev] Help with the build system and my first patch

2014-06-09 Thread Brett Cannon
On Mon Jun 09 2014 at 1:48:27 PM, Steven Stewart-Gallus < sstewartgallu...@mylangara.bc.ca> wrote: > > Do you mean other than potentially detecting something in the > > configurescript and using an #ifdef guard? > > Yes, that works on a static function inside a file level but I need to > condition

Re: [Python-Dev] We now have C code coverage!

2018-06-29 Thread Brett Cannon
On Thu, Jun 28, 2018, 21:28 Terry Reedy, wrote: > On 6/24/2018 5:03 AM, Ammar Askar wrote: > >> Is it possible, given that we are not paying for those reports, to > >> customize the 'exclude_lines' definitions? > > > > Do you want to exclude python code or C code? > > Python code. > > > For Pytho

Re: [Python-Dev] Examples for PEP 572

2018-07-04 Thread Brett Cannon
On Tue, Jul 3, 2018, 22:27 Tim Peters, wrote: > [INADA Naoki] > > ... > > On the other hand, I understand PEP 572 allows clever code > > simplifies tedious code. It may increase readability of non-dirty > code. > > The latter is the entire intent ,of course. We can't force people to > write rea

Re: [Python-Dev] Failing tests (on a Linux distro)

2018-07-06 Thread Brett Cannon
On Fri, 6 Jul 2018 at 11:02 Serhiy Storchaka wrote: > 04.07.18 15:05, Nick Coghlan пише: > > So my guess would be that this is a test suite error where we're not > > handling the "running in a reproducible build environment with > > SOURCE_DATE_EPOCH already set" case. > > Should SOURCE_DATE_EPOC

Re: [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

2018-07-06 Thread Brett Cannon
On Fri, 6 Jul 2018 at 08:52 Chris Barker - NOAA Federal via Python-Dev < python-dev@python.org> wrote: > Are we just having fun here? > > Or might we actually start using a new naming convention for > the-syntax-formerly-known-as-generator-expressions? > If you can create a groundswell of support

Re: [Python-Dev] Examples for PEP 572

2018-07-06 Thread Brett Cannon
On Wed, 4 Jul 2018 at 07:42 Antoine Pitrou wrote: > On Wed, 4 Jul 2018 09:43:04 -0300 > Brett Cannon wrote: > > > > I think this is a very key point that the "this is bad" crowd is > > overlooking. Even if this syntax turns out to not be that useful, abusing &g

<    2   3   4   5   6   7   8   9   10   11   >