[issue18472] Update PEP 8 to encourage modern conventions

2013-07-26 Thread Nick Coghlan
Nick Coghlan added the comment: Guido, if you have time to review these proposed PEP 8 changes, that would be great. Most should be unobjectionable, but I seem to recall you disliking the recommendation for third party function annotation experiments to use an explicit decorator, so I'm happy

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-26 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-26 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file30936/issue18472_pep_8_update.diff ___ Python tracker ___ ___ Python-bugs-l

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-26 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file30938/issue18472_pep_8_update3.diff ___ Python tracker ___ ___ Python-bugs-

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-26 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file30937/issue18472_pep_8_update2.diff ___ Python tracker ___ ___ Python-bugs-

[issue18533] Avoid error from repr() of recursive dictview

2013-07-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for backporting the fix. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mail

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-26 Thread Nick Coghlan
Nick Coghlan added the comment: Latest version is a more general cleanup patch for PEP 8 (hence the change in the issue title). Enumerating all the changes/additions: 1. Added an intro paragraph that makes it clear this is a living document, not "set and forget". 2. Added a couple more explic

[issue18537] bool.toggle()

2013-07-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: FYI, the itertools module has ifilterfalse() for inverse filtering. -- nosy: +rhettinger resolution: invalid -> rejected ___ Python tracker _

[issue18568] Support \e escape code in strings

2013-07-26 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue18568] Support \e escape code in strings

2013-07-26 Thread Steven D'Aprano
New submission from Steven D'Aprano: I'm adding this so there is a record in the bug tracker for posterity. No action is needed except to close it as a "Won't Fix". As per this discussion here: http://mail.python.org/pipermail/python-ideas/2013-June/021318.html using \e as an escape code for

[issue18565] Test for closing delegating generator with cleared frame (Issue17669)

2013-07-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks! It looks good except I think you could use the support.disable_gc() context manager. -- ___ Python tracker ___ _

[issue18567] Python 2.7.5 CENTOS6 Error building dbm using bdb

2013-07-26 Thread Denise Mauldin
Denise Mauldin added the comment: I installed bsddb3-6.0.0, db-6.0.20.NC, and gdbm-1.10 on a 2.6.32-358.11.1.el6.x86_64 CENTOS6 linux server and continue to run into the Segmentation fault. Not sure what's going on. -- ___ Python tracker

[issue18567] Python 2.7.5 CENTOS6 Error building dbm using bdb

2013-07-26 Thread Denise Mauldin
New submission from Denise Mauldin: CC='gcc -pthread' LDSHARED='gcc -pthread -shared -L/u5/tools/lib -L/u5/tools/lib64' OPT='-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py $quiet build running build running build_ext building dbm using bdb building '_bsddb' extension

[issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError

2013-07-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti, michael.foord stage: -> needs patch ___ Python tracker ___ ___ Pyth

[issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError

2013-07-26 Thread py.user
New submission from py.user: http://docs.python.org/3/library/unittest.html#unittest.TestCase.setUp "any exception raised by this method will be considered an error rather than a test failure" http://docs.python.org/3/library/unittest.html#unittest.TestCase.tearDown "Any exception raised by thi

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-26 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan title: PEP 8 updates - internal interfaces and import * -> Update PEP 8 to encourage modern conventions ___ Python tracker __

[issue18324] set_payload does not handle binary payloads correctly

2013-07-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the third version of the patch. I am not sure what to do with the invalid data for base64 and uuencode. I decided to raise exception instead of converting it to None silently. -- Added file: http://bugs.python.org/file31049/set_payload_binary_v3.

[issue18553] os.isatty() is not Unix only

2013-07-26 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> needs patch type: -> behavior versions: -Python 3.1, Python 3.2, Python 3.5 ___ Python tracker ___ ___

[issue18418] Thread.isAlive() sometimes True after fork

2013-07-26 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: By the way, I'm going on vacation through August 4. When I return I'll check if there's anything else I need to do to help resolve this. On Thursday, July 25, 2013, A. Jesse Jiryu Davis wrote: > > A. Jesse Jiryu Davis added the comment: > > (Sorry about t

[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-07-26 Thread STINNER Victor
STINNER Victor added the comment: I didn't know Py_FrozenMain(). I upgraded it to use the same code than main(). Should I backport my fixes to Python 3.3 (except maybe 0001c4100823 which is risky). -- nosy: +haypo ___ Python tracker

[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 12af9db5212a by Victor Stinner in branch '3.3': Issue #15893: Remove dead code http://hg.python.org/cpython/rev/12af9db5212a -- ___ Python tracker

[issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc()

2013-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1cba6687993e by Victor Stinner in branch 'default': Issue #18203: Replace PyMem_Malloc() with PyMem_RawMalloc() at Python initialization http://hg.python.org/cpython/rev/1cba6687993e -- ___ Python tracke

[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 47c6aa17fd90 by Victor Stinner in branch 'default': Issue #15893: Improve error handling in main() and Py_FrozenMain() http://hg.python.org/cpython/rev/47c6aa17fd90 -- ___ Python tracker

[issue18565] Test for closing delegating generator with cleared frame (Issue17669)

2013-07-26 Thread Phil Connell
New submission from Phil Connell: This is a testcase for issue17669 - it passes against the latest default (and hits the same segfault under 3.3.0). I came up with this while tracking down a thorny generator finalisation crash that turned out to be a variant on 17669. The root cause was gen_

[issue18558] Iterable glossary entry needs clarification

2013-07-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Stephen, your class, or rather instances thereof when initialized with a sequence, follow the old iteration protocol. You might call them iterators in the generic sense, though I cannot remember whether we used 'iterator' much before the introduction of the ne

[issue11152] pb in zipfile module

2013-07-26 Thread Damien M Calloway
Changes by Damien M Calloway : -- nosy: +dmcalloway ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue18548] In unittest doc change WidgetTestCase to SimpleWidgetTestCase in suite()

2013-07-26 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +ezio.melotti, michael.foord stage: -> patch review versions: +Python 3.3 ___ Python tracker ___ ___

[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset ab8121466785 by Victor Stinner in branch '3.3': Issue #15893: frozenmain.c now handles PyMem_Malloc() failure http://hg.python.org/cpython/rev/ab8121466785 New changeset 386ab2c12301 by Victor Stinner in branch 'default': (Merge 3.3) Issue #15893: f

[issue18369] X509 cert class for ssl module

2013-07-26 Thread Derek Wilson
Derek Wilson added the comment: For ssl.match_hostname to work with this, you need to get the info dict first. I've attached at patch for it. -- nosy: +underrun Added file: http://bugs.python.org/file31047/ssl_pyx509cert_match_hostname_fix.patch ___

[issue18552] obj2ast_object() doesn't check return value of PyArena_AddPyObject()

2013-07-26 Thread Christian Heimes
Changes by Christian Heimes : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue18552] obj2ast_object() doesn't check return value of PyArena_AddPyObject()

2013-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 65121aa79ab3 by Christian Heimes in branch '3.3': Issue #18552: Check return value of PyArena_AddPyObject() in obj2ast_object(). http://hg.python.org/cpython/rev/65121aa79ab3 New changeset ad90fc28769a by Christian Heimes in branch 'default': Issue

[issue18561] ctypes _build_callargs() doesn't check name for NULL

2013-07-26 Thread Christian Heimes
Christian Heimes added the comment: Thanks! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue18552] obj2ast_object() doesn't check return value of PyArena_AddPyObject()

2013-07-26 Thread STINNER Victor
STINNER Victor added the comment: -Py_XINCREF(obj); +Py_INCREF(obj); This change is not correct. Here is an updated patch. -- nosy: +haypo Added file: http://bugs.python.org/file31046/obj2ast_object.patch ___ Python tracker

[issue18539] Idle 2.7: Calltip wrong if def contains float default value

2013-07-26 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue18539] Idle 2.7: Calltip wrong if def contains float default value

2013-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3236709650b0 by Terry Jan Reedy in branch '2.7': Issue #18539: Calltips now work for float default arguments. http://hg.python.org/cpython/rev/3236709650b0 -- nosy: +python-dev ___ Python tracker

[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2013-07-26 Thread Indra Talip
Indra Talip added the comment: Ah sorry you are right the tests didn't test the specific case of someone overriding the OpenerDirector. The intent was to demonstrate that adding a default timeout to Request didn't break things. I think you are right about how much of an issue this is. I agree

[issue18555] type_set_bases() doesn't check return value of PyArg_UnpackTuple()

2013-07-26 Thread Christian Heimes
Changes by Christian Heimes : -- resolution: -> wont fix stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue18529] Use long dash

2013-07-26 Thread Éric Araujo
Éric Araujo added the comment: This looks like the kind of high-churn, low-benefit patches that we typically encourage new contributors not to do. It’s fine to update dashes when modifying the surrounding text for another fix, and it may be useful to encourage using them in the markup docs, b

[issue18528] Possible fd leak in socketmodule

2013-07-26 Thread STINNER Victor
STINNER Victor added the comment: @pitrou: Does accept.patch look correct? I don't understand why we would call accept() more than once. -- ___ Python tracker ___ __

[issue18528] Possible fd leak in socketmodule

2013-07-26 Thread STINNER Victor
STINNER Victor added the comment: http://bugs.python.org/file31016/closesock3.patch looks overkill. For example, BEGIN_SELECT_LOOP already sets errno to 0. Here is a simpler patch. -- nosy: +haypo Added file: http://bugs.python.org/file31045/accept.patch __

[issue18561] ctypes _build_callargs() doesn't check name for NULL

2013-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 57457028dd7a by Christian Heimes in branch '3.3': Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL. http://hg.python.org/cpython/rev/57457028dd7a New changeset d543829eda7d by Christian Heimes in branch 'default': Issue #18561: S

[issue18561] ctypes _build_callargs() doesn't check name for NULL

2013-07-26 Thread STINNER Victor
STINNER Victor added the comment: _get_arg() should skip not check keywords if name is NULL (which looks to be a valid case, since name is check at the end of the function). -- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file31044/issue18561.patch _

[issue18560] builtin_sum() doesn't check return value of PyLong_FromLong()

2013-07-26 Thread Christian Heimes
Christian Heimes added the comment: Thanks again! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue15892] _PyImport_GetDynLoadFunc() doesn't check return value of fstat()

2013-07-26 Thread Christian Heimes
Christian Heimes added the comment: I wonder why I did not mention the issue # in the checkin message... Thanks :) -- ___ Python tracker ___ _

[issue18560] builtin_sum() doesn't check return value of PyLong_FromLong()

2013-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset de7e4fd634fb by Christian Heimes in branch '3.3': Issue #18560: Fix potential NULL pointer dereference in sum() http://hg.python.org/cpython/rev/de7e4fd634fb New changeset a5d9e2f3f6c7 by Christian Heimes in branch 'default': Issue #18560: Fix poten

[issue15892] _PyImport_GetDynLoadFunc() doesn't check return value of fstat()

2013-07-26 Thread STINNER Victor
STINNER Victor added the comment: changeset: 84741:654268ff29b5 branch: 3.3 parent: 84736:ce771c2d0220 user:Christian Heimes date:Sat Jul 20 22:17:55 2013 +0200 files: Python/dynload_shlib.c description: Check return value of fstat() in _PyImport_GetDynLoadFunc

[issue18560] builtin_sum() doesn't check return value of PyLong_FromLong()

2013-07-26 Thread STINNER Victor
STINNER Victor added the comment: The patch looks good to me. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue15892] _PyImport_GetDynLoadFunc() doesn't check return value of fstat()

2013-07-26 Thread Christian Heimes
Christian Heimes added the comment: Already fixed -- resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue791968] Arguments tooltip wrong if def contains tuple

