Re: [Python-Dev] converting the stdlib to str.format

2008-06-04 Thread Antoine
> Antoine Pitrou wrote: >> >> Not to mention that e.g. "%r" % s is much simpler than "{0!r}".format(s) >> (if I got the format spec right). > > repr(s) is even simpler :) Yes, of course, but in the non-trivial case, e.g. "value=%r" %

Re: [Python-Dev] bytearray and array.array are not thread-safe

2008-07-07 Thread Antoine
ite a patch either. Perhaps in one or two weeks, but it would be better if someone beats me to it. Regards Antoine. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

Re: [Python-Dev] buildbots

2008-07-08 Thread Antoine
ne is donated by someone else). What I could be interested in is to provide a buildbot for Python itself, but I don't know if that's needed right now. Especially for such a common platform as a x86 Debian. Regards Antoine. ___ Python-Dev

[Python-Dev] Re: string formatting and i18n

2005-09-05 Thread Antoine
ure out the type by itself and use the right method; you would only specify the type when you want to have a different formatting (for example, for floats, you could use "%g2" instead of "%2" which would be equivalent to "%f2") Regards Antoine. --

Re: [Python-Dev] Pythonic concurrency - cooperative MT

2005-10-01 Thread Antoine
r, two callbacks: one for success and one for failure. Twisted is architected around an event loop, which calls your code back when a registered event happens (for example when an operation is finished, or when some data arrives on the wire). Compared to generators, it is a different

Re: [Python-Dev] Python 2.7 patch levels turning two digit

2014-06-23 Thread Antoine Pitrou
em to be available: http://www.microsoft.com/en-us/download/details.aspx?id=13276 What am I missing? Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Fix Unicode-disabled build of Python 2.7

2014-06-24 Thread Antoine Pitrou
Le 24/06/2014 07:04, Skip Montanaro a écrit : I can't see any reason to make a backwards-incompatible change to Python 2 to only support Unicode. You're bound to break somebody's setup. Apparently, that setup would already have been broken for years. R

Re: [Python-Dev] Fix Unicode-disabled build of Python 2.7

2014-06-26 Thread Antoine Pitrou
f a hassle for no actual, practical benefit. People who want a threadless unicodeless Python can install Python 1.5.2 for all I care. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/

Re: [Python-Dev] Network Security Backport Status

2014-07-01 Thread Antoine Pitrou
atter *will* require some manual coding to adapt to 2.7's different SSLSocket implementation, not just applying patch hunks around. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pytho

Re: [Python-Dev] Memory BIO for _ssl

2014-07-06 Thread Antoine Pitrou
I find confusing is the r(ead)bio / w(rite)bio terminology (because you actually read and write from both). Perhaps incoming and outgoing would be clearer. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.o

Re: [Python-Dev] buildbot.python.org down again?

2014-07-07 Thread Antoine Pitrou
Le 07/07/2014 13:22, Guido van Rossum a écrit : It's a reference to Neil Stephenson's Anathem. According to Google, it doesn't look like he played the trombone, though. Regards Antoine. On Jul 7, 2014 8:55 AM, "Benjamin Peterson" mailto:[email protected]>

Re: [Python-Dev] == on object tests identity in 3.x

2014-07-09 Thread Antoine Pitrou
Le 09/07/2014 00:21, Stephen J. Turnbull a écrit : Steven D'Aprano writes: > I don't think so. Floating point == represents *numeric* equality, There is no such thing as floating point == in Python. You can apply == to two floating point numbers, but == (at the language level) handles any tw

Re: [Python-Dev] cStringIO vs io.BytesIO

2014-07-16 Thread Antoine Pitrou
Hi, Le 16/07/2014 19:07, [email protected] a écrit : Attached is a (rough) patch implementing this, feel free to try it with hg tip. Thanks for your work. Please post any patch to http://bugs.python.org Regards Antoine. ___ Python-Dev

Re: [Python-Dev] Remaining decisions on PEP 471 -- os.scandir()

2014-07-20 Thread Antoine Pitrou
) + stat()? Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Remaining decisions on PEP 471 -- os.scandir()

2014-07-20 Thread Antoine Pitrou
? Quite a bit, although that should be dampened in recent 3.x versions, thanks to the caching of directory contents. Even though there is tangible performance improvement from scandir(), it would be useful to find out if the API fits well. R

