[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 an assert() or by 
calling Py_FatalError.

--
nosy: +ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: _pickle: NULL ptr dereference when PyLong_FromSsize_t() fails
type: crash
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31037/pickle_pylong_null.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
2033temp = PyNumber_Add(result, item);

--
components: Interpreter Core
files: builtin_sum.patch
keywords: patch
messages: 193730
nosy: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: builtin_sum() doesn't check return value of PyLong_FromLong()
type: crash
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31038/builtin_sum.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: Passing null pointer "name" to function "_get_arg(int *, 
PyObject *, PyObject *, PyObject *, PyObject *)", which dereferences it. [show 
details]
3567ob =_get_arg(&inargs_index, name, defval, inargs, kwds);

--
components: Extension Modules
messages: 193731
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: ctypes _build_callargs() doesn't check name for NULL
type: behavior
versions: Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 prefer...')

* some small edits and re-wording.

--
assignee: docs@python
components: Documentation
files: regex.diff
keywords: patch
messages: 193733
nosy: akuchling, docs@python
priority: normal
severity: normal
stage: patch review
status: open
title: Regex howto: revision pass
versions: Python 3.3
Added file: http://bugs.python.org/file31039/regex.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_to_rgb, rgb_to_yig 
functions as well.

--
components: Tests
files: unit_test_for_yiq.txt
messages: 193734
nosy: vajrasky
priority: normal
severity: normal
status: open
title: No unit test for yiq to rgb  and rgb to yiq converting functions
versions: Python 3.4
Added file: http://bugs.python.org/file31040/unit_test_for_yiq.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
keywords: patch
messages: 193736
nosy: maker
priority: normal
severity: normal
status: open
title: Integer overflow in socketmodule
type: behavior
Added file: http://bugs.python.org/file31041/btoverflow.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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   x
  Y1|Y2|Y3y
  Z1  z

Alternatives include:
- use ',',' ',or '/' instead of '|'
- use just the 1st item of the tuple
- use the default (non-tuple) metavar in the help line
These all pass existing tests.

The last alternative would use:

#metavar = '|'.join(metavar)
if len(metavar)>1:
metavar = default
else:
metavar = metavar[0]

--
keywords: +patch
Added file: http://bugs.python.org/file31042/issue14074.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 regular expressions.
Now the mock_tk attached at this patch passes all the existing test cases, and 
failing the new test I have written on text_test

The problem now I am dealing with is, there are four exceeding conditions I 
have to handle which make errors.
1.returning line  < 0
2.returning line  > last line
3.returning char  < 0 
4.returning char > its line length

For example, in parsing base the return line may exceed last line but the 
modifier will say '-2lines'  doing that, now the return line is not exceeding 
last line.

--
keywords: +patch
Added file: http://bugs.python.org/file31043/mocktk_decodeByRE1.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 NULL pointer dereference error in _pickle module
http://hg.python.org/cpython/rev/b33f81974516

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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()
CID 486250

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 potential NULL pointer dereference in sum()
http://hg.python.org/cpython/rev/a5d9e2f3f6c7

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: Skip name in ctypes' _build_callargs() if name is NULL.
http://hg.python.org/cpython/rev/d543829eda7d

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, but not to do one big change.

--
nosy: +eric.araujo, r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 that if you 
are overriding open you probably should be replicating it's functionality and 
doing something sane about the timeout parameter.

Reading the code and the online docs I think that the more pertinent issue here 
is that it isn't documented how the timeout is passed to the handlers. That is 
if someone implements a new handler that could timeout just from reading the 
documentation it isn't clear how the timeout is passed to the handler. Given 
that open adds the timeout to the Request object perhaps the issue should be 
that the timeout attribute should be added to the public api of the Request and 
the docs modified to suit, thus making it explicit how handlers get the 
expected timeout. That does uglify the api though as you would have two places 
where you could set the timeout (on the Request and via open) and currently 
calling open with a Request, with a non-default timeout, means that open would 
override the timeout on the Request with whatever was set on the call to open.

