[issue14570] Document json "sort_keys" parameter properly

2012-09-14 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +petri.lehtinen stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mail

[issue14570] Document json "sort_keys" parameter properly

2012-09-14 Thread Chris Rebert
Chris Rebert added the comment: Any reactions? The patch is pretty straightforward... -- ___ Python tracker ___ ___ Python-bugs-list m

[issue15920] make howto/regex.rst doctests pass

2012-09-14 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: docs@python -> ezio.melotti nosy: +ezio.melotti type: -> enhancement ___ Python tracker ___ __

[issue15888] ipaddress doctest examples have some errors

2012-09-14 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailin

[issue15887] urlencode should accept iterables of pairs

2012-09-14 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue15880] os.path.split() and long UNC names

2012-09-14 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti stage: -> test needed type: crash -> behavior versions: +Python 3.2, Python 3.3 ___ Python tracker ___ _

[issue15789] mention shell-like parts of the std lib in the subprocess docs

2012-09-14 Thread Ezio Melotti
Ezio Melotti added the comment: Pong, thanks for the patch! -- assignee: docs@python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement ___ Python tracker

[issue15789] mention shell-like parts of the std lib in the subprocess docs

2012-09-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 820032281f49 by Ezio Melotti in branch '2.7': #15789: mention shell-like parts of the stdlib in the subprocess docs. Patch by Chris Rebert. http://hg.python.org/cpython/rev/820032281f49 New changeset 9794f69c1d09 by Ezio Melotti in branch '3.2': #

[issue15789] mention shell-like parts of the std lib in the subprocess docs

2012-09-14 Thread Chris Rebert
Chris Rebert added the comment: Ping. Any further comments? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15897] zipimport.c doesn't check return value of fseek()

2012-09-14 Thread Ezio Melotti
Ezio Melotti added the comment: I suggested to Felipe on IRC to use "read" instead of "seek" because I don't think it's worth making a distinction between the two. Moreover ISTM that in most of the cases, if the fseek fails, the error is detected in a following fread, so the message currently

[issue15897] zipimport.c doesn't check return value of fseek()

2012-09-14 Thread Felipe Cruz
Felipe Cruz added the comment: Patch updated - fseek errors messges will be "can't read Zip file' and not "can't Open Zip file" -- Added file: http://bugs.python.org/file27192/issue15897_v1.patch ___ Python tracker

[issue15897] zipimport.c doesn't check return value of fseek()

2012-09-14 Thread Felipe Cruz
Felipe Cruz added the comment: Hello! This is one of my first patches. Tests still OK! Let me know what you think! Thanks! -- keywords: +patch nosy: +felipecruz Added file: http://bugs.python.org/file27191/issue15897_v1.patch ___ Python tracker

[issue15922] make howto/urllib2.rst doctests pass

2012-09-14 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue15932] files in the csv documentation's examples are not closed

2012-09-14 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: docs@python -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3 _

[issue15932] files in the csv documentation's examples are not closed

2012-09-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset ade667076c14 by Ezio Melotti in branch '2.7': #15932: use with statement in csv doc examples. http://hg.python.org/cpython/rev/ade667076c14 New changeset 8a06fb321074 by Ezio Melotti in branch '3.2': #15932: use with statement in csv doc examples.

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-14 Thread Ezio Melotti
Ezio Melotti added the comment: The * is not supposed to be used on 2.7, but I missed that. Thanks for noticing! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: behavior -> enhancement ___ Python tracker

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 881acdf9133f by Ezio Melotti in branch '2.7': #15831: avoid using 3.x syntax for keyword-only args. http://hg.python.org/cpython/rev/881acdf9133f -- ___ Python tracker

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-14 Thread Chris Jerdonek
Chris Jerdonek added the comment: Since the bare * notation wasn't added until 3.0, my guess is that we want to remove the * below (from the 2.7 application of the patch) rather than adding it back in the max() function I pasted above: -.. function:: min(iterable[, args...][key]) +.. function:

[issue15935] clarify argparse docs re: add_argument() type and default arguments