Re: [Python-Dev] [PEP466] SSLSockets, and sockets, _socketobjects oh my!

2014-07-22 Thread Antoine Pitrou
that's what "leak" means here :-) As for 2.x, I don't see why you couldn't just continue using a strong reference. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listin

Re: [Python-Dev] [PEP466] SSLSockets, and sockets, _socketobjects oh my!

2014-07-22 Thread Antoine Pitrou
Le 22/07/2014 17:44, Nick Coghlan a écrit : > > As for 2.x, I don't see why you couldn't just continue using a strong reference. As Antoine says, if the cycle already exists in Python 2 (and it sounds like it does), we can just skip backporting the weak reference change.

Re: [Python-Dev] PEP 471 "scandir" accepted

2014-07-22 Thread Antoine Pitrou
Le 21/07/2014 18:26, Victor Stinner a écrit : I'm happy because the final API is very close to os.path functions and pathlib.Path methods. Python stays consistent, which is a great power of this language! By the way, http://bugs.python.org/issue19767 could benefit too. Regards An

Re: [Python-Dev] [PEP466] SSLSockets, and sockets, _socketobjects oh my!

2014-07-23 Thread Antoine Pitrou
Le 23/07/2014 15:36, Alex Gaynor a écrit : That said, I've hit another issue, with SNI callbacks. The first argument to an SNI callback is the socket. The callback is set up by some C code, which right now has access to only the _socket.socket object, not the ssl.SSLSocket object, which is what

Re: [Python-Dev] cpython: Issue #22003: When initialized from a bytes object, io.BytesIO() now

2014-07-30 Thread Antoine Pitrou
Le 30/07/2014 02:11, Serhiy Storchaka a écrit : 30.07.14 06:59, Serhiy Storchaka написав(ла): 30.07.14 02:45, antoine.pitrou написав(ла): http://hg.python.org/cpython/rev/79a5fbe2c78f changeset: 91935:79a5fbe2c78f parent: 91933:fbd104359ef8 user:Antoine Pitrou date:Tue

Re: [Python-Dev] cpython: Issue #22003: When initialized from a bytes object, io.BytesIO() now

2014-07-30 Thread Antoine Pitrou
Le 30/07/2014 15:48, Serhiy Storchaka a écrit : Ignoring tests and comments my patch adds/removes/modifies about 200 lines, and David's patch -- about 150 lines of code. But it's __sizeof__ looks not correct, correcting it requires changing about 50 lines. In sum the complexity of both patches i

Re: [Python-Dev] Surely "nullable" is a reasonable name?

2014-08-04 Thread Antoine Pitrou
clarity to the situation. That's a rather good point, and I agree with Stephen here. Even core contributors can deserve clarity and the occasional non-confusing notation :-) Regards Antoine. ___ Python-Dev mailing list [email protected]

Re: [Python-Dev] Surely "nullable" is a reasonable name?

2014-08-04 Thread Antoine Pitrou
C side when I pass in None. If the receiving type is PyObject*, either NULL or Py_None is a valid choice. But here the receiving type can be an int. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/lis

Re: [Python-Dev] Surely "nullable" is a reasonable name?

2014-08-04 Thread Antoine Pitrou
Le 04/08/2014 14:18, Larry Hastings a écrit : On 08/05/2014 03:53 AM, Antoine Pitrou wrote: Le 04/08/2014 13:36, Alexander Belopolsky a écrit : If the receiving type is PyObject*, either NULL or Py_None is a valid choice. But here the receiving type can be an int. Just to be precise: in

