[issue23326] Remove redundant __ne__ implementations

2015-01-31 Thread Martin Panter
Martin Panter added the comment: I looked at all the instances of __ne__() identified in the patch, and they all seem redundant with the __eq__() implementations, so I think this patch is good. -- ___ Python tracker

[issue23356] In argparse docs simplify example about argline

2015-01-31 Thread py.user
New submission from py.user: The example is: def convert_arg_line_to_args(self, arg_line): for arg in arg_line.split(): if not arg.strip(): continue yield arg str.split() with default delimiters never returns empty or whitespace strings in the list. >>> ' x x

[issue23356] In argparse docs simplify example about argline

2015-01-31 Thread py.user
py.user added the comment: Url https://docs.python.org/3/library/argparse.html#customizing-file-parsing -- ___ Python tracker ___ ___

[issue23285] PEP 475 - EINTR handling

2015-01-31 Thread Charles-François Natali
Charles-François Natali added the comment: I just realized I didn't retry upon EINTR for open(): eintr-4.diff adds this, along with tests (using a fifo). Also, I added comments explaining why we don't retry upon close() (see e.g. http://lwn.net/Articles/576478/ and http://linux.derkeiler.com/Mai

[issue23285] PEP 475 - EINTR handling

2015-01-31 Thread STINNER Victor
STINNER Victor added the comment: Charles-François Natali added the comment: > I just realized I didn't retry upon EINTR for open(): eintr-4.diff > adds this, along with tests (using a fifo). > > Also, I added comments explaining why we don't retry upon close() (see > e.g. http://lwn.net/Articles

[issue23342] run() - unified high-level interface for subprocess

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Maybe you don’t want to touch the implementation of the “older high-level API” for fear of subtly breaking something, but for clarification, and perhaps documentation, would the old functions now be equivalent to this? def call(***): # Verify PIPE not in (s

[issue23357] pyvenv help shows incorrect usage

2015-01-31 Thread Raúl Cumplido
New submission from Raúl Cumplido: Currently when you execute pyvenv the help message is wrong: host@~ $ pyvenv usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear] [--upgrade] [--without-pip] ENV_DIR [ENV_DIR ...] venv: error: the following argume

[issue22765] Fixes for test_gdb (first frame address, entry values)

2015-01-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 47a9cb7ec0cb by Serhiy Storchaka in branch '2.7': Issue #22765: Fixed test_gdb failures. Supressed unexpected gdb output. https://hg.python.org/cpython/rev/47a9cb7ec0cb New changeset 5b5a581d91c8 by Serhiy Storchaka in branch '3.4': Issue #22765: Fi

[issue23357] pyvenv help shows incorrect usage

2015-01-31 Thread Raúl Cumplido
Raúl Cumplido added the comment: Patch that solves the issue. I am on Misc/ACKS on branch 3.4 but not on default branch. I would appreciate if that gets merged to be added :) -- keywords: +patch Added file: http://bugs.python.org/file37936/23357.patch _

[issue23353] generator bug with exception: tstate->exc_value is not cleared after an except block

2015-01-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4555da8c3091 by Victor Stinner in branch '3.4': Issue #23353: Fix the exception handling of generators in PyEval_EvalFrameEx(). https://hg.python.org/cpython/rev/4555da8c3091 -- nosy: +python-dev ___ Pyth

[issue23353] generator bug with exception: tstate->exc_value is not cleared after an except block

2015-01-31 Thread STINNER Victor
STINNER Victor added the comment: I agree that it's better to not change the behaviour of generators, backward compatibility matters :-) I wrote tests using my examples and I combined them with gen_exc_state_restore.patch. I commited the changeset in Python 3.4 and 3.5. Backporting the fix

[issue16840] Tkinter doesn't support large integers

2015-01-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is test failure related to this issue: http://buildbot.python.org/all/builders/AMD64%20Windows8%202.7/builds/156/steps/test/logs/stdio test test_tk failed -- Traceback (most recent call last): File "D:\buildarea\2.7.bolen-windows8\build\lib\lib-tk\tes

[issue21408] delegation of `!=` to the right-hand side argument is not always done