2013-07-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: If someone pushes a patch and closes the issue and the buildbots break, reopening the issue is the appropriate response. Too much later and the pool of potentially interested people will have changed. Anyway, the new issue is #18539. -- nosy: +terry.r

[issue18559] _pickle: NULL ptr dereference when PyLong_FromSsize_t() fails

2013-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset dbdd07657e23 by Christian Heimes in branch '3.3': Issue #18559: Fix NULL pointer dereference error in _pickle module http://hg.python.org/cpython/rev/dbdd07657e23 New changeset b33f81974516 by Christian Heimes in branch 'default': Issue #18559: Fix

[issue18559] _pickle: NULL ptr dereference when PyLong_FromSsize_t() fails

2013-07-26 Thread Christian Heimes
Christian Heimes added the comment: Thanks Victor -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue18559] _pickle: NULL ptr dereference when PyLong_FromSsize_t() fails

2013-07-26 Thread STINNER Victor
STINNER Victor added the comment: The patch looks good to me. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18504] IDLE:Improvements- Improving Mock_Text

2013-07-26 Thread R. Jayakrishnan
R. Jayakrishnan added the comment: Yes,correcting myself. I should aim indexes which actual idlelib uses. Thank you Terry for the grammar. Fighting with the index parsing last week, and finally came up with a level to break the index into base and modifier and decode it along with using regula

[issue18519] test_sqlite crashes on OS X tiger 3.x buildbot

2013-07-26 Thread STINNER Victor
STINNER Victor added the comment: > I take it the overflow error is the only one the C code > could ever raise? If so, the patch looks good to me. Yes, _PyLong_AsInt() was the last function raising Python exception (without clearing it). Thanks for your help on fixing this function -

[issue18519] test_sqlite crashes on OS X tiger 3.x buildbot

2013-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset f7a0a4e0ada4 by Victor Stinner in branch 'default': Issue #18519: the Python authorizer callback of sqlite3 must not raise Python exceptions http://hg.python.org/cpython/rev/f7a0a4e0ada4 -- ___ Python tr

[issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple

2013-07-26 Thread paul j3
paul j3 added the comment: This patch fixes the problem by joining the metavar terms with '|'. So the help for the test case (adapted from an existing tuple test) looks like: usage: PROG [-h] W1 [W2 ...] [X1 [X2 ...]] Y1 Y2 Y3 [Z1] positional arguments: W1|W2 w X1|X2

[issue18538] `python -m dis ` should use argparse

2013-07-26 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: `python -m dis ` relying on argparse -> `python -m dis ` should use argparse versions: +Python 3.4 -Python 3.5 ___ Python tracker ___ _

[issue18564] Integer overflow in socketmodule

2013-07-26 Thread Michele Orrù
New submission from Michele Orrù: In Modules/socketmodule.c , the bluetooth address supplied is vulnerable to integer overflow. Attaching patch and a couple of tests, which should be considered as a step forward in #7687. -- components: Extension Modules files: btoverflow.patch keywor

[issue18538] `python -m dis ` relying on argparse

2013-07-26 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue16360] argparse: comma in metavar causes assertion failure when formatting long usage message

2013-07-26 Thread paul j3
paul j3 added the comment: My rewrite of _format_actions_usage in http://bugs.python.org/issue11874 should take care of this issue. It keeps the groups and actions separate until the final formatting step, bypassing the regular expression parsing. -- nosy: +paul.j3 __

[issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple

2013-07-26 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue18563] No unit test for yiq to rgb and rgb to yiq converting functions

2013-07-26 Thread Vajrasky Kok
New submission from Vajrasky Kok: Module colorsys has hsv_to_rgb, rgb_to_hsv, hls_to_rgb, rgb_to_hls, yiq_to_rgb, rgb_to_yig public API functions. But only hsv_to_rgb, rgb_to_hsv, hls_to_rgb, rgb_to_hls functions are being unit tested. Attached the patch for adding unit test to cover the yiq_t

[issue18562] Regex howto: revision pass

2013-07-26 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +ezio.melotti versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue18562] Regex howto: revision pass

2013-07-26 Thread A.M. Kuchling
New submission from A.M. Kuchling: I read through the 3.3 regex howto and have made various edits in the attached patch. * describe how \w is different when used in bytes and Unicode patterns. * describe re.ASCII flag to change that behaviour. * remove a personal reference ('I generally prefe

[issue12978] Figure out extended attributes on BSDs

2013-07-26 Thread Ronald Oussoren
Ronald Oussoren added the comment: The OSX API also has a "position" argument for both getting and setting extended attributes. The position should be 0 for normal attributes, and can have other values when accessing the resource fork of a file. --

[issue18561] ctypes _build_callargs() doesn't check name for NULL

2013-07-26 Thread Christian Heimes
New submission from Christian Heimes: http://hg.python.org/cpython/file/40bec72df2a1/Modules/_ctypes/_ctypes.c#l3565 3565case PARAMFLAG_FIN: 3566/* 'in' parameter. Copy it from inargs. */ CID 486199 (#1 of 1): Explicit null dereferenced (FORWARD_NULL) 31. var_deref_model: Pa

[issue18560] builtin_sum() doesn't check return value of PyLong_FromLong()

2013-07-26 Thread Christian Heimes
New submission from Christian Heimes: 2032result = PyLong_FromLong(i_result); CID 1058287 (#1 of 1): Dereference null return value (NULL_RETURNS) 34. dereference: Dereferencing a pointer that might be null "result" when calling "PyNumber_Add(PyObject *, PyObject *)". [show details] 2

[issue12978] Figure out extended attributes on BSDs

2013-07-26 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue18559] _pickle: NULL ptr dereference when PyLong_FromSsize_t() fails

2013-07-26 Thread Christian Heimes
New submission from Christian Heimes: Two functions in _pickle Py_DECREF() a variable although it may be NULL. The patch corrects the error handling paths. CID 1058277 CID 1058278 -- components: Extension Modules files: pickle_pylong_null.patch keywords: patch messages: 193729 nosy: c

[issue8079] make install fails with -j8 with python2.6/config on FreeBSD

2013-07-26 Thread Christian Heimes
Christian Heimes added the comment: I have never seen that kind of error with Python 2.7 or 3.3+. It's probably fixed. -- nosy: +christian.heimes resolution: -> out of date stage: -> committed/rejected status: open -> closed type: -> compile error ___

[issue18555] type_set_bases() doesn't check return value of PyArg_UnpackTuple()

2013-07-26 Thread Christian Heimes
Christian Heimes added the comment: Ah, you are right! Good catch :) I have marked CID 486265 as intentional / ignore. -- priority: normal -> low stage: needs patch -> ___ Python tracker _

[issue18555] type_set_bases() doesn't check return value of PyArg_UnpackTuple()

2013-07-26 Thread Ronald Oussoren
Ronald Oussoren added the comment: This appears to be harmless. The contents of the "temp" list are added by mro_subclasses, and that function only adds tuples of 2 elements. That means that the call to PyArg_UnpackTuple cannot fail. It might be better to explicitly document this, either using