Re: [Python-Dev] pathlib handling of trailing slash (Issue #21039)

2014-08-06 Thread Antoine Pitrou
u want to act on the link target rather than the link itself: >>> pathlib.Path('foo/').resolve().lstat() os.stat_result(st_mode=17407, st_ino=917505, st_dev=2050, st_nlink=7, st_uid=0, st_gid=0, st_size=4096, st_atime=1407367916, st_mtime=1407369857, st_ctime=1407369857) Am

Re: [Python-Dev] pathlib handling of trailing slash (Issue #21039)

2014-08-06 Thread Antoine Pitrou
Le 06/08/2014 20:50, Alexander Belopolsky a écrit : On Wed, Aug 6, 2014 at 8:11 PM, Antoine Pitrou mailto:[email protected]>> wrote: Am I overlooking other cases? There are many interfaces where trailing slash is significant. For example, rsync uses trailing slash on the target dir

Re: [Python-Dev] pathlib handling of trailing slash (Issue #21039)

2014-08-06 Thread Antoine Pitrou
uot;a directory", "a non-existing file", etc.) Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] sum(...) limitation

2014-08-08 Thread Antoine Pitrou
minable because many people (including you) love feeding interminable arguments. No need to blame Python for that. And for that matter, this interminable discussion should probably have taken place on python-ideas or even python-list. Regards Antoine. ___

Re: [Python-Dev] os.walk() is going to be *fast* with scandir

2014-08-09 Thread Antoine Pitrou
to make it especially faster than listdir / walk. Note that benchmark results can vary a lot, depending on operating system, file system, hard drive type, and the OS's caching state. Anyway, os.walk() can be FIFTY times as fast using os.scandir(). Very nice results, thank you :-) R

Re: [Python-Dev] PEP 467: Minor API improvements for bytes & bytearray

2014-08-17 Thread Antoine Pitrou
array() is sufficiently specialized that only experienced people will encounter it. And while preallocating a bytearray of a certain size makes sense, it's completely pointless for a bytes object. Regards Antoine. ___ Python-Dev mailing list

Re: [Python-Dev] PEP 467: Minor API improvements for bytes & bytearray

2014-08-17 Thread Antoine Pitrou
byte`` and ``bytearray.byte`` alternative constructors * Add ``bytes.iterbytes``, ``bytearray.iterbytes`` and ``memoryview.iterbytes`` alternative iterators +0.5. "iterbytes" isn't really great as a name. Regards Antoine. ___ Python-De

Re: [Python-Dev] PEP 467: Minor API improvements for bytes & bytearray

2014-08-17 Thread Antoine Pitrou
obviously the right way to do it in this case, but we're concerned about the non-constant case. The reason to instantiate bytes from non-constant integer comes from the unfortunate indexing and iteration behaviour of bytes objects. Regards Antoine.

Re: [Python-Dev] Fwd: PEP 467: Minor API improvements for bytes & bytearray

2014-08-17 Thread Antoine Pitrou
for i in data.bytes: # iterate over data as bytes > > But whatever. I just wish there was something better than iterbytes. There's actually another aspect to your idea, independent of the naming: exposing a view rather than just an iterator. So that view woul

Re: [Python-Dev] PEP 4000 to explicitly declare we won't be doing a Py3k style compatibility break again?

2014-08-18 Thread Antoine Pitrou
Numpy's "not-a-time", slightly tweaked). Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Bytes path support

2014-08-19 Thread Antoine Pitrou
ough, so I don't think we should create new low-level APIs that don't support bytes. Fair enough. I don't quite understand, though -- why is the "official policy" to kill something that's "essential" on *nix? PEP 383

Re: [Python-Dev] Bytes path support

2014-08-20 Thread Antoine Pitrou
nt low-level features (such as unconverted bytes paths under POSIX), it is reasonable to point you to low-level APIs. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: h

Re: [Python-Dev] Bytes path support

2014-08-21 Thread Antoine Pitrou
that it or anything else be ASCII compatible. Of course there is. Try to split an UTF-16-encoded file path on the byte 47 and you'll get a lot of garbage. So, yes, POSIX implicitly mandates an ASCII-compatible encoding for file paths. Regards Antoine. _

Re: [Python-Dev] Bytes path support

2014-08-21 Thread Antoine Pitrou
rant. Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Bytes path related questions for Guido

2014-08-24 Thread Antoine Pitrou
ing with surrogates produced by undecodable byte sequences. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-08-29 Thread Antoine Pitrou
and Python manually calls SSL_get_verify_result() after a handshake; if there was a verification error, a warning is printed out And in the following version we switch the HTTP default to CERT_REQUIRED. Regards Antoine. ___ Python-Dev mailing list

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-08-29 Thread Antoine Pitrou
don't have a predefined hostname or IP address. (I have encountered some of those) Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mai

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-08-29 Thread Antoine Pitrou
lows us to write a better test for that method. Patch welcome! Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-08-30 Thread Antoine Pitrou
be served with the SSL_CERT_DIR and SSL_CERT_FILE env vars (or, better, by specific settings *inside* the application). I'm against multiplying environment variables, as it makes it more difficult to assess the actual security of a setting. The danger of an ill-secure setting is much more

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-08-30 Thread Antoine Pitrou
e severe than with hash randomization. > > You have a point there. So how about just a python run-time switch > and no env var ? Well, why not, but does it have a value over letting the code properly configure their SSLContext? Regards Antoine. __

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-08-30 Thread Antoine Pitrou
rl > style command line options, I like the idea of providing recipes in the > docs for implementing them at the application layer, but postponing making > the *default* behaviour configurable that way. I'm against any additional environment variable

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-08-31 Thread Antoine Pitrou
ere is no way to whitelist it: you have to disable certificate checking altogether. This can be exposed by the application as configuration option if necessary, as well. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-08-31 Thread Antoine Pitrou
x27;s responsibility more than Python's. What would Python do? Provide a setting that would blindly add a cert for all uses of httplib? pip knows about the use cases here, Python doesn't. (perhaps you want to serve your local index using http, though) Regards Antoine.

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-08-31 Thread Antoine Pitrou
Le 31/08/2014 21:12, Paul Moore a écrit : On 31 August 2014 19:37, Antoine Pitrou wrote: Well, it's certainly pip's responsibility more than Python's. What would Python do? Provide a setting that would blindly add a cert for all uses of httplib? That's more or less my poi

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-08-31 Thread Antoine Pitrou
may mean you're better off > with a third party library like requests or Twisted. No, you simply have to select the proper validation settings. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailma

Re: [Python-Dev] RFC: PEP 475, Retry system calls failing with EINTR

2014-08-31 Thread Antoine Pitrou
implementation-dependent), but it's near impossible to protect regular Python code against such asynchronous exceptions. Which is why you should switch to a wakeup fd scheme as mentioned by Victor, if you want to rely on signals at all. Regards Antoine. _

Re: [Python-Dev] PEP 477: selected ensurepip backports for Python 2.7

2014-08-31 Thread Antoine Pitrou
e 2.7 feature set. If you add pip to a bugfix version, then you have bugfix versions which are more featureful than others, which makes things more complicated to explain. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mai

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-01 Thread Antoine Pitrou
userspace directories, so aside from the > "current directory" problem, shadowing "ssl" itself can be tricky to > arrange. Not sure why. Just put another module named "ssl" in sys.modules directly. You can also monkeypatch the genuine ssl module. Reg

Re: [Python-Dev] RFC: PEP 475, Retry system calls failing with EINTR

2014-09-01 Thread Antoine Pitrou
on the fact that system calls are interrupted with ``InterruptedError`` will hang. The authors of this PEP don't think that such application exist. If such applications exist, they are not portable and are subject to race conditions (deadlock if the signal comes before the system call).&q

Re: [Python-Dev] RFC: PEP 475, Retry system calls failing with EINTR

2014-09-01 Thread Antoine Pitrou
Unix, the ``asyncio`` module uses the wakeup file descriptor to > wake up its event loop. How about Windows? Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-01 Thread Antoine Pitrou
On Mon, 1 Sep 2014 23:24:39 +1000 Chris Angelico wrote: > On Mon, Sep 1, 2014 at 10:41 PM, Antoine Pitrou wrote: > > Not sure why. Just put another module named "ssl" in sys.modules directly. > > You can also monkeypatch the genuine ssl module. > > That has to

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-01 Thread Antoine Pitrou
On Mon, 1 Sep 2014 23:42:10 +1000 Chris Angelico wrote: > On Mon, Sep 1, 2014 at 11:34 PM, Antoine Pitrou wrote: > > On Mon, 1 Sep 2014 23:24:39 +1000 > > Chris Angelico wrote: > >> On Mon, Sep 1, 2014 at 10:41 PM, Antoine Pitrou wrote: > >> > Not sure why

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-01 Thread Antoine Pitrou
On Tue, 2 Sep 2014 00:53:11 +1000 Nick Coghlan wrote: > On 2 Sep 2014 00:08, "Antoine Pitrou" wrote: > > > > On Mon, 1 Sep 2014 23:42:10 +1000 > > Chris Angelico wrote: > > > >> > > > >> That has to be done inside the same process

Re: [Python-Dev] RFC: PEP 475, Retry system calls failing with EINTR

2014-09-01 Thread Antoine Pitrou
, and the main thread is blocked in *another* system call ;-) Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Daily reference leaks (640c575ab3e1): sum=151940

2014-09-01 Thread Antoine Pitrou
ks, sum=3 > test_site leaked [0, 0, 2] references, sum=2 > test_site leaked [0, 0, 2] memory blocks, sum=2 > > > Command line was: ['./python', '-m', 'test.regrtest', '-uall', '-R', > '3:3:/home/antoine/cpython/refleaks/reflogH

Re: [Python-Dev] RFC: PEP 475, Retry system calls failing with EINTR

2014-09-02 Thread Antoine Pitrou
an exception and catch the exception at the top-level. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-02 Thread Antoine Pitrou
For example, if you have an expired cert, all you can do AFAIK is to disable verification. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-02 Thread Antoine Pitrou
ure, except your Python version. Oh, I agree that whoever upgrades their Python version should be able to fix any of their applications should they start failing. That's why I don't want to let new command-line options and environment variables proliferate in the name of damage control. Rega

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-02 Thread Antoine Pitrou
.) > > > > As we keep saying, this is not a break in backwards compatibility, it's a bug > fix. Keeping saying it doesn't make it magically true. Besides, it can perfectly well be a bug fix *as well as* a break in backwards compatibility. Which is why we sometimes c

Re: [Python-Dev] Sad status of Python 3.x buildbots

2014-09-02 Thread Antoine Pitrou
;t know what the upgrade expectations are on OS X, but I'm sure Python runs well on 5-yeard old Windows, Linuces and perhaps even FreeBSDs. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/lis

Re: [Python-Dev] Sad status of Python 3.x buildbots

2014-09-02 Thread Antoine Pitrou
hine is really a depressing answer to get, as far as I'm concerned) And, we also need some people to look after the master configuration and status - yes, that would have been me, but I've not been very motivated recently :-) Regards Antoine. _

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-03 Thread Antoine Pitrou
requests, > Twisted or Python 3.5+ to get HTTPS done right". or asyncio. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/opt

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-03 Thread Antoine Pitrou
command line for a one-off.) I'll be fine with not adding any hooks at all, and letting people configure their application code correctly :-) Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/l

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-03 Thread Antoine Pitrou
are updated and followed more scrupulously... > But at least some of the > time it will be a wake-up call and an expired certificate will be replaced, > resulting in more security for all. Only if you are actually the one managing that certificate and the machine it's installed o

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-03 Thread Antoine Pitrou
ible unvoluntary breakage due to a large backport is one thing. Deliberate breakage is another. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-04 Thread Antoine Pitrou
ntegration testing on 2.7.9, which we'd have to do *anyway*. What are "our existing Python 2 applications"? Is it a Red Hat-specific statement? What is the "code audit" you are talking about? Regards Antoine. ___ Python-Dev