2015-01-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3603bae63c13 by Serhiy Storchaka in branch 'default': Issue #23326: Removed __ne__ implementations. Since fixing default __ne__ https://hg.python.org/cpython/rev/3603bae63c13 -- ___ Python tracker

[issue23326] Remove redundant __ne__ implementations

2015-01-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3603bae63c13 by Serhiy Storchaka in branch 'default': Issue #23326: Removed __ne__ implementations. Since fixing default __ne__ https://hg.python.org/cpython/rev/3603bae63c13 -- nosy: +python-dev ___ Pyt

[issue23358] BaseServer missing from socketserver.__all__

2015-01-31 Thread Martin Panter
New submission from Martin Panter: This patch adds BaseServer to __all__. It also adds a test case that should automatically fail if someone defines a new function or class in the “socketserver” module and does not update __all__. -- components: Library (Lib) files: socketserver-all.pa

[issue15381] Optimize BytesIO to do less reallocations when written, similarly to StringIO

2015-01-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Antoine's comment. -- Added file: http://bugs.python.org/file37939/bytesio_resized_bytes-6.patch ___ Python tracker __

[issue23353] generator bug with exception: tstate->exc_value is not cleared after an except block

2015-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think your patch for 2.7 is wrong as was your patch for 3.x. You shouldn't change the behaviour of sys.exc_info() in the nominal case. -- ___ Python tracker

[issue23254] Document how to close the TCPServer listening socket

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Here is a simple patch to add server_close() to the documentation, and a simple test to ensure it closes the socket. -- keywords: +patch versions: +Python 3.4, Python 3.5 Added file: http://bugs.python.org/file37940/server_close.patch __

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-31 Thread Martin Panter
Martin Panter added the comment: I have changed my opinion of the “peek hack” from . It would be useful when doing non-idempotent requests like POST, to avoid sending a request when we know it is going to fail. I looked into how to implement it so t

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: Cython doesn't follow the spec though (use Python 3): from _testbuffer import * cpdef foo(): cdef unsigned char[:] v = bytearray(b"testing") nd = ndarray(v, getbuf=PyBUF_ND) print(nd.suboffsets) nd = ndarray(v, getbuf=PyBUF_FULL) print(nd.subof

[issue23099] BytesIO and StringIO values unavailable when closed

2015-01-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why not just copy the StringIO documentation? -- Added file: http://bugs.python.org/file37942/bytesio_exported_reject_close.v3.patch ___ Python tracker _

[issue23349] PyBuffer_ToContiguous() off-by-one error for non-contiguous buffers

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: Should be fixed, thanks for the patch. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue23353] generator bug with exception: tstate->exc_value is not cleared after an except block

2015-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: It would have been nice to wait for a review. Generator tests are already in test_exceptions.py. -- ___ Python tracker ___

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: To summarize, I think this is different from #22445, which also requests relaxed contiguity tests. #22445 is motivated by the fact that slicing can create a certain class of contiguous buffers that aren't recognized as such. No such reason exists here: All-negative

[issue23353] generator bug with exception: tstate->exc_value is not cleared after an except block

2015-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Additional simple tests for test_exceptions.py. -- Added file: http://bugs.python.org/file37943/exctests.patch ___ Python tracker ___ __

[issue12834] memoryview.to_bytes() and PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: Sorry, #23349. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue12834] memoryview.to_bytes() and PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: Fixed for 2.7 in #22668. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue23354] Loading 2 GiLOC file which raises exception causes wrong traceback

2015-01-31 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue23353] generator bug with exception: tstate->exc_value is not cleared after an except block

2015-01-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you need non-normalized exception for testing, a NameError generated by interpreter is not normalized. -- ___ Python tracker ___ _

[issue23353] generator bug with exception: tstate->exc_value is not cleared after an except block

2015-01-31 Thread STINNER Victor
STINNER Victor added the comment: > It would have been nice to wait for a review. Generator tests are already in > test_exceptions.py. Sorry, I wanted to quickly push your fix to fix buildbots. I dislike being the responsible of turning all buildbots to red... Before working on this issue, I

[issue23353] generator bug with exception: tstate->exc_value is not cleared after an except block

2015-01-31 Thread STINNER Victor
STINNER Victor added the comment: By the way: buildbots are green again, cool. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23326] Remove redundant __ne__ implementations

2015-01-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Martin and Georg for your reviews. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue22765] Fixes for test_gdb (first frame address, entry values)

2015-01-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Bohuslav. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue23357] pyvenv help shows incorrect usage

2015-01-31 Thread STINNER Victor
STINNER Victor added the comment: Could you please write an unit test for non-regression? -- nosy: +haypo ___ Python tracker ___ ___ P

[issue23326] Remove redundant __ne__ implementations

2015-01-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nice work. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: Prepare for a partial reversal of opinion. :) Indexing *can* actually create all-negative suboffsets in a natural way: >>> from _testbuffer import * >>> nd = ndarray([1,2,3,4,5,6,7,8,9,10,11,12], shape=[3,4], flags=ND_PIL) >>> nd.tolist() [[1, 2, 3, 4], [5, 6, 7

[issue15955] gzip, bz2, lzma: add option to limit output size

2015-01-31 Thread Nikolaus Rath
Nikolaus Rath added the comment: Yes, I still plan to do it, but I haven't started yet. That said, I certainly won't be offended if someone else implements the feature either. Please just let me know when you start working on this (I'll do the same), so there's no duplication of efforts.

[issue15955] gzip, bz2, lzma: add option to limit output size

2015-01-31 Thread Nikolaus Rath
Nikolaus Rath added the comment: On a more practical note: I believe Nadeem at one point said that the bz2 module is not exactly an example for good stdlib coding, while the lzma module's implementation is quite clean. Therefore Therefore, one idea I had for the bz2 module was to "port" the

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't have an opinion on this. I've never seen suboffsets in use; but it seems reasonable to detect a "dummy suboffsets" array and recognize it as contiguous. -- ___ Python tracker

[issue23212] Update Windows and OS X installer copies of OpenSSL to 1.0.1l

2015-01-31 Thread Steve Dower
Steve Dower added the comment: I'll make the change for Windows. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23199] libpython27.a in amd64 release is 32-bit

2015-01-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 536a816e7232 by Steve Dower in branch '2.7': Issue #23199: libpython27.a in amd64 release is 32-bit https://hg.python.org/cpython/rev/536a816e7232 -- nosy: +python-dev ___ Python tracker

[issue23212] Update Windows and OS X installer copies of OpenSSL to 1.0.1l

2015-01-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset c8d7df3cb854 by Steve Dower in branch '2.7': Issue #23212: Update Windows copy of OpenSSL to 1.0.1l https://hg.python.org/cpython/rev/c8d7df3cb854 -- ___ Python tracker

[issue23212] Update Windows and OS X installer copies of OpenSSL to 1.0.1l

2015-01-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8049954bc0e4 by Steve Dower in branch '3.4': Issue #23212: Update Windows copy of OpenSSL to 1.0.1l https://hg.python.org/cpython/rev/8049954bc0e4 New changeset 469ff344f8fd by Steve Dower in branch 'default': Issue #23212: Update Windows copy of Op

[issue23258] Cannot Install Python 3.4.2 on Windows 7 64 bit / screen print attached

2015-01-31 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue20983] Python 3.4 'repair' Windows installation does not install pip & setuptools packages

2015-01-31 Thread Steve Dower
Changes by Steve Dower : -- versions: -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue19955] When adding .PY and .PYW to PATHEXT, it replaced string instead of appending

2015-01-31 Thread Steve Dower
Changes by Steve Dower : -- versions: -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23357] pyvenv help shows incorrect usage

2015-01-31 Thread Raúl Cumplido
Raúl Cumplido added the comment: Added tests (hope is what you expect) and changed some bits on the test file to be pep8 comliant. -- Added file: http://bugs.python.org/file37944/23357.2.patch ___ Python tracker _

[issue23359] Speed-up set_lookkey()

2015-01-31 Thread Raymond Hettinger
New submission from Raymond Hettinger: This patch applies three techniques to tighten-up the generated code for the lookkey() for sets. I'm not sure I want to do this because it expands the size of the code quite a bit (much like the previously existing lookkey specializations did). As such,

[issue23359] Speed-up set_lookkey()

2015-01-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: One further possible transformation is to inline set_lookkey_dummy_allowed() inside set_insert_key() which is the only place it is used. That saves all the test and branch code inside the latter (all that code does is reconstruct the exit points for set_lo

[issue23359] Speed-up set_lookkey()

2015-01-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue23342] run() - unified high-level interface for subprocess

2015-01-31 Thread Thomas Kluyver
Thomas Kluyver added the comment: Yep, they are pretty much equivalent to those, except: - check_call has a 'return 0' if it succeeds - add '.stdout' to the end of the expression for check_output I'll work on documenting the trio in those terms. If people want, some/all of the trio could also

[issue23342] run() - unified high-level interface for subprocess

2015-01-31 Thread Martin Panter
Martin Panter added the comment: It’s okay to leave them as independent classes, if you don’t want multiple inheritance. I was just putting the idea out there. It is a similar pattern to the HTTPError exception and HTTPResponse return value for urlopen(). -- __

[issue23358] BaseServer missing from socketserver.__all__

2015-01-31 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Martin. I got the following failure on the 3.4 branch: == FAIL: test_all (test.test_socketserver.SimpleTests) ---

[issue23358] BaseServer missing from socketserver.__all__

2015-01-31 Thread Martin Panter
Martin Panter added the comment: New test case looks good. Checking for the underscore prefix is how I would have done it too, if I had realized it was needed :) I’m not qualified to comment on removing the run_unittest() call. -- ___ Python tracker

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Here is an enhancement to the existing SimpleHTTPServerTestCase.test_get() test case, that demonstrates the current implementation breaks serving index.html files by default. -- Added file: http://bugs.python.org/file37947/index-test.patch

[issue23099] BytesIO and StringIO values unavailable when closed

2015-01-31 Thread Martin Panter
Martin Panter added the comment: I can live with the wording of StringIO, but personally prefer my v2 patch. I now understand that calling close() for Bytes and StringIO objects is intended to immediately free the memory buffer holding the file data (like deleting a file in Windows). So I thin

[issue12916] Add inspect.splitdoc

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Here is a 4th patch that allows None as input. Other changes: * Document and test getdoc() returning None * Limited the splitting and re-joining dance * Document when the synopsis and body strings are empty * More test cases I left the pydoc test there, though I

[issue12916] Add inspect.splitdoc

2015-01-31 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file37948/issue12916-splitdoc-4.patch ___ Python tracker ___ ___ Python-bugs-l

[issue12916] Add inspect.splitdoc

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Oops, seems I forgot to refresh my patch -- Added file: http://bugs.python.org/file37949/issue12916-splitdoc-4.patch ___ Python tracker ___ _

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Richard Hansen
Richard Hansen added the comment: (The following message is mostly off-topic but I think it is relevant to those interested in this issue. This message is about the clarity of the documentation regarding flag semantics, and what I think the flags should mean.) > Cython doesn't follow the spec

[issue15608] Improve socketserver doc

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Here is an attempt to tidy up the socketserver documentation: 1. Added headings for each concrete class and mixin 2. Listed the predefined mixin subclasses 3. Changed RequestHandler to BaseRequestHandler and added class heading 4. Included headings for UnixStream

[issue15608] Improve socketserver doc

2015-01-31 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review type: -> enhancement versions: +Python 3.4, Python 3.5 -Python 3.3 ___ Python tracker ___

[issue18454] distutils crashes when uploading to PyPI having only the username (no pw) defined

2015-01-31 Thread Nick Coghlan
Nick Coghlan added the comment: I agree the documentation is correct here, and the stdlib should be updated to implement the expected behaviour. While distutils is indeed feature frozen, that's aimed at changing how we approach the larger scale evolution of the packaging ecosystem, it doesn't

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-31 Thread Ent
Ent added the comment: I have updated the patch such that for any directory, if they have a file with name in index_files, it will be served by default. Also a few tweaks. -- Added file: http://bugs.python.org/file37951/Feb1st.patch ___ Python tracke

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Richard Hansen
Richard Hansen added the comment: Attached is a documentation patch that adds what I said in msg235141. I doubt everyone will agree with the changes, but maybe it will be a useful starting point. (Despite not having an asterisk next to my username, I have signed the contributor agreement. I