Roundup Robot | 30 Sep 14:58 2014

[issue458343] distutils should zap .o as well as .so


Roundup Robot added the comment:

New changeset 94af1af93670 by Antoine Pitrou in branch 'default':
Remove pointless "vile hack" that can cause the build step to fail when some extension modules can't be imported.
https://hg.python.org/cpython/rev/94af1af93670

----------
nosy: +python-dev

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue458343>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org

Matthias Klose | 30 Sep 14:50 2014

[issue22523] [regression] Lib/ssl.py still references _ssl.sslwrap


New submission from Matthias Klose:

the backport in issue #21308 caused this regression. _ssl.sslwrap is still referenced in some files.

----------
components: Library (Lib)
messages: 227896
nosy: alex, benjamin.peterson, christian.heimes, doko, dstufft, giampaolo.rodola, janssen, pitrou
priority: release blocker
severity: normal
status: open
title: [regression] Lib/ssl.py still references _ssl.sslwrap
versions: Python 2.7

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22523>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org

Claudiu Popa | 30 Sep 13:28 2014

[issue22522] sys.excepthook doesn't receive the traceback when called from code.InteractiveInterpreter


New submission from Claudiu Popa:

It seems that sys.excepthook doesn't receive the traceback when an error occurs during a
code.InteractiveInterpreter run. The problem is here:
https://hg.python.org/cpython/file/5ade1061fa3d/Lib/code.py#l168. last_tb was previously set
to None right before. The attached patch passes sys.last_traceback to sys.excepthook.

----------
components: Library (Lib)
files: code_excepthook_traceback.patch
keywords: patch
messages: 227881
nosy: Claudiu.Popa, r.david.murray
priority: normal
severity: normal
status: open
title: sys.excepthook doesn't receive the traceback when called from code.InteractiveInterpreter
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file36759/code_excepthook_traceback.patch

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22522>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org

(Continue reading)

STINNER Victor | 30 Sep 13:15 2014

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


New submission from STINNER Victor:

On buildbots FreeBSD 6.4 and 7.2, the compilation of the ctypes module fails because the function
"ffi_call_win32" is missing. I don't understand why a "win32" function would be needed on FreeBSD!?

http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%203.x/builds/5618/steps/test/logs/stdio

http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.x/builds/5060/steps/compile/logs/stdio

*** WARNING: renaming "_ctypes" since importing it failed:
build/lib.freebsd-6.4-RELEASE-i386-3.5-pydebug/_ctypes.so: Undefined symbol "ffi_call_win32"

----------
messages: 227878
nosy: haypo, koobs
priority: normal
severity: normal
status: open
title: ctypes compilation fails on FreeBSD: Undefined symbol "ffi_call_win32"
type: compile error
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22521>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org
(Continue reading)

paul | 29 Sep 23:04 2014

[issue22520] integer overflow in computing unicode's object representation


New submission from paul:

# unicode_repr(PyObject *unicode)
# {
#     ...
# 1   isize = PyUnicode_GET_LENGTH(unicode);
#     idata = PyUnicode_DATA(unicode);
# 
#     /* Compute length of output, quote characters, and
#        maximum character */
#     osize = 0;
#     ...
#     for (i = 0; i < isize; i++) {
#         Py_UCS4 ch = PyUnicode_READ(ikind, idata, i);
#         switch (ch) {
#         ...
#         default:
#             /* Fast-path ASCII */
#             if (ch < ' ' || ch == 0x7f)
# 2               osize += 4; /* \xHH */ 
#             ...
#         }
#     }
# 
#     ...
# 3   repr = PyUnicode_New(osize, max);
#     ...
#         for (i = 0, o = 1; i < isize; i++) {
#             Py_UCS4 ch = PyUnicode_READ(ikind, idata, i);
(Continue reading)

paul | 29 Sep 23:03 2014

[issue22519] integer overflow in computing byte's object representation


New submission from paul:

# PyBytes_Repr(PyObject *obj, int smartquotes)
# {
#     PyBytesObject* op = (PyBytesObject*) obj;
# 1   Py_ssize_t i, length = Py_SIZE(op);
#     size_t newsize, squotes, dquotes;
#     ...
# 
#     /* Compute size of output string */
#     newsize = 3; /* b'' */
#     s = (unsigned char*)op->ob_sval;
#     for (i = 0; i < length; i++) {
#       ...
#         default:
#             if (s[i] < ' ' || s[i] >= 0x7f)
# 2               newsize += 4; /* \xHH */
#             else
#                 newsize++;
#         }
#     }
#     ...
# 3   if (newsize > (PY_SSIZE_T_MAX - sizeof(PyUnicodeObject) - 1)) {
#       PyErr_SetString(PyExc_OverflowError,
#         "bytes object is too large to make repr");
#       return NULL;
#     }
# 4   v = PyUnicode_New(newsize, 127);
#     ...
(Continue reading)