Re: [Python-Dev] cpython and parallel make

2014-09-04 Thread Antoine Pitrou
think > it would be possible to parallelize this script? Would people be interested > in having a parallel version? See http://bugs.python.org/issue5309 Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/

Re: [Python-Dev] cpython (3.4): Issue #22295: Adopt 'python -m pip' as the preferred invocation

2014-09-06 Thread Antoine Pitrou
+.. note:: > + > + For POSIX users (including Mac OS X and Linux users), the examples in > + this guide assume the use of a :term:`virtual environment`. Why not advocate --user instead? It is simpler than messing around with virtual environments and will suffice for

Re: [Python-Dev] Proposed schedule for 3.4.2

2014-09-11 Thread Antoine Pitrou
t ssl module specifics to open an HTTPS URL?). http.client is more low-level and therefore more amenable to such powerful knobs. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pytho

Re: [Python-Dev] Proposed schedule for 3.4.2

2014-09-11 Thread Antoine Pitrou
or *one* urlopen() call site, you're doing it for *every* urlopen call site in the program - or, even worse, for every urlopen that's imported after the monkey-patching (which makes the final effect potentially dependent on module import order, and import style). It may affect third-pa

Re: [Python-Dev] Multilingual programming article on the Red Hat Developer blog

2014-09-12 Thread Antoine Pitrou
x27;t leak out to other applications, unless the user's code does its I/O very badly :-) Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] namedtuples bug between 3.3.2 and 3.4.1