So overall I'm fairly ambivalent about how much of an issue the original report 
was. I think the larger issue is that how timeouts are handled/passed to 
handlers/processors should probably be documented.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 #18552: Check return value of PyArena_AddPyObject() in obj2ast_object().
http://hg.python.org/cpython/rev/ad90fc28769a

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: frozenmain.c now handles PyMem_Malloc() failure
http://hg.python.org/cpython/rev/386ab2c12301

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 new and now dominant iteration protocol. I am 
sure 'iterable' was introduced with the new protocol for objects with .__iter__ 
methods that return iterators, which in this context means an object with a 
.__next__ method and excludes .__getitem__ objects.

It would have been less confusing is we had disabled the old protocol in 3.0, 
but aside from the predictable confusion, it seemed better to keep it.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_close being called on a generator that's delegating to 
another, and whose frame has already had frame_clear called (so f_stacktop is 
NULL).

It's reproduced by creating a reference cycle that's broken by clearing the 
delegating generator's frame.

--
components: Interpreter Core
files: gen_close_with_cleared_frame.diff
keywords: patch
messages: 193765
nosy: benjamin.peterson, isoschiz, pconnell
priority: normal
severity: normal
status: open
title: Test for closing delegating generator with cleared frame (Issue17669)
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file31048/gen_close_with_cleared_frame.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the extraneous XML file from my IDE, I made a mistake and
> allowed the diff to include it.)
>
> --
>
> ___
> Python tracker >
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 this method will be considered an error rather than a 
test failure."


utest.py

#!/usr/bin/env python3

import unittest

class Test(unittest.TestCase):

def setUp(self):
raise AssertionError

def tearDown(self):
raise AssertionError

def test_nothing(self):
pass



[guest@localhost py]$ python3 -m unittest -v utest
test_nothing (utest.Test) ... FAIL

==
FAIL: test_nothing (utest.Test)
--
Traceback (most recent call last):
  File "./utest.py", line 8, in setUp
raise AssertionError
AssertionError

--
Ran 1 test in 0.000s

FAILED (failures=1)
[guest@localhost py]$


also raising unittest.SkipTest works properly

--
assignee: docs@python
components: Documentation
messages: 193772
nosy: docs@python, py.user
priority: normal
severity: normal
status: open
title: In unittest.TestCase docs for setUp() and tearDown() don't mention 
AssertionError
type: enhancement
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
gcc -pthread -fPIC -fno-strict-aliasing -fPIC -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I/usr/include -I. -IInclude -I./Include 
-I/u5/tools/include -I/usr/include -I/usr/local/include 
-I/u5/src/Python-2.7.5/Include -I/u5/src/Python-2.7.5 -c 
/u5/src/Python-2.7.5/Modules/_bsddb.c -o 
build/temp.linux-x86_64-2.7/u5/src/Python-2.7.5/Modules/_bsddb.o
/u5/src/Python-2.7.5/Modules/_bsddb.c: In function âDB_set_bt_compareâ:
/u5/src/Python-2.7.5/Modules/_bsddb.c:2764: warning: passing argument 2 of 
âself->db->set_bt_compareâ from incompatible pointer type
/u5/src/Python-2.7.5/Modules/_bsddb.c:2764: note: expected âint (*)(struct DB 
*, const struct DBT *, const struct DBT *, size_t *)â but argument is of type 
âint (*)(struct DB *, const struct DBT *, const struct DBT *)â
/u5/src/Python-2.7.5/Modules/_bsddb.c: In function âDB_set_dup_compareâ:
/u5/src/Python-2.7.5/Modules/_bsddb.c:2878: warning: passing argument 2 of 
âself->db->set_dup_compareâ from incompatible pointer type
/u5/src/Python-2.7.5/Modules/_bsddb.c:2878: note: expected âint (*)(struct DB 
*, const struct DBT *, const struct DBT *, size_t *)â but argument is of type 
âint (*)(struct DB *, const struct DBT *, const struct DBT *)â
/u5/src/Python-2.7.5/Modules/_bsddb.c: In function âDBSequence_get_cachesizeâ:
/u5/src/Python-2.7.5/Modules/_bsddb.c:8565: warning: pointer targets in passing 
argument 2 of âself->sequence->get_cachesizeâ differ in signedness
/u5/src/Python-2.7.5/Modules/_bsddb.c:8565: note: expected âu_int32_t *â but 
argument is of type âint *â
gcc -pthread -shared -L/u5/tools/lib -L/u5/tools/lib64 -L/u5/tools/lib 
-L/u5/tools/lib64 -fPIC 
build/temp.linux-x86_64-2.7/u5/src/Python-2.7.5/Modules/_bsddb.o -L/usr/lib64 
-L/u5/tools/lib -L/u5/tools/lib64 -L/lib -L/usr/lib -L/lib64 -L/usr/lib64 
-L/usr/local/lib -Wl,-R/usr/lib64 -ldb-4.7 -o 
build/lib.linux-x86_64-2.7/_bsddb.so
*** WARNING: renaming "_bsddb" since importing it failed: 
build/lib.linux-x86_64-2.7/_bsddb.so: undefined symbol: db_full_version
Segmentation fault (core dumped)

