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

2014-03-22 Thread Antoine Pitrou
On Sun, 23 Mar 2014 01:40:32 +0100 "Martin v. Löwis" wrote: > Am 23.03.14 01:15, schrieb Christian Heimes: > > On 23.03.2014 01:01, Antoine Pitrou wrote: > >> This is a bit limited. There are remotely-exploitable security issues > >> which are still

Re: [Python-Dev] PEP 466 (round 2): Network security enhancements for Python 2.7

2014-03-23 Thread Antoine Pitrou
On Sun, 23 Mar 2014 17:07:24 +1000 Nick Coghlan wrote: > Another more critical example is the lack of SSL hostname matching in the > Python 2 standard library - it is currently necessary to rely on a third > party library, such as ``requests`` or ``backports.ssl_match_hostname`` to > obtain that f

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

2014-03-23 Thread Antoine Pitrou
On Sun, 23 Mar 2014 07:29:07 + Cory Benfield wrote: > On 23 March 2014 at 04:32:17, Terry Reedy > (tjre...@udel.edu(mailto:tjre...@udel.edu)) wrote: > > Instead, I think the PEP should propose a special series of server > > enhancement releases that are based on the final 2.7 maintenance rele

[Python-Dev] OP_NO_COMPRESSION

2014-03-23 Thread Antoine Pitrou
On Sun, 23 Mar 2014 11:37:25 -0400 Donald Stufft wrote: > > I already did open an issue and write a patch :) > > There’s someone on that issue saying that flipping that without a way to flip > it back > would break their application. You're right, I had forgotten about that :-) I'd be surpris

Re: [Python-Dev] cpython: #20145: assert[Raises|Warns]Regex now raise TypeError on bad regex.

2014-03-23 Thread Antoine Pitrou
On Sun, 23 Mar 2014 20:47:28 +0100 (CET) r.david.murray wrote: > http://hg.python.org/cpython/rev/ec556e45641a > changeset: 89936:ec556e45641a > user:R David Murray > date:Sun Mar 23 15:08:43 2014 -0400 > summary: > #20145: assert[Raises|Warns]Regex now raise TypeError on bad

Re: [Python-Dev] cpython: #20145: assert[Raises|Warns]Regex now raise TypeError on bad regex.

2014-03-23 Thread Antoine Pitrou
On Sun, 23 Mar 2014 19:44:42 -0400 "R. David Murray" wrote: > On Sun, 23 Mar 2014 21:43:14 +0100, Antoine Pitrou > wrote: > > On Sun, 23 Mar 2014 20:47:28 +0100 (CET) > > r.david.murray wrote: > > > http://hg.python.org/cpython/rev/ec556e45641a > > &

Re: [Python-Dev] PEP 466 (round 2): Network security enhancements for Python 2.7

2014-03-24 Thread Antoine Pitrou
Le 24/03/2014 10:10, M.-A. Lemburg a écrit : On 23.03.2014 08:07, Nick Coghlan wrote: Open Questions == * What are the risks associated with allowing OpenSSL to be updated to new feature versions in the Windows and Mac OS X binary installers for maintenance releases? Currently

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

2014-03-24 Thread Antoine Pitrou
Le 24/03/2014 15:21, R. David Murray a écrit : In the context of that last sentence, I think it is worth noting the stance that 3.4 is taking[*] about security backward compatibility, since many people may not be aware of it (we only just finished making the documentation clear). If you use cre

Re: [Python-Dev] PEP 466 (round 4): Python 2.7 network security enhancements

2014-03-25 Thread Antoine Pitrou
On Tue, 25 Mar 2014 14:25:29 + Paul Moore wrote: > On 25 March 2014 13:47, Nick Coghlan wrote: > > It's not like we're going to just be giving the PEP to vendors as a spec and > > leaving them to it - it's largely an invitation to participate more directly > > upstream to help resolve a parti

[Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen

2014-03-25 Thread Antoine Pitrou
Hi, On core-mentorship someone asked about PEP 3145 - Asynchronous I/O for subprocess.popen. I answered that asyncio now has subprocess support (including non-blocking I/O on the three standard stream pipes), so it's not obvious anything else is needed. Should we change the PEP's status to Reje

Re: [Python-Dev] PEP 466 (round 4): Python 2.7 network security enhancements

2014-03-25 Thread Antoine Pitrou
On Tue, 25 Mar 2014 23:09:45 +1000 Nick Coghlan wrote: > > Alternative: selectively backport particular APIs > - > > An instinctively minimalist reaction to this proposal is to only backport > particular APIs in the affected modules that are judged

Re: [Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen

2014-03-25 Thread Antoine Pitrou
On Tue, 25 Mar 2014 16:14:04 -0700 Guido van Rossum wrote: > That would be a rather strong unilateral decision. Why don't you ask the > authors? In theory the PEP's proposals could serve in situations where > asyncio isn't appropriate, and asyncio's subprocess I/O isn't the smoothest > API imagina

Re: [Python-Dev] C code: %s vs %U

2014-03-26 Thread Antoine Pitrou
On Tue, 25 Mar 2014 18:43:30 -0700 Ethan Furman wrote: > %s is a string. > > %U is unicode? What is the context? ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.

Re: [Python-Dev] C code: %s vs %U

2014-03-26 Thread Antoine Pitrou
On Wed, 26 Mar 2014 11:48:44 +0100 Antoine Pitrou wrote: > On Tue, 25 Mar 2014 18:43:30 -0700 > Ethan Furman wrote: > > %s is a string. > > > > %U is unicode? > > What is the context? Ok, I suppose it's PyUnicode_Format? :-) (I was initially thinking P

Re: [Python-Dev] collections.sortedtree

2014-03-26 Thread Antoine Pitrou
On Wed, 26 Mar 2014 22:31:56 +0200 Marko Rauhamaa wrote: > > The primary objective of having a balanced tree in the standard library > is to support ordered access in an efficient manner. The typical > applications would include timers (networking), aging (cache) Wouldn't a heapq work as well fo

Re: [Python-Dev] On the necessity of PEPs [was "collections.sortedtree"]

2014-03-26 Thread Antoine Pitrou
On Wed, 26 Mar 2014 17:37:40 -0400 Donald Stufft wrote: > > On Mar 26, 2014, at 5:30 PM, Barry Warsaw wrote: > > > On Mar 26, 2014, at 02:27 PM, Benjamin Peterson wrote: > > > >> I would have said that, too, several years ago, but I think we've been > >> requiring (or using anyway) PEPs for a

Re: [Python-Dev] collections.sortedtree

2014-03-26 Thread Antoine Pitrou
On Wed, 26 Mar 2014 23:41:42 +0200 Marko Rauhamaa wrote: > Antoine Pitrou : > > > Wouldn't a heapq work as well for those two? > > In my experience, networking entities typically start a timer at each > interaction and cancel the pending one. So you have numerous tim

Re: [Python-Dev] collections.sortedtree

2014-03-26 Thread Antoine Pitrou
On Wed, 26 Mar 2014 23:57:27 +0200 Marko Rauhamaa wrote: > Antoine Pitrou : > > > Marko Rauhamaa wrote: > >> In my experience, networking entities typically start a timer at each > >> interaction and cancel the pending one. So you have numerous timers > >>

Re: [Python-Dev] collections.sortedtree

2014-03-26 Thread Antoine Pitrou
On Wed, 26 Mar 2014 18:14:19 -0400 Ben Darnell wrote: > > > > > > If the canceled timer lingers in the heapq till its expiry (in 10 > > > minutes), the size is 100 * 10 * 60 = 60,000. The CPU has to wake up > > > constantly to clear the expired timers. > > > > Ideally, I think you should be able t

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

2014-03-27 Thread Antoine Pitrou
On Tue, 25 Mar 2014 15:37:11 -0700 Ethan Furman wrote: > > ``%a`` will call ``ascii()`` on the interpolated value. This is intended > as a debugging aid, rather than something that should be used in production. > Non-ASCII values will be encoded to either ``\xnn`` or ``\u`` > representation.

Re: [Python-Dev] collections.sortedtree

2014-03-27 Thread Antoine Pitrou
On Thu, 27 Mar 2014 09:25:05 + Kristján Valur Jónsson wrote: > True. > I've long since added a heapdel() to our local fork. > a heappop(idx=0) extension would do the same > I can provide a patch if there is interest. I think either of them would be cool. I don't know it would be approved by R

Re: [Python-Dev] collections.sortedtree

2014-03-27 Thread Antoine Pitrou
On Thu, 27 Mar 2014 08:50:01 -0700 Daniel Stutzbach wrote: > > Due to way the heapq is implemented, it can't provide an efficient API for > removing an arbitrary item. Swapping with the last element allows you to > efficiently remove the item at a particular index, but you first need to > find t

Re: [Python-Dev] cpython: inspect.Signature: Add 'Signature.from_callable' classmethod. Closes #17373

2014-03-27 Thread Antoine Pitrou
On Thu, 27 Mar 2014 17:12:02 +0100 (CET) yury.selivanov wrote: > > +.. classmethod:: Signature.from_callable(obj) > + > + Return a :class:`Signature` (or its subclass) object for a given > callable > + ``obj``. This method simplifies subclassing of :class:`Signature`: > + > +

Re: [Python-Dev] cpython: asyncio.tests: Autodiscover asyncio tests. Patch by Vajrasky Kok. Closes #20668

2014-03-27 Thread Antoine Pitrou
On Thu, 27 Mar 2014 17:22:01 +0100 (CET) yury.selivanov wrote: > http://hg.python.org/cpython/rev/bcc77493249c > changeset: 89995:bcc77493249c > user:Yury Selivanov > date:Thu Mar 27 12:21:20 2014 -0400 > summary: > asyncio.tests: Autodiscover asyncio tests. Patch by Vajrasky

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

2014-03-27 Thread Antoine Pitrou
On Thu, 27 Mar 2014 18:47:59 + Brett Cannon wrote: > 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

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

2014-03-27 Thread Antoine Pitrou
On Thu, 27 Mar 2014 11:57:35 -0700 Ethan Furman wrote: > On 03/27/2014 11:41 AM, 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. :-) > > FWIW, I feel the same, but the need for compatible 2/3 c

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

2014-03-28 Thread Antoine Pitrou
On Thu, 27 Mar 2014 19:09:58 -0700 Ethan Furman wrote: > On 03/27/2014 03:10 PM, Greg Ewing wrote: > > R. David Murray wrote: > >> I've done the 'landmark' thing as well, in the string context; that can be > >> very useful when doing incremental test driven development. (Granted, you > >> could d

Re: [Python-Dev] On the necessity of PEPs [was "collections.sortedtree"]

2014-03-28 Thread Antoine Pitrou
On Thu, 27 Mar 2014 20:32:02 +1000 Nick Coghlan wrote: > > Most of the time when I hear people say "the PEP process is too > difficult", I eventually find that what they really mean is "learning > the kinds of things that python-dev are likely to be worried about, > and ensuring that the PEP adeq

Re: [Python-Dev] Negative timedelta strings

2014-03-28 Thread Antoine Pitrou
On Fri, 28 Mar 2014 11:19:52 -0500 Skip Montanaro wrote: > On Fri, Mar 28, 2014 at 11:07 AM, Alexander Belopolsky > wrote: > >> Is it open to debate or is it now cast in stone? > > > > I think the barrier for changing str() is lower than that for changing > > repr(), but I would be against any ch

Re: [Python-Dev] libpython added to ABI tracker

2014-03-28 Thread Antoine Pitrou
On Fri, 28 Mar 2014 12:31:59 +0400 Andrey Ponomarenko wrote: > Hi, > > The libpython library has been added to the ABI tracker: > http://upstream-tracker.org/versions/python.html > > The page lists library versions and changes in API/ABI. Thanks. Do note that most of these changes are on priva

Re: [Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen

2014-03-28 Thread Antoine Pitrou
On Fri, 28 Mar 2014 16:58:25 -0400 Terry Reedy wrote: > On 3/28/2014 6:20 AM, Victor Stinner wrote: > > > Full example of asynchronous communication with a subprocess (the > > python interactive interpreter) using asyncio high-level API: > > Thank you for writing this. As I explained in response

Re: [Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen

2014-03-29 Thread Antoine Pitrou
On Sat, 29 Mar 2014 04:44:32 -0400 Terry Reedy wrote: > On 3/28/2014 5:12 PM, Antoine Pitrou wrote: > > On Fri, 28 Mar 2014 16:58:25 -0400 > > Terry Reedy wrote: > > >> However, the code below creates a subprocess for one command and one > >> response, w

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

2014-03-29 Thread Antoine Pitrou
On Sat, 29 Mar 2014 11:53:45 -0700 "Gregory P. Smith" wrote: > > I understand that sentiment but that is an unjustified fear. It is not a > good reason not to do it. Projects are already trying to port stuff today > and running into roadblocks when it comes to ascii-compatible bytes > formatting

Re: [Python-Dev] freeze build slave

2014-03-30 Thread Antoine Pitrou
On Sun, 30 Mar 2014 20:44:02 +0200 "Martin v. Löwis" wrote: > I have created a buildbot configuration to test freeze. At the moment, > it has only one builder: > > http://buildbot.python.org/all/waterfall?show=AMD64%20Ubuntu%20LTS%20Freeze%203.x > > which currently fails as freeze doesn't actual

Re: [Python-Dev] cpython (3.4): simplify check, since now there are only new-style classes

2014-04-01 Thread Antoine Pitrou
On Tue, 1 Apr 2014 13:28:53 -0500 Zachary Ware wrote: > > @@ -524,7 +521,7 @@ > > skip = set() > > for klass in default_classes: > > for check in handlers: > > -if isclass(check): > > +if instance(check, type): > > Should be isinstance, should it not? S

Re: [Python-Dev] pickle self-delimiting

2014-04-01 Thread Antoine Pitrou
On Tue, 1 Apr 2014 19:29:38 +0100 Charles-François Natali wrote: > Hi, > > Unless I'm mistaken, pickle's documentation doesn't mention that the pickle > wire-format is self-delimiting. Is there any reason why it's not documented? No reason AFAIK. However, the fact that it is self-delimited is im

Re: [Python-Dev] Pyston: a Python JIT on LLVM

2014-04-04 Thread Antoine Pitrou
Hello, Le 03/04/2014 20:19, Kevin Modzelewski a écrit : I'm excited to announce Pyston, a Python JIT under development at Dropbox, built on top of LLVM. You can read more about it at the introductory blog post

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-07 Thread Antoine Pitrou
Le 07/04/2014 22:38, Victor Stinner a écrit : It would be nice to support A × B too, because it's much more readable. You can configure a keyword to write arbitrary characters. Well, IMHO Python code should be writable without having to "configure your keyboard". Regards Antoine. ___

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Antoine Pitrou
Le 08/04/2014 04:02, Steven D'Aprano a écrit : Many, many more people take part in the CPython core developer culture than just the core developers themselves. Look at the readership of this mailing list, which is open to the public and has regular posters who aren't core developers. In-jokes li

Re: [Python-Dev] death to 2.7; long live 2.7

2014-04-10 Thread Antoine Pitrou
Le 10/04/2014 04:09, Senthil Kumaran a écrit : On Wed, Apr 9, 2014 at 10:02 PM, Benjamin Peterson mailto:benja...@python.org>> wrote: I consider the security enhancement/feature question to be in the domain of PEP 466. If security stuff lands in the 2.7 branch, it will get released

Re: [Python-Dev] Language Summit notes

2014-04-10 Thread Antoine Pitrou
Le 10/04/2014 13:24, Kushal Das a écrit : At this time of discussion Nick pointed us to `http://speed.python.org/ `_, he asked if any of the implementations wants to maintain it. We need more volunteers for that, target is to have a common set of tests to benchmark diff

Re: [Python-Dev] Language Summit notes

2014-04-10 Thread Antoine Pitrou
Le 10/04/2014 20:58, Guido van Rossum a écrit : Huh, I totally missed this (and I just gave Kushal a confused answer when he asked me about it in person). Can someone please post here what the plan is exactly? I don't want to press for a PEP, but I would at least like to understand the plan for

Re: [Python-Dev] Appeal for reviews

2014-04-13 Thread Antoine Pitrou
Le 13/04/2014 03:07, Benjamin Peterson a écrit : On Sat, Apr 12, 2014, at 17:30, Stephen J. Turnbull wrote: I apologize for the tone. I need to go *right* now, and can't fix that. Really, I'm sympathetic and my goal is not just to defend python-dev, but to help you get the reviews your work de

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

2014-04-15 Thread Antoine Pitrou
Le 15/04/2014 09:45, Chris Angelico a écrit : Specific use-case that I can see: Mercurial. In a git vs hg shoot-out, git will usually win on performance, and hg is using Py2; Keep in mind those shoot-outs usually rely on large repositories and/or non-trivial operations, so startup time is not

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

2014-04-15 Thread Antoine Pitrou
Le 15/04/2014 17:42, Daniel Holth a écrit : I find Python's startup time to be very sluggish. I wish it was less than 50 milliseconds (0.05 seconds) including running hg, which is the common threshold for "instant". On my machine 'python -c ""' takes about 0.05 seconds but 'python3 -c ""' takes 0

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

2014-04-15 Thread Antoine Pitrou
Le 14/04/2014 23:51, Brett Cannon a écrit : 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

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

2014-04-15 Thread Antoine Pitrou
Le 15/04/2014 17:34, Skip Montanaro a écrit : This suggests to me that Mercurial's import slowness is mostly in its own code (I counted 104 Python modules and six shared objects in its mercurial package, which isn't going to be affected (much?) by freezing the Python standard modules. Skip is r

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

2014-04-15 Thread Antoine Pitrou
Le 15/04/2014 19:09, Daniel Holth a écrit : In case you were wondering, I'm using Ubuntu's "2.7.5+" and "3.3.2+". My feeling has long been that the speed of getting at the "--help" option or any initial user feedback from Mercurial or git is a big driver in perceived speed as opposed to how long

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

2014-04-16 Thread Antoine Pitrou
On Wed, 16 Apr 2014 09:39:34 +0200 Christian Tismer wrote: > > I think in cases like hg command line scripts there is no need > to import site just for hg scripts. If you don't import site you won't be able to import Mercurial in most cases. Also, talking about "scripts" is a bit silly here - Me

Re: [Python-Dev] cpython (2.7): do not generate pipe names in the temporary dir

2014-04-16 Thread Antoine Pitrou
On Mon, 14 Apr 2014 18:24:44 +0200 (CEST) benjamin.peterson wrote: > http://hg.python.org/cpython/rev/ea677e26dbeb > changeset: 90269:ea677e26dbeb > branch: 2.7 > parent: 90261:c095ff9b0e84 > user:Benjamin Peterson > date:Mon Apr 14 12:24:37 2014 -0400 > summary: > d

Re: [Python-Dev] cpython (2.7): do not generate pipe names in the temporary dir

2014-04-16 Thread Antoine Pitrou
On Wed, 16 Apr 2014 08:40:33 -0700 Benjamin Peterson wrote: > On Wed, Apr 16, 2014, at 7:39, Antoine Pitrou wrote: > > On Mon, 14 Apr 2014 18:24:44 +0200 (CEST) > > benjamin.peterson wrote: > > > http://hg.python.org/cpython/rev/ea677e26dbeb > > > changeset:

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

2014-04-16 Thread Antoine Pitrou
On Wed, 16 Apr 2014 22:33:49 +0200 Christian Tismer wrote: > On 16/04/14 16:35, Antoine Pitrou wrote: > > On Wed, 16 Apr 2014 09:39:34 +0200 > > Christian Tismer wrote: > >> > >> I think in cases like hg command line scripts there is no need > >> to im

Re: [Python-Dev] Language Summit notes

2014-04-16 Thread Antoine Pitrou
Hi Taavi, Thanks for the report! > Disussion about packaging continues. Glyph asks if the PSF could fund a > usability study on installing Python. People generally seem to think > it's a good idea. What does this mean exactly? Under OS X and Linux, Python is typically installed by default. And

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] devguide: Add note about Kushal Das' privs

2014-04-18 Thread Antoine Pitrou
On Mon, 14 Apr 2014 23:18:42 +0200 (CEST) brett.cannon wrote: > http://hg.python.org/devguide/rev/c14c8a195fec > changeset: 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 g

Re: [Python-Dev] Language Summit notes

2014-04-18 Thread Antoine Pitrou
On Fri, 18 Apr 2014 12:04:10 + Kristján Valur Jónsson wrote: > > 2. Feature enhancement to 2.8. Take a robust and popular version of > python and add some of the language goodies that have been added to 3.x and > that don’t have an inherent 3.x aspect. Yield from. New exception mod

Re: [Python-Dev] Software integrators vs end users (was Re: Language Summit notes)

2014-04-19 Thread Antoine Pitrou
On Fri, 18 Apr 2014 11:58:59 -0400 Nick Coghlan wrote: > > Software integrators: > > * Linux distributions and other operating system vendors > * Sumo redistributions (commercial or otherwise) > * "Python based environments" (PTVS, Enthought Canopy, wakari.io, > Python Anywhere, etc) > * Softwar

Re: [Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods

2014-04-19 Thread Antoine Pitrou
On Fri, 18 Apr 2014 22:31:29 -0400 Nick Coghlan wrote: > After spending some time talking to the folks at the PyCon Twisted > sprints, they persuaded me that adding back the iterkeys/values/items > methods for mapping objects would be a nice way to eliminate a key > porting hassle for them (and li

Re: [Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods

2014-04-19 Thread Antoine Pitrou
On Sat, 19 Apr 2014 11:41:35 + Kristján Valur Jónsson wrote: > Wouldn't "iterkeys" simply be an alias for "keys" and so on? The PEP shows the following semantics: def iterkeys(self): return iter(self.keys()) def itervalues(self): return iter(self.values()) def i

Re: [Python-Dev] PEP 466 (round 2): Network security enhancements for Python 2.7

2014-04-19 Thread Antoine Pitrou
On Mon, 24 Mar 2014 10:10:18 +0100 "M.-A. Lemburg" wrote: > > The OpenSSL version used for 2.7.6 is 0.9.8y. > > Upgrading to 1.0.0 or 1.0.1 will likely need a few minor tweaks, but > not cause general breakage - at least that's my experience with > the egenix-pyopenssl distribution. For the rec

Re: [Python-Dev] PEP 469: Restoring the iterkeys/values/items() methods

2014-04-19 Thread Antoine Pitrou
On Sat, 19 Apr 2014 10:44:36 -0400 Nick Coghlan wrote: > > I should be more explicit that the other reason they don't really help is > because most potential single source code dates back further than 2.7, so > it's the iterator based APIs that are needed to avoid code churn when > migrating to s

Re: [Python-Dev] subprocess.Popen and win32

2014-04-20 Thread Antoine Pitrou
On Sat, 19 Apr 2014 19:02:42 -0700 David Aguilar wrote: > > On python3, this still works for normal platforms, but on windows we > can't pass a list of byte strings. We have to pass a list of unicode > strings. Windows native APIs are unicode-based. It is actually necessary to pass *unicode* str

Re: [Python-Dev] Commit-ready patches needing review

2014-04-27 Thread Antoine Pitrou
On Sun, 27 Apr 2014 12:10:46 -0700 Nikolaus Rath wrote: > > * http://bugs.python.org/issue20951 (SSLSocket.send() returns 0 for > non-blocking socket) > > In this case someone just needs to decide if we want to (a) document > the current behavior, (b) deprecate the current behavior or (c)

Re: [Python-Dev] Python 2.7.7. on Windows

2014-04-28 Thread Antoine Pitrou
On Mon, 28 Apr 2014 19:52:48 +1200 Mike Miller wrote: > > I thought this might be a good time to make a final plea to fix a > long-standing security issue in the installer on Windows. By default it > installs Python to the root folder, thereby bypassing filesystem permissions: > > http://bugs.p

Re: [Python-Dev] Multiple inheritance from builtin (C) types [still] supported in Python3?

2014-04-28 Thread Antoine Pitrou
On Mon, 28 Apr 2014 20:45:48 +0300 Paul Sokolovsky wrote: > > So, is that it, or disjoint native types are supported as bases > somehow? Also, would someone know if a class-subclass case happens for > example in stdlib? Well, for instance this trivial example works: >>> class C(list, object): p

Re: [Python-Dev] Multiple inheritance from builtin (C) types [still] supported in Python3?

2014-04-28 Thread Antoine Pitrou
Hi Paul, On Mon, 28 Apr 2014 21:42:02 +0300 Paul Sokolovsky wrote: > > > > Basically, if two classes have compatible layouts, you can inherit > > from both at once. > > How is "compatible layout" defined? Or "layout" for that matter at > all? See Guido's answer. I don't think it's documented

Re: [Python-Dev] Commit-ready patches needing review

2014-04-28 Thread Antoine Pitrou
On Sun, 27 Apr 2014 12:10:46 -0700 Nikolaus Rath wrote: > > * http://bugs.python.org/issue21057 (TextIOWrapper does not support > reading bytearrays or memoryviews) I've reviewed this one. Regards Antoine. ___ Python-Dev mailing list Python-Dev@p

Re: [Python-Dev] pip: cdecimal an externally hosted file and may be unreliable [sic]

2014-05-08 Thread Antoine Pitrou
On Thu, 08 May 2014 10:21:34 -0400 "R. David Murray" wrote: > > > > "unreliable" reads as "not safe", ie: insecure. > > > > You probably want something like "and access to it may be unreliable". > > Actually, thinking about this some more, *most* end-users aren't going > to care that there's an

Re: [Python-Dev] pip: cdecimal an externally hosted file and may be unreliable [sic]

2014-05-09 Thread Antoine Pitrou
On Fri, 9 May 2014 13:47:49 +0100 Paul Moore wrote: > On 9 May 2014 13:25, Donald Stufft wrote: > >> You're claiming that Mercurial moved to hosting on PyPI solely because > >> users suddenly needed to add a flag to install from pip? As opposed to > >> because PyPI gave them a more reliable hosti

Re: [Python-Dev] python process creation overhead

2014-05-10 Thread Antoine Pitrou
Hello, On Sat, 10 May 2014 13:05:54 -0700 Gregory Szorc wrote: > I was investigating speeding up Mercurial's test suite (it runs ~13,000 > Python processes) and I believe I've identified CPython > process/interpreter creation and destruction as sources of significant > overhead and thus a concer

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Antoine Pitrou
On Sat, 10 May 2014 14:35:38 -0700 Raymond Hettinger wrote: > > In the past couple of years, we've grown an unfortunate tendency > to fill the docs with big warning boxes (the subprocess docs are > an example of implicitly communicating that the module is dangerous > and unusable). > > The prefe

Re: [Python-Dev] devguide: Add myself to developer log and as a Windows expert.

2014-05-11 Thread Antoine Pitrou
On Sun, 11 May 2014 06:04:56 +0200 (CEST) steve.dower wrote: > http://hg.python.org/devguide/rev/8d5d1f2c7378 > changeset: 698:8d5d1f2c7378 > user:Steve Dower > date:Sat May 10 21:01:39 2014 -0700 > summary: > Add myself to developer log and as a Windows expert. Welcome onboa

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

2014-05-14 Thread Antoine Pitrou
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 > OSs (e.g. I had never heard of MirOS until the patch for it came in), but I > can't find a PE

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

2014-05-15 Thread Antoine Pitrou
On Thu, 15 May 2014 08:20:03 -0500 Skip Montanaro wrote: > On Wed, May 14, 2014 at 11:05 PM, Guido van Rossum wrote: > > Main problem with rare platform support is not breaking it accidentally, > > since without buildbots we won't know when it's broken. This is why we don't > > make any promises

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

2014-05-15 Thread Antoine Pitrou
On Thu, 15 May 2014 09:40:33 -0500 Skip Montanaro wrote: > On Thu, May 15, 2014 at 9:35 AM, Brett Cannon wrote: > > I view stable buildbots as staying up and testing critical platforms. > > Would "supported" and "unsupported" (or "critical" and "optional"?) > make more sense? "Unstable" suggests

Re: [Python-Dev] Returning None from methods that mutate object state

2014-05-17 Thread Antoine Pitrou
On Sat, 17 May 2014 15:14:00 +1000 Nick Coghlan wrote: > During a conversation today, I realised that the convention of > returning None from methods that change an object's state isn't > captured the Programming Recommendations section of PEP 8. This is more an API design guideline than a progra

Re: [Python-Dev] Language Summit Follow-Up

2014-05-30 Thread Antoine Pitrou
On Wed, 28 May 2014 15:26:38 -0700 Glyph Lefkowitz wrote: > Backport 'yield from' to allow people to use Tulip and Tulip-compatible code, > and to facilitate the development of Tulip-friendly libraries and a Tulip > ecosystem. A robust Tulip ecosystem requires the participation of people who >

Re: [Python-Dev] Should standard library modules optimize for CPython?

2014-06-01 Thread Antoine Pitrou
Le 01/06/2014 10:11, Steven D'Aprano a écrit : My feeling is that the CPython standard library should be written for CPython, that is, it should stick to the current naive implementation of median, and if PyPy wants to speed the function up, they can provide their own version of the module. I sh

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-05 Thread Antoine Pitrou
Le 04/06/2014 02:51, Chris Angelico a écrit : On Wed, Jun 4, 2014 at 3:17 PM, Nick Coghlan wrote: It would. The downsides of a UTF-8 representation would be slower iteration and much slower (O(N)) indexing/slicing. There's no reason for iteration to be slower. Slicing would get O(slice offset

Re: [Python-Dev] asyncio/Tulip: use CPython as the new upstream

2014-06-06 Thread Antoine Pitrou
Le 06/06/2014 07:00, R. David Murray a écrit : I don't have any opinion on the workflow. My understanding is that part of the purpose of the "provisional" designation is to allow faster evolution (read: fixing) of an API before the library becomes non-provisional. Thus I agree with Guido here,

Re: [Python-Dev] namedtuple implementation grumble

2014-06-07 Thread Antoine Pitrou
Le 07/06/2014 09:25, R. David Murray a écrit : On Fri, 06 Jun 2014 19:50:57 +0100, Chris Withers wrote: I've been trying to add support for explicit comparison of namedtuples into testfixtures and hit a problem which lead me to read the source and be sad. Rather than the mixin and class assem

Re: [Python-Dev] namedtuple implementation grumble

2014-06-08 Thread Antoine Pitrou
Le 08/06/2014 18:44, R. David Murray a écrit : For what it is worth, I found the discussion I was remembering: http://bugs.python.org/issue7796 And as someone pointed out down thread, the actual check is "inherits from tuple and has a _fields attribute". That gets you a duck type, which

Re: [Python-Dev] namedtuple implementation grumble

2014-06-09 Thread Antoine Pitrou
Le 09/06/2014 00:05, Raymond Hettinger a écrit : Another issue is that a straight abc wouldn't be sufficient. What we would really want is to check for is: 1) the presence of a _fields tuple (an abc can do this) 2) to check that all of the attribute names specified in _fields are defined (ABCMe

Re: [Python-Dev] Python 3.5 on VC14 - update

2014-06-10 Thread Antoine Pitrou
Le 10/06/2014 12:30, Steve Dower a écrit : I ran a quick test with profile-guided optimization (PGO, pronounced "pogo"), which has supposedly been improved since VC9, and saw a very unscientific 20% speed improvement on pybench.py and 10% size reduction in python35.dll. I'm not sure what we use

Re: [Python-Dev] Why does IOBase.__del__ call .close?

2014-06-10 Thread Antoine Pitrou
Le 10/06/2014 21:30, Nikolaus Rath a écrit : For me, having __del__ call close() does not qualify as a reasonable default implementation unless close() is required to be idempotent (which one could deduce from the documentation if one tries to, but it's far from clear). close() should indeed b

Re: [Python-Dev] Issue #21205: add __qualname__ to generators

2014-06-11 Thread Antoine Pitrou
Le 11/06/2014 10:28, Victor Stinner a écrit : Hi, I'm working on asyncio and it's difficult to debug code because @asyncio.coroutine decorator removes the name of the function if the function is not a generator (if it doesn't use yield from). I propose to add new gi_name and gi_qualname fields

Re: [Python-Dev] Issue 21671: CVE-2014-0224 OpenSSL upgrade to 1.0.1h on Windows required

2014-06-17 Thread Antoine Pitrou
Le 17/06/2014 14:55, M.-A. Lemburg a écrit : Alternatively, you could make use of our pyOpenSSL distribution, which includes pyOpenSSL and the OpenSSL libs (also for Windows): http://www.egenix.com/products/python/pyOpenSSL/ We created this to address the problem of having to update OpenSSL ra

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-07-02 Thread Antoine Pitrou
Is this message some kind of joke or did you just send it to the wrong mailing-list/recipient? On Sun, 1 Jul 2018 20:21:19 -0700 Matt Arcidy wrote: > This cynical view on students is shocking! Everyone on this list has > been a student or a learner for far longer than an educator, and the > p

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-07-02 Thread Antoine Pitrou
On Mon, 2 Jul 2018 10:25:42 +1000 Steven D'Aprano wrote: > > How do people who teach other languages deal with this? > > Assignment expressions are hardly a new-fangled innovation of Python's. > They're used in Java, Javascript, Ruby, Julia, R, PHP and of course > pretty much the entire C fami

Re: [Python-Dev] Examples for PEP 572

2018-07-04 Thread Antoine Pitrou
On Tue, 3 Jul 2018 15:24:09 -0700 Chris Barker via Python-Dev wrote: > > fair enough, but I think we all agree that *many*, if not most, Python > users are "not professional programmers". While on the other hand everyone > involved in discussion on python-dev and python-ideas is a serious (If not

Re: [Python-Dev] Examples for PEP 572

2018-07-04 Thread Antoine Pitrou
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 > the walrus operator can be fixed with a comment of "hard to follow; please > simplify" without t

Re: [Python-Dev] Tone it down on Twitter?

2018-07-04 Thread Antoine Pitrou
I was going to answer that I agree the language there is unwarranted, but then it came to me that the best way to keep things civil is perhaps not to discuss Twitter-emitted opinions back on python-dev. Regards Antoine. On Wed, 4 Jul 2018 17:48:21 +0200 Stefan Krah wrote: > Apparently I have

Re: [Python-Dev] Assignment expression and coding style: the while True case

2018-07-05 Thread Antoine Pitrou
On Thu, 5 Jul 2018 13:58:42 +0300 Ivan Pozdeev via Python-Dev wrote: > On 05.07.2018 9:23, Serhiy Storchaka wrote: > > 05.07.18 01:51, Victor Stinner пише: > >> == Pattern 1, straighforward == > >> > >> while True: > >> line = input.readline() > >> if not line: > >> break > >

Re: [Python-Dev] A "day of silence" on PEP 572?

2018-07-06 Thread Antoine Pitrou
I would gladly welcome a PEP 572-less development mailing-list. Regards Antoine. On Fri, 6 Jul 2018 22:29:47 +0300 Ivan Pozdeev via Python-Dev wrote: > On 06.07.2018 1:40, Guido van Rossum wrote: > > > Thanks you for writing up a proposal. There have been many proposals > > made, including

Re: [Python-Dev] A "day of silence" on PEP 572?

2018-07-06 Thread Antoine Pitrou
will be approved soon. > > Victor > > Le vendredi 6 juillet 2018, Antoine Pitrou a écrit : > > > > I would gladly welcome a PEP 572-less development mailing-list. > > > > Regards > > > > Antoine. > > > > > > On Fri, 6 Jul 2018 22:2

Re: [Python-Dev] PEP 575, 576, 579 and 580

2018-07-07 Thread Antoine Pitrou
On Sun, 8 Jul 2018 00:14:13 +1000 Nick Coghlan wrote: > > > So, let us gather the requirements for a new calling API. > > > Here are my starting suggestions: > > > > 1. The new API should be fully backwards compatible and shouldn't break the > > ABI > > 2. The new API should be used internally

Re: [Python-Dev] PEP 575, 576, 579 and 580

2018-07-07 Thread Antoine Pitrou
On Sat, 7 Jul 2018 16:39:08 +0200 Stefan Behnel wrote: > Nick Coghlan schrieb am 07.07.2018 um 16:14: > > when the new calling > > convention is tied to a protocol that any type can implement (as PEP > > 580 proposes), the concern doesn't even arise. > > Nick, +1 to all of what you said in your

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-09 Thread Antoine Pitrou
On Mon, 9 Jul 2018 09:01:00 -0700 Steve Dower wrote: > On 09Jul2018 0803, Cosimo Lupo wrote: > > If one goes to httWhps://www.python.org/downloads > >  from a Windows browser, the default > > download URL is for the 32-bit installer instead of the 64-bit one. >

Re: [Python-Dev] Encoding variable-length integers/counts in pickle

2018-07-10 Thread Antoine Pitrou
On Tue, 10 Jul 2018 02:53:47 +0100 MRAB wrote: > In the regex module I use an encoding scheme when pickling pattern > objects which is based on the way MIDI encodes variable-length integers, > and I think it might have a use in a pickle protocol. > > In the basic format, an integer is split up

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread Antoine Pitrou
On Tue, 10 Jul 2018 21:59:28 +0900 INADA Naoki wrote: > > Then, the function is called from another C extension like this: > > PyObject_CallFunction(func, "n", 42); > > Currently, we create temporary long object for passing argument. > If there is protocol for exposeing format used by PyArg_Par

<    4   5   6   7   8   9   10   11   12   13   >