2014-09-14 Thread Antoine Pitrou
old now), nor > on 3.4.1 as currently shipping with Debian Jessie, nor with 3.4.0 on > Windows. So this may be an Anaconda issue. Do you know if it's meant > to be a patched install of Python? There may be a couple distutils-specific patches, but that's all. Anaconda issues shou

Re: [Python-Dev] List insert at index that is well out of range - behaves like append

2014-09-15 Thread Antoine Pitrou
No, the latter would replace the contents at index i, while the former inserts it (formally, it replaces the 0-length slice with a 1-length slice). Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinf

Re: [Python-Dev] Multilingual programming article on the Red Hat Developer blog

2014-09-17 Thread Antoine Pitrou
Seriously, can this discussion move somewhere else? This has nothing to do on python-dev. Thank you Antoine. On Wed, 17 Sep 2014 18:56:02 +1000 Steven D'Aprano wrote: > On Wed, Sep 17, 2014 at 09:21:56AM +0900, Stephen J. Turnbull wrote: > > > Guido's mantra is someth

Re: [Python-Dev] PEP 394 - Clarification of what "python" command should invoke

2014-09-19 Thread Antoine Pitrou
On Fri, 19 Sep 2014 08:20:48 -0700 Guido van Rossum wrote: > "python" should always be the same as "python2". "Always" as in "eternally"? ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscrib

Re: [Python-Dev] 3.5 release schedule PEP

2014-09-24 Thread Antoine Pitrou
move in 3.5 would be a good idea. Experts can override the installation path and choose C:\PythonXY. There's no actual breakage since the path changes for every major release, anyway (i.e. people would have had to change the path from "C:\Python34" to "C:\Python35"; inst

Re: [Python-Dev] 3.5 release schedule PEP

2014-09-24 Thread Antoine Pitrou
On Wed, 24 Sep 2014 21:32:52 +0200 Victor Stinner wrote: > Most Windows setup are desktop configured with a single user. I would not > be shocked if pip installs modules only for the current user by default. > Maybe it could be an option in Python installer (pip system wide or user). pip install

Re: [Python-Dev] 3.5 release schedule PEP

2014-09-24 Thread Antoine Pitrou
we aren't as far away as we think. > > Indeed. Moving towards having --user as the norm is definitely > something we want to look at for pip. One of the biggest concerns is > how well-exercised the whole user site directory area is in practice. Wha

Re: [Python-Dev] 3.5 release schedule PEP

2014-09-25 Thread Antoine Pitrou
On Thu, 25 Sep 2014 07:34:31 +0100 Paul Moore wrote: > On 25 September 2014 02:08, Antoine Pitrou wrote: > >> Indeed. Moving towards having --user as the norm is definitely > >> something we want to look at for pip. One of the biggest concerns is > >> how well

Re: [Python-Dev] 3.5 release schedule PEP

2014-09-25 Thread Antoine Pitrou
ite-packages/pip-1.5.6-py2.7.egg > (python 2.7) > > $ /usr/local/bin/pip install --user tornado > ... > error: can't combine user with prefix, exec_prefix/home, or install_(plat)base Yes, it is. http://bugs.python.org/issue22269 Regards Antoine. __

Re: [Python-Dev] Critical bash vulnerability CVE-2014-6271 may affect Python on *n*x and OSX

2014-09-25 Thread Antoine Pitrou
; for thread on > same being started today. Fortunately, Python's subprocess has its `shell` argument default to False. However, `os.system` invokes the shell implicitly and is therefore a possible attack vector. Regards Antoine. ___ Python-Dev m

Re: [Python-Dev] Critical bash vulnerability CVE-2014-6271 may affect Python on *n*x and OSX

2014-09-25 Thread Antoine Pitrou
tor, unless you only > use it with trusted strings. I don't think the bash env vulnerability > adds to the attack surface. > > Have I missed something? The part where the attack payload is passed through the environment, not through hypothetical user-injected command-l