2012-09-14 Thread Chris Jerdonek
Chris Jerdonek added the comment: If this looks good, can one of you three (Steven, Barry, or David) commit it in the three branches? -- ___ Python tracker ___ _

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-09-14 Thread Julian Berman
Changes by Julian Berman : -- nosy: +Julian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue15887] urlencode should accept iterables of pairs

2012-09-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: The first sentence of the urlencode entry is a bit garbled as something is clearly missing. "Convert a mapping object or a sequence of two-element tuples, which may either be a str or a bytes, to a “percent-encoded” string." Mappings, duple sequences, and dup

[issue15944] memoryviews and ctypes

2012-09-14 Thread Stefan Krah
Stefan Krah added the comment: Please read msg170482. It even contains a copy and paste example! -- ___ Python tracker ___ ___ Python-

[issue15883] Add Py_errno to work around multiple CRT issue

2012-09-14 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- type: behavior -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue15880] os.path.split() and long UNC names

2012-09-14 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-14 Thread Chris Jerdonek
Chris Jerdonek added the comment: Someone pointed out that keyword-only arguments were introduced only in 3.0, but I'm not sure whether that means we can't use them as a notational device in the 2.7 docs. -- ___ Python tracker

[issue15944] memoryviews and ctypes

2012-09-14 Thread David Beazley
David Beazley added the comment: I should add that 0-dim indexing doesn't work as described either: >>> import ctypes >>> d = ctypes.c_double() >>> m = memoryview(d) >>> m[()] Traceback (most recent call last): File "", line 1, in NotImplementedError: memoryview: unsupported format >> --

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-14 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks, Ezio! By the way, I didn't do a thorough check, but I noticed this difference in the 2.7 application of the patch. The *key* argument for max() needs to be marked keyword-only. This difference doesn't exist for the min() function. Or are we not usi

[issue15944] memoryviews and ctypes

2012-09-14 Thread David Beazley
David Beazley added the comment: Just to be specific, why is something like this not possible? >>> d = ctypes.c_double() >>> m = memoryview(d) >>> m[0:8] = b'abcdefgh' >>> d.value 8.540883223036124e+194 >>> (Doesn't have to be exactly like this, but what's wrong with overwriting bytes with byt

[issue9253] argparse: optional subparsers

2012-09-14 Thread Benjamin West
Benjamin West added the comment: https://gist.github.com/1202975#file_test_opt_subcommand.py I sketched out a sloppy test earlier. I think this test is probably not quite comprehensive enough, and I'm not sure it fits into the python style either. I suppose there are other tests I can more o

[issue15944] memoryviews and ctypes

2012-09-14 Thread David Beazley
David Beazley added the comment: No, I want to be able to access the raw bytes sitting behind a memoryview as bytes without all of this casting and reinterpretation. Just show me the raw bytes. Not doubles, not ints, not structure packing, not copying into byte strings, or whatever. Is thi

[issue15944] memoryviews and ctypes

2012-09-14 Thread Stefan Krah
Stefan Krah added the comment: So you want to be able to segfault the core interpreter using the builtins? -- ___ Python tracker ___ _

[issue15944] memoryviews and ctypes

2012-09-14 Thread Stefan Krah
Stefan Krah added the comment: The decision was made in order to be able to cast back and forth between known formats. Otherwise one would be able to cast from '>> import ctypes, struct >>> d = ctypes.c_double() >>> m = memoryview(d) >>> struct.pack_into(m.format, m, 0, 22.7) >>> struct.unpack_fr

[issue15944] memoryviews and ctypes

2012-09-14 Thread David Beazley
David Beazley added the comment: I don't think memoryviews should be imposing any casting restrictions at all. It's low level. Get out of the way. -- ___ Python tracker ___ ___

[issue15419] distutils: build should use a version-specific build directory

2012-09-14 Thread Éric Araujo
Éric Araujo added the comment: > I'd change the name of the subdirectories of build instead of the name of the > build directory itself. Yep that’s what I was thinking about (or if I wasn’t, I should have been :) > IIRC distutils is more or less closed for development w.r.t. new features. Not m

[issue15419] distutils: build should use a version-specific build directory

2012-09-14 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'd change the name of the subdirectories of build instead of the name of the build directory itself. That way distutils will still create one build directory regardless of how many python versions you use, and the name of that directory is easily predicatble

[issue15898] OSX TTY bug

2012-09-14 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue15944] memoryviews and ctypes