--
components: Build
messages: 193773
nosy: Denise.Mauldin
priority: normal
severity: normal
status: open
title: Python 2.7.5 CENTOS6 Error building dbm using bdb
type: crash
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 ASCII ESC character might be nice to have, but 
it fails backwards compatibility and therefore must be ruled out.

(But perhaps could be re-visited in Python 4000?)

--
components: Interpreter Core
messages: 193776
nosy: stevenjd
priority: normal
severity: normal
status: open
title: Support \e escape code in strings

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 explicit reasons to the "foolish consistency" section, 
and tweaked the header for that list to help make it clearer that there may be 
other good reasons, these are just especially good ones.

3. Updated the tabs and spaces section for Python 3

4. Changed the rationale for the line length limit. These days, it is about 
side-by-side editor windows, diff tools, and online text editing widgets, not 
ancient terminals with limited column widths.

5. Cleaned up the encoding cookie guidelines for Python 3

6. Changed the absolute vs explicit relative import discussion to state that 
while absolute imports are recommended, there are valid reasons to use explicit 
relative imports. Added an explicit admonition that the standard library should 
always absolute imports, and that *nobody* should use implicit relative imports.

7. Added a guideline to avoid wildcard imports

8. The new section on public vs internal interfaces

9. Clarified that it's not just Jython that omits the += hack, and that it is 
fairly easy to break it in CPython, too.

10. Added a guideline about using def rather than assigning a lambda to a name.

11. Rewrote the class based exception guideline to account for the requirement 
that all exceptions inherit from BaseException, as well as the exception 
hierarchy design lessons we have learned that led to the creation of PEP 3151 
(which explicitly *rejects* the per-module generic exception approach 
previously recommended by PEP 8)

12. Clarified what a "non-error exception" might be used for.

13. Added a guideline about exception chaining

14. For the exception raising guideline, moved Python 3 compatibility up as the 
main motivating factor

15. Added a guideline about using the "as" clause to bind a caught exception to 
a name

16. Added a guideline explicitly favouring PEP 3151 based exception handling 
over errno introspection

17. Added a note about the Python 3 text model changes to the isinstance 
guideline

18. Added a recommendation that third party experiments with function 
annotations combine them with a decorator that indicates how they're to be 
interpreted

--
Added file: http://bugs.python.org/file31050/issue18472_pep_8_update4.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to drop that one if you don't like it.

I'm also willing to send it back to python-dev at large for further feedback, 
but I'm not sure that's necessary (the two big changes are the ones about 
public APIs and the import recommendations, and those have had discussion 
threads already)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com