paul | 29 Sep 23:01 2014

[issue22518] integer overflow in encoding unicode


New submission from paul:

# static PyObject *
# unicode_encode_ucs1(PyObject *unicode,
#                     const char *errors,
#                     unsigned int limit)
# {
#     ...
#     while (pos < size) {
#       ...
#             case 4: /* xmlcharrefreplace */
#                 /* determine replacement size */
#                 for (i = collstart, repsize = 0; i < collend; ++i) {
#                     Py_UCS4 ch = PyUnicode_READ(kind, data, i);
#                     ...
#                     else if (ch < 100000)
# 1                       repsize += 2+5+1;
#                     ...
#                 }
# 2               requiredsize = respos+repsize+(size-collend);
#                 if (requiredsize > ressize) {
#                     ...
#                     if (_PyBytes_Resize(&res, requiredsize))
#                     ...
#                 }
#                 /* generate replacement */
#                 for (i = collstart; i < collend; ++i) {
# 3                   str += sprintf(str, "&#%d;", PyUnicode_READ(kind, data, i)); 
#                 }
(Continue reading)

paul | 29 Sep 22:59 2014

[issue22517] BufferedRWpair doesn't clear weakrefs


New submission from paul:

# static void
# bufferedrwpair_dealloc(rwpair *self)
# {
#     _PyObject_GC_UNTRACK(self);
#     Py_CLEAR(self->reader);
#     Py_CLEAR(self->writer);
#     Py_CLEAR(self->dict);
#     Py_TYPE(self)->tp_free((PyObject *) self);
# }
# 
# Weakrefs to this object contain stale pointer after BufferedRWPair is freed.

----------
files: poc_brwpair_weakref.py
messages: 227835
nosy: pkt
priority: normal
severity: normal
status: open
title: BufferedRWpair doesn't clear weakrefs
type: crash
versions: Python 3.4
Added file: http://bugs.python.org/file36753/poc_brwpair_weakref.py

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22517>
(Continue reading)

J. Morton | 29 Sep 22:36 2014

[issue22516] Windows Installer won't - even when using "just for me"option


New submission from J. Morton:

Could not install 3.4.1 on Windows 7 Enterprise SP1 using the .MSI installer, even when using the ”just
for me” option (our IM department has not given us the necessary rights to run the .MSI installer even in
this mode). 
Please consider providing 3.4.1 (and all future releases) in a non “.MSI” file so that  “admin”
rights are not needed to do the install (a simple ZIP file?  something similar to www.portableapps.com ?). 
Or as a source “tarball” for Windows machines – ideally one that is independent of compiler vendor
(compileable using gcc, etc. instead of MSVC).

----------
components: Installation
messages: 227832
nosy: NaCl, tim.golden
priority: normal
severity: normal
status: open
title: Windows Installer won't - even when using "just for me"option
versions: Python 3.4

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22516>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org

(Continue reading)

Ram Rachum | 29 Sep 21:33 2014

[issue22515] Implement partial order on Counter


New submission from Ram Rachum:

I suggest implementing `Counter.__lt__` which will be a partial order, similarly to `set.__lt__`. That
is, one counter will be considered smaller-or-equal to another if for any item in the first counter, the
second counter has an equal or bigger amount of that item.

----------
components: Library (Lib)
messages: 227819
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Implement partial order on Counter
versions: Python 3.5

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue22515>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org

[issue22514] incomplete programming example on python.org


New submission from Friedrich Spee von Langenfeld:

When I open www.python.org, there are some examples to demonstrate the "look and feel" of Python. I´ve
tested an example (example number 1). Online, the following is shown:
# Python 3: Fibonacci series up to n
>>> def fib(n):
>>>     a, b = 0, 1
>>>     while a < n:
>>>         print(a, end=' ')
>>>         a, b = b, a+b
>>>     print()
>>> fib(1000)
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610

But then I have tested the (following) code with Python 3.1:
>>> def fib(n):
	 a, b = 0, 1
	 while a < n:
 		print(a, end=" ")
		a, b = b, a+b
 	 print()
	

>>> fib(1000)
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987

As you can see, the last number(987)wasn´t shown online. Perhaps, this behavior is browser-dependent.
I´ve used Mozilla Firefox 32.0.3 .
I can´t estimate the priority of this issue, because I can´t imagine how many people are using or
(Continue reading)


Gmane