2012-09-14 Thread David Beazley
David Beazley added the comment: Even with the ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.co

[issue15944] memoryviews and ctypes

2012-09-14 Thread Stefan Krah
Stefan Krah added the comment: BTW, if c_double means "native machine double", then ctypes should fill in Py_buffer.format with "d" and not " ___ ___ Python-bugs-list mailing list U

[issue15944] memoryviews and ctypes

2012-09-14 Thread Stefan Krah
Stefan Krah added the comment: 0-dim memory is indexed by x[()]. The ctypes example has an additional problem, because format=">> x = ndarray(3.14, shape=[], format='d', flags=ND_WRITABLE) >>> x[()] 3.14 >>> tau = 6.28 >>> x[()] = tau >>> x[()] 6.28 >>> m = memoryview(x) >>> m[()] 6.28 >>> m[()]

[issue15944] memoryviews and ctypes

2012-09-14 Thread David Beazley
David Beazley added the comment: I don't want to read the representation by copying it into a bytes object. I want direct access to the underlying memory--including the ability to modify it. As it stands now, it's completely useless. -- ___ Python

[issue15944] memoryviews and ctypes

2012-09-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: You can still read the underlying representation: >>> d = ctypes.c_double(0.6) >>> m = memoryview(d) >>> bytes(m) b'33\xe3?' >>> d.value = 0.7 >>> bytes(m) b'ff\xe6?' -- nosy: +pitrou, skrah ___ Python tracke

[issue15842] Some SocketIO methods can succeed after close()

2012-09-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've committed the patch. Thanks Alessandro! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker __

[issue15842] Some SocketIO methods can succeed after close()

2012-09-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset fad797916266 by Antoine Pitrou in branch '3.2': Issue #15842: the SocketIO.{readable,writable,seekable} methods now raise ValueError when the file-like object is closed. http://hg.python.org/cpython/rev/fad797916266 New changeset 3b0e20f71d8a by An

[issue15944] memoryviews and ctypes

2012-09-14 Thread David Beazley
New submission from David Beazley: I've been playing with the interaction of ctypes and memoryviews and am curious about intended behavior. Consider the following: >>> import ctypes >>> d = ctypes.c_double() >>> m = memoryview(d) >>> m.ndim 0 >>> m.shape () >>> m.readonly False >>> m.itemsize

[issue12849] Cannot override 'connection: close' in urllib2 headers

2012-09-14 Thread R. David Murray
Changes by R. David Murray : -- title: urllib2 headers issue -> Cannot override 'connection: close' in urllib2 headers ___ Python tracker ___ ___

[issue12849] urllib2 headers issue

2012-09-14 Thread R. David Murray
R. David Murray added the comment: I've closed issue 15943 as a duplicate of this one. As I said there, I'm not sure that we (can?) support keep-alive in urllib, though we do in httplib (which is the http package in python3). -- nosy: +r.david.murray, sanxiago versions: +Python 2.7, P

[issue15943] urllib2 always sends header connection: close

2012-09-14 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of issue 12849. I'm not sure that we support keep-alive using urllib. We do using httplib, if I understand correctly. -- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed supersed

[issue8109] Server-side support for TLS Server Name Indication extension

2012-09-14 Thread danblack
danblack added the comment: > Daniel, your patch looks quite interesting. Please, send a contributor > agreement to the PSF: http://www.python.org/psf/contrib/contrib-form-python/ > . Let me know when you status have changed. Already done. Has been accepted and I've got an acknowledgement emai

[issue8109] Server-side support for TLS Server Name Indication extension

2012-09-14 Thread danblack
Changes by danblack : Removed file: http://bugs.python.org/file26950/issue8109_server_side_sni.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue15943] urllib2 always sends header connection: close

2012-09-14 Thread Santiago Velasco
New submission from Santiago Velasco: I have noticed that urllib2 will always send the 'connection: close' in the headers, looking at the code there is no way to override this from outside of the open method. I am currently working with a server that kills connection upon reading the header,