Re: [Python-Dev] Critical bash vulnerability CVE-2014-6271 may affect Python on *n*x and OSX

2014-09-26 Thread Antoine Pitrou
impler, in terms of lines of code. It's no > guarantee, but the less a given piece of code does, the less bugs it will > have. -- H And that they have less "features" (which is certainly correlated to their simplicity). IIUC, the misimplemented feature leading

Re: [Python-Dev] Critical bash vulnerability CVE-2014-6271 may affect Python on *n*x and OSX

2014-09-26 Thread Antoine Pitrou
On Fri, 26 Sep 2014 14:56:05 +0200 Stefan Behnel wrote: > Jeremy Sanders schrieb am 26.09.2014 um 09:28: > > Antoine Pitrou wrote: > > > >> Fortunately, Python's subprocess has its `shell` argument default to > >> False. However, `os.system` invokes the sh

Re: [Python-Dev] Microsoft Visual C++ Compiler for Python 2.7

2014-09-27 Thread Antoine Pitrou
oesn't work with plain distutils? Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Microsoft Visual C++ Compiler for Python 2.7

2014-09-27 Thread Antoine Pitrou
ly with the currently maintained branches > > (including 2.7). > > +1 +1 as well. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/m

Re: [Python-Dev] Fixing 2.7.x

2014-10-06 Thread Antoine Pitrou
the json module at that time, so IMHO it's a won't fix. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/a

Re: [Python-Dev] mUTF-7 support?

2014-10-09 Thread Antoine Pitrou
ds good to me. Feel free to propose a patch for 3.5. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] mUTF-7 support?

2014-10-09 Thread Antoine Pitrou
f messages there - but > maybe I'm just being very lucky. I'm not specifying a codec, and I > don't see a way of specifying one offhand. AFAIU, this is specifically about mailbox names, not messages. Regards Antoine. _

Re: [Python-Dev] mUTF-7 support?

2014-10-09 Thread Antoine Pitrou
an a feature being added. Well, it would be a bug if we had claimed to support it. Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Sad status of Python 3.x buildbots

2014-10-10 Thread Antoine Pitrou
email > the maintainer when the buildbot is red. I don't know if buildbot > supports that or not, so that would be the first thing to check. I don't know if it would support e-mailing the maintainer rather than whoever committed the last changes. Besides, I

Re: [Python-Dev] Status of C compilers for Python on Windows

2014-10-11 Thread Antoine Pitrou
ary with Windows support that doesn't work with MSVC?! > > It uses AT&T assembly syntax instead of Intel assembly syntax. But you can compile OpenBLAS with one compiler and then link it to Python using another compiler, right? There is a single C ABI. Regards Antoine. __

Re: [Python-Dev] Status of C compilers for Python on Windows

2014-10-11 Thread Antoine Pitrou
On Sat, 11 Oct 2014 13:59:52 + (UTC) Sturla Molden wrote: > Antoine Pitrou wrote: > > > But you can compile OpenBLAS with one compiler and then link it to > > Python using another compiler, right? There is a single C ABI. > > BLAS and LAPACK are actually Fortra

Re: [Python-Dev] Disabling SSL 3.0

2014-10-14 Thread Antoine Pitrou
des a SSL_OP_NO_SSLv2 option for SSL context. Is there a > SSL_OP_NO_SSLv3 option? Or only change the constructor of > ssl.SSLContext? Please let's not have this discussion on two different channels. *Either* the bug tracker or the mailing-list. Thank you Antoine. ___

Re: [Python-Dev] How io.IOBase.readline() should behave when used on non-blocking obj and no data available?

2014-10-16 Thread Antoine Pitrou
st that data (an incomplete line)? That breaks the API's contract. Should readline() buffer the incomplete line and keep it for the next readline() call? But then the internal buffer becomes unbounded: perhaps there is no new line in the next 4GB of incoming data... And besides, raw I/O objec

Re: [Python-Dev] XP buildbot problem cloning from hg.python.org

2014-10-24 Thread Antoine Pitrou
and exiting), and I'm wondering if something may be > amiss on the server or its configuration? Have you tried running the hg clone manually from the buildbot? You could try to add --debug to get more info where the thing breaks. Regards Antoine. _

  1   2   3   4   5   6   7   8   9   10   >