[issue22766] collections.Counter's in-place operators should return NotImplemented for unsupported types

2014-11-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, I don't want to change the kind of exception being raised (an API change from AttributeError to TypeError) without a really good reason. In general, in-place methods are not required to return NotImplemented (for example, (3).__iadd__(4.5) raises an

[issue22755] contextlib.closing documentation should use a new example

2014-11-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can a different example be chosen? The traditional examples (urllib, socket, StringIO) grow context manager support as soon as the need becomes apparent. So, that leaves only user-defined classes, third-party classes, generators, and cases where we

[issue22721] pprint output for sets and dicts is not stable

2014-11-01 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger versions: -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22721 ___

[issue21650] add json.tool option to avoid alphabetic sort of fields

2014-11-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: To me, --unsorted implies arbitrary ordering such as the order generated by regular dictionaries. I think the option should be --order-preserving or some such. The option name needs to make it clear that the output is in the same order an the input. As

[issue22718] pprint not handline uncomparable dictionary keys, set members well

2014-11-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Complex numbers also aren't sortable. I'm not sure this is worth fixing in 2.7. I agree. That ship sailed a long time ago. -- nosy: +rhettinger resolution: - wont fix status: open - closed ___ Python tracker

[issue21650] add json.tool option to avoid alphabetic sort of fields

2014-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be make sorting keys not default? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21650 ___

[issue21650] add json.tool option to avoid alphabetic sort of fields

2014-11-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Maybe make sorting keys not default? If you mean preserve order by default, then yes that would be a nice default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21650

[issue22721] pprint output for sets and dicts is not stable

2014-11-01 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: rhettinger - fdrake ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22721 ___

[issue22777] Test pickling with all protocols

2014-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed two bugs found by Antoine. Thank you Antoine. Berker suggest to use the subTest() context manager inside loops. I thought about this, but this will increase blocks indentations on yet 4 spaces, and some code already is too indented. On other hand this

[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Test pickling with all protocols (see issue22777), not only with HIGHEST_PROTOCOL. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22775 ___

[issue6623] Lib/ftplib.py Netrc class should be removed.

2014-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset ec196a99af8d by Berker Peksag in branch 'default': Issue #6623: Remove deprecated Netrc class in the ftplib module. https://hg.python.org/cpython/rev/ec196a99af8d -- ___ Python tracker

[issue6623] Lib/ftplib.py Netrc class should be removed.

2014-11-01 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Matt. Have you signed a contributor's agreement? You can find it at https://www.python.org/psf/contrib/contrib-form/ -- assignee: - berker.peksag priority: release blocker - normal resolution: - fixed stage: patch review -

[issue22665] shutil.__all__ incomplete

2014-11-01 Thread Berker Peksag
Berker Peksag added the comment: I agree with Martin. Plus, this method already used by other tests (see Lib/test/test_nntplib.py and Lib/test/test_warnings.py for example). -- ___ Python tracker rep...@bugs.python.org

[issue22665] shutil.__all__ incomplete

2014-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 232520144c6c by Berker Peksag in branch '3.4': Issue #22665: Add missing get_terminal_size and SameFileError to shutil.__all__. https://hg.python.org/cpython/rev/232520144c6c New changeset 193ac288bc7f by Berker Peksag in branch 'default': Issue

[issue22665] shutil.__all__ incomplete

2014-11-01 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, Martin. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22665

[issue20069] Add unit test for os.chown

2014-11-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch based on R. David Murray's review. Thanks! Thanks also for the work of Cormac O'Brien. -- Added file: http://bugs.python.org/file37096/add_unit_test_os_chown_v6.patch ___ Python tracker

[issue19610] setup.py does not allow a tuple for classifiers

2014-11-01 Thread Berker Peksag
Berker Peksag added the comment: Updated patch. I've tweaked tests and documentation a bit. Alternatively, I can leave Doc/distutils/setupscript.rst untouched and add a whatsnew entry to Doc/whatsnew/3.5.rst. -- Added file: http://bugs.python.org/file37097/issue19610_v2.diff

[issue22770] test_ttk_guionly and test_tk can cause Tk segfaults on OS X when run with regrtest -j option

2014-11-01 Thread Ned Deily
Ned Deily added the comment: Ah, Issue18604! Thanks for the reminder (and for the patch), Serhly! Focusing on these more recent occurrences of segfaults, I hadn't been thinking about those earlier ones. Now, after digging into Tk and identifying the problem there, it's clear that those

[issue12458] Tracebacks should contain the first line of continuation lines

2014-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is yet one example. x = 1; y = 0; z = 0 ( 1/x + 1/y + 1/z ) The traceback looks correct: Traceback (most recent call last): File 1.py, line 4, in module 1/y + ZeroDivisionError: division by zero But for following code: x = 0; y = 1;

[issue22766] collections.Counter's in-place operators should return NotImplemented for unsupported types

2014-11-01 Thread R. David Murray
R. David Murray added the comment: I agree with Raymond about the value of the more specific error message. And the point about the in-place operators being qualitatively different from the non-inplace operators is a good one. -- ___ Python

[issue22521] ctypes compilation fails on FreeBSD: Undefined symbol ffi_call_win32

2014-11-01 Thread Dmitry Sivachenko
Dmitry Sivachenko added the comment: On modern FreeBSD version (10/stable) on i386 arch it fails with the following error: build/temp.freebsd-10.0-RELEASE-p10-i386-3.4/usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.o: In function `.LBB4_4':

[issue22780] NotImplemented doc section needs update

2014-11-01 Thread Ethan Furman
Ethan Furman added the comment: Here's the actual change: + Special value which should be returned by the special methods + (:meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, etc.) to indicate + that the operation is not implemented with respect to the other type. I'll update the Enum

[issue19031] Make help() enum aware

2014-11-01 Thread Ethan Furman
Ethan Furman added the comment: Closing this as a duplicate of issue19404. -- resolution: - duplicate status: open - closed superseder: - Simplify per-instance control of help() output ___ Python tracker rep...@bugs.python.org

[issue14260] re.groupindex is available for modification and continues to work, having incorrect data inside it

2014-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are two patches which implement two alternative solutions. They are based on regex code. Dict copying patch matches current regex behavior and needs modifying other code to avoid small slowdown. Artificial example: $ ./python -m timeit -s 'import re;

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-11-01 Thread Wouter van Heyst
Wouter van Heyst added the comment: What the patch does is replace the hard-coded address 127.0.0.1 for the loopback interface with a one-time lookup. I'd argue the hunk @@ -315,7 +316,7 @@ should be dropped. The two arguments that motivate this change are: 1) The address of the loopback

[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-11-01 Thread Tim Graham
Tim Graham added the comment: Updated patch to test pickling of all protocols. -- Added file: http://bugs.python.org/file37100/cookie-pickling-all-protocols.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22775

[issue22781] ctypes: Differing results between Python and C.

2014-11-01 Thread Geoff Clements
New submission from Geoff Clements: I have used ctypes to create a binding to libdvdread but I am getting some bad values back from libdvdread when using python. I have used ctypeslib to generate the python bindings, i.e. h2xml and xml2py and, as far as I can tell, the bind is a faithful

[issue22695] open() declared deprecated in python 3 docs

2014-11-01 Thread Berker Peksag
Berker Peksag added the comment: Attached patch should fix the deprecated-removed directive. I've tested it with the following examples: .. deprecated-removed:: 3.4 4.0 The ``'U'`` mode. .. deprecated-removed:: 3.4 4.0 The ``'U'`` mode. .. deprecated-removed:: 3.4 4.0

[issue22782] Python 3.4.2 Windows installer - cannot install 32 bit then 64 bit version

2014-11-01 Thread Paul Moore
New submission from Paul Moore: When you install Python 3.4.2 32 bit and 64 bit on the same PC, in that order, the second one you install shows a red error message on the install screen, saying This update will replace your existing Python 3.4 installation, and proceeds to uninstall the

[issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

2014-11-01 Thread R. David Murray
R. David Murray added the comment: The problem is that there are several places in the test suite (and the stdlib itself!) that assume that 127.0.0.1 is a valid loopback address. This is the de-facto Internet standard, and while I know not all systems make 127.0.0.1 a valid loopback and/or

[issue14460] In re's positive lookbehind assertion repetition works

2014-11-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14460 ___

[issue19046] SystemError: ..\Objects\weakrefobject.c:903: bad argument to internal function

2014-11-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19046 ___ ___

[issue22781] ctypes: Differing results between Python and C.

2014-11-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: This doesn't directly address your issue, but ctypeslib doesn't seem to have received any changes since 2009 (*), and has never had an official release. For a non-trivial binding, you might be better served using something providing type safety, such as

[issue22695] open() declared deprecated in python 3 docs

2014-11-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: fixed - stage: - patch review status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22695 ___

[issue19046] SystemError: ..\Objects\weakrefobject.c:903: bad argument to internal function

2014-11-01 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - out of date status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19046 ___

[issue22776] SyslogHandler's record formatting during emit(..) not covered by try-except block

2014-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 54549f9b2ecc by Vinay Sajip in branch 'default': Closes #22776: Merged fix from 3.4. https://hg.python.org/cpython/rev/54549f9b2ecc -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

[issue22776] SyslogHandler's record formatting during emit(..) not covered by try-except block

2014-11-01 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22776 ___ ___

[issue22776] SyslogHandler's record formatting during emit(..) not covered by try-except block

2014-11-01 Thread Vinay Sajip
Vinay Sajip added the comment: N.B. 2.7 and 3.4 also updated, but I accidentally left the issue no. out of the commit message. Relevant changesets are ea7b64406396 and f6a906541476. -- ___ Python tracker rep...@bugs.python.org

[issue12939] Add new io.FileIO using the native Windows API

2014-11-01 Thread Roumen Petrov
Changes by Roumen Petrov bugtr...@roumenpetrov.info: -- nosy: +rpetrov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12939 ___ ___

[issue22781] ctypes: Differing results between Python and C.

2014-11-01 Thread Geoff Clements
Geoff Clements added the comment: Thanks for the comment Antoine. I understand that ctypeslib is old but it produces relatively mundane python code which is python version agnostic. Well, that's how it looks to me. I have not used cython mainly because it would make the distribution of my

[issue22773] Export Readline version and expect ANSI sequence for version 0x0600

2014-11-01 Thread David Edelsohn
Changes by David Edelsohn dje@gmail.com: -- title: Export Readline version and expect ANSI sequence for version 0x6000 - Export Readline version and expect ANSI sequence for version 0x0600 ___ Python tracker rep...@bugs.python.org

[issue22782] Python 3.4.2 Windows installer - cannot install 32 bit then 64 bit version

2014-11-01 Thread Steve Dower
Steve Dower added the comment: The 3.4 installer is still maintained by Martin. -- assignee: steve.dower - nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22782 ___

[issue15279] Spurious unittest warnings

2014-11-01 Thread Ezio Melotti
Ezio Melotti added the comment: I'm going to close this. If someone can reproduce it again, feel free to reopen it. -- resolution: - out of date stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue16056] shadowed test names in std lib regression tests

2014-11-01 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16056 ___ ___

[issue22452] addTypeEqualityFunc is not used in assertListEqual

2014-11-01 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22452 ___ ___ Python-bugs-list

[issue22364] Improve some re error messages using regex for hints

2014-11-01 Thread Ezio Melotti
Ezio Melotti added the comment: +1 on the idea. -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22364 ___ ___

[issue22731] test_capi test fails because of mismatched newlines

2014-11-01 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22731 ___

[issue22731] test_capi test fails because of mismatched newlines

2014-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset edb270e5c9c3 by Steve Dower in branch 'default': #22731 test_capi test fails because of mismatched newlines https://hg.python.org/cpython/rev/edb270e5c9c3 -- nosy: +python-dev ___ Python tracker

[issue16007] Improved Error message for failing re expressions

2014-11-01 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16007 ___ ___

[issue22734] marshal needs a lower stack depth for debug builds on Windows

2014-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset c2a3865a59f4 by Steve Dower in branch 'default': #22734 marshal needs a lower stack depth for debug builds on Windows https://hg.python.org/cpython/rev/c2a3865a59f4 -- nosy: +python-dev ___ Python

[issue22732] ctypes tests don't set correct restype for intptr_t functions

2014-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset a944fe09fae8 by Steve Dower in branch 'default': #22732 ctypes tests don't set correct restype for intptr_t functions https://hg.python.org/cpython/rev/a944fe09fae8 -- nosy: +python-dev ___ Python

[issue22734] marshal needs a lower stack depth for debug builds on Windows

2014-11-01 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22734 ___

[issue22732] ctypes tests don't set correct restype for intptr_t functions

2014-11-01 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22732 ___

[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-11-01 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21931 ___ ___

[issue21400] Code coverage documentation is out-of-date.

2014-11-01 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - patch review type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21400 ___

[issue21815] imaplib truncates some untagged responses

2014-11-01 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for the patches Lita, however it's better if you can upload a single patch with all the required changes. This will make it easier to apply/review it. -- stage: test needed - patch review ___ Python tracker

[issue22781] ctypes: Differing results between Python and C.

2014-11-01 Thread eryksun
eryksun added the comment: ctypes doesn't always handle bitfields correctly. In particular it doesn't adapt the storage unit size when packed. A bitfield based on c_uint is always stored in 4 bytes, even if _pack_ is set to 1. This is MSVC rules, so all is well on Windows. For example, from

[issue22781] ctypes: Differing results between Python and C.

2014-11-01 Thread Geoff Clements
Geoff Clements added the comment: Thank you eryksun for the explanation. It's much appreciated. I'll take a look at CFFI. On 1 Nov 2014 22:38, eryksun rep...@bugs.python.org wrote: eryksun added the comment: ctypes doesn't always handle bitfields correctly. In particular it doesn't adapt

[issue22697] Deadlock with writing to stderr from forked process

2014-11-01 Thread Nir Soffer
Nir Soffer added the comment: This is a duplicate of http://bugs.python.org/issue6721 -- nosy: +nirs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22697 ___

[issue17717] Set up nasm from external.bat

2014-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 28d18fdc52c4 by Zachary Ware in branch '2.7': Issue #17717: Pull NASM from svn.python.org for OpenSSL build. https://hg.python.org/cpython/rev/28d18fdc52c4 New changeset f7ed3e058fca by Zachary Ware in branch '3.4': Issue #17717: Pull NASM from

[issue22731] test_capi test fails because of mismatched newlines

2014-11-01 Thread Steve Dower
Steve Dower added the comment: As near as I can tell, Py_Initialize() is causing the stdout mode to change from O_TEXT to O_BINARY in _testembed. Looking at the output in this test, you can see the first printf('\n') (after 'Use defaults') is correctly translated, but the next '\n' comes

[issue17717] Set up nasm from external.bat

2014-11-01 Thread Zachary Ware
Zachary Ware added the comment: The patches for 2.7 and 3.4 were more trivial than for default, and I was pretty confident in the patch for default, so I went ahead and committed. I did switch around which end of PATH our copy of NASM was added to, to make it easier for someone to override

[issue17717] Set up nasm from external.bat

2014-11-01 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- components: +Build nosy: +tim.golden stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17717 ___

[issue22770] test_ttk_guionly and test_tk can cause Tk segfaults on OS X when run with regrtest -j option

2014-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset bd4dc351d670 by Ned Deily in branch '2.7': Issue #22770: Prevent some Tk segfaults on OS X when running gui tests. https://hg.python.org/cpython/rev/bd4dc351d670 New changeset 121517deb318 by Ned Deily in branch '3.4': Issue #22770: Prevent some Tk

[issue22770] test_ttk_guionly and test_tk can cause Tk segfaults on OS X when run with regrtest -j option

2014-11-01 Thread Ned Deily
Ned Deily added the comment: Applied for release in 2.7.9, 3.4.3, and 3.5.0. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22770

[issue18604] Consolidate gui available checks in test.support

2014-11-01 Thread Ned Deily
Ned Deily added the comment: The previous segfaults on OS X have been isolated to a problem in Cocoa Tk and an issue has been opened about it on the Tk issue tracker. See Issue22770 for details. Changesets applied to _is_gui_available() in that issue should prevent the segfaults by ensuring

[issue17896] Move Windows external libs from src\..\ to src\externals

2014-11-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: The patch looks pretty straightforward. Running the revised external.bat and then pcbuild.sln seem to give the same result as before. So this looks ready to me. As to Steve's merge question: since externals is ignored and not part of the python.org

[issue18604] Consolidate gui available checks in test.support

2014-11-01 Thread Zachary Ware
Zachary Ware added the comment: Thanks for tracking it down, Ned! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18604 ___ ___ Python-bugs-list

[issue17896] Move Windows external libs from src\..\ to src\externals

2014-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 62ce0f623154 by Zachary Ware in branch '2.7': Issue #17896: Move Windows external lib sources from .. to externals. https://hg.python.org/cpython/rev/62ce0f623154 New changeset b5e9bc4352e1 by Zachary Ware in branch '3.4': Issue #17896: Move

[issue17896] Move Windows external libs from src\..\ to src\externals

2014-11-01 Thread Zachary Ware
Zachary Ware added the comment: Thanks for the test, Terry. Committed. -- assignee: - zach.ware resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17896