From report at bugs.python.org Sat Oct 1 00:22:52 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 01 Oct 2016 04:22:52 +0000 Subject: [issue28275] LZMADecompressor.decompress Use After Free In-Reply-To: <1474864416.3.0.139133662072.issue28275@psf.upfronthosting.co.za> Message-ID: <1475295772.45.0.687982888859.issue28275@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 01:25:25 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Oct 2016 05:25:25 +0000 Subject: [issue27897] Avoid possible crash in pysqlite_connection_create_collation In-Reply-To: <1472574148.53.0.8247324722.issue27897@psf.upfronthosting.co.za> Message-ID: <20161001052522.15637.81050.2620EA9E@psf.io> Roundup Robot added the comment: New changeset 38e954a2a37e by Serhiy Storchaka in branch '2.7': Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation() https://hg.python.org/cpython/rev/38e954a2a37e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 01:26:03 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Oct 2016 05:26:03 +0000 Subject: [issue27897] Avoid possible crash in pysqlite_connection_create_collation In-Reply-To: <1472574148.53.0.8247324722.issue27897@psf.upfronthosting.co.za> Message-ID: <1475299563.86.0.198439682642.issue27897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Martin! ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 01:48:10 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Oct 2016 05:48:10 +0000 Subject: [issue21085] compile error Python3.3 on Cygwin In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <20161001054807.5570.52443.824DE15E@psf.io> Roundup Robot added the comment: New changeset 6874928eae4b by Zachary Ware in branch 'default': Issue #21085: add configure check for siginfo_t.si_band https://hg.python.org/cpython/rev/6874928eae4b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 01:52:54 2016 From: report at bugs.python.org (Zachary Ware) Date: Sat, 01 Oct 2016 05:52:54 +0000 Subject: [issue21085] compile error Python3.3 on Cygwin In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <1475301174.76.0.323289020078.issue21085@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch, masamoto, and thanks for the review and rebase, erik.bray! I only applied this to 3.7. It's much more open to experimentation currently, and we have a way to go before Python can even be built on Cygwin. Once we reach a more stable point (say, the full test suite can be run, even if not everything passes), we can evaluate whether backporting all the changes it took to get there is worthwhile. ---------- assignee: erik.bray -> zach.ware nosy: +zach.ware resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 3.7 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 01:56:19 2016 From: report at bugs.python.org (Zachary Ware) Date: Sat, 01 Oct 2016 05:56:19 +0000 Subject: [issue21085] Cygwin does not provide siginfo_t.si_band In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <1475301379.0.0.0264806765266.issue21085@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- title: compile error Python3.3 on Cygwin -> Cygwin does not provide siginfo_t.si_band _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 02:07:04 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Oct 2016 06:07:04 +0000 Subject: [issue21085] Cygwin does not provide siginfo_t.si_band In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <20161001060701.15292.59135.A8A06093@psf.io> Roundup Robot added the comment: New changeset 5673cf852daa by Zachary Ware in branch 'default': Issue #21085: Fix accidental leading +'s in configure.ac https://hg.python.org/cpython/rev/5673cf852daa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 02:27:48 2016 From: report at bugs.python.org (John Leitch) Date: Sat, 01 Oct 2016 06:27:48 +0000 Subject: [issue28322] chain.__setstate__ Type Confusion Message-ID: <1475303268.33.0.0947529181772.issue28322@psf.upfronthosting.co.za> New submission from John Leitch: Python 3.5.2 suffers from a type confusion vulnerability in the chain.__setstate__ method of the itertools module. The issue exists due to lack of argument validation in the chain_setstate() function: static PyObject * chain_setstate(chainobject *lz, PyObject *state) { PyObject *source, *active=NULL; if (! PyArg_ParseTuple(state, "O|O", &source, &active)) return NULL; Py_INCREF(source); Py_XSETREF(lz->source, source); Py_XINCREF(active); Py_XSETREF(lz->active, active); Py_RETURN_NONE; } After parsing the argument tuple, source and active are set without validating that they are iterator objects. This causes issues elsewhere, where the values are passed PyIter_Next: static PyObject * chain_next(chainobject *lz) { PyObject *item; if (lz->source == NULL) return NULL; /* already stopped */ if (lz->active == NULL) { PyObject *iterable = PyIter_Next(lz->source); if (iterable == NULL) { Py_CLEAR(lz->source); return NULL; /* no more input sources */ } lz->active = PyObject_GetIter(iterable); Py_DECREF(iterable); if (lz->active == NULL) { Py_CLEAR(lz->source); return NULL; /* input not iterable */ } } item = PyIter_Next(lz->active); if (item != NULL) return item; if (PyErr_Occurred()) { if (PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear(); else return NULL; /* input raised an exception */ } Py_CLEAR(lz->active); return chain_next(lz); /* recurse and use next active */ } In some cases, this can lead to a DEP access violation. It might be possible to exploit this to achieve code execution. (4074.198c): Access violation - code c0000005 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. eax=00000000 ebx=0132fa10 ecx=5b547028 edx=00000002 esi=0132fa10 edi=5b37b3e0 eip=00000000 esp=009ef940 ebp=009ef94c iopl=0 nv up ei pl zr na pe nc cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010246 00000000 ?? ??? 0:000> k6 ChildEBP RetAddr WARNING: Frame IP not in any known module. Following frames may be wrong. 009ef93c 5b329ac0 0x0 009ef94c 5b2cb321 python35!PyIter_Next+0x10 [c:\build\cpython\objects\abstract.c @ 2778] 009ef960 5b37b42e python35!chain_next+0x21 [c:\build\cpython\modules\itertoolsmodule.c @ 1846] 009ef970 5b33fedd python35!wrap_next+0x4e [c:\build\cpython\objects\typeobject.c @ 5470] 009ef990 5b328b9d python35!wrapper_call+0x7d [c:\build\cpython\objects\descrobject.c @ 1195] 009ef9ac 5b3c463c python35!PyObject_Call+0x6d [c:\build\cpython\objects\abstract.c @ 2167] To fix this issue, it is recommended that chain_setstate() be updated to validate its arguments. A proposed patch has been attached. static PyObject * chain_setstate(chainobject *lz, PyObject *state) { PyObject *source, *active=NULL; if (! PyArg_ParseTuple(state, "O|O", &source, &active)) return NULL; if (!PyIter_Check(source) || (active != NULL && !PyIter_Check(active))) { PyErr_SetString(PyExc_ValueError, "Arguments must be iterators."); return NULL; } Py_INCREF(source); Py_XSETREF(lz->source, source); Py_XINCREF(active); Py_XSETREF(lz->active, active); Py_RETURN_NONE; } ---------- components: Library (Lib) files: itertools.patch keywords: patch messages: 277799 nosy: JohnLeitch priority: normal severity: normal status: open title: chain.__setstate__ Type Confusion type: security versions: Python 3.5 Added file: http://bugs.python.org/file44899/itertools.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 02:29:53 2016 From: report at bugs.python.org (John Leitch) Date: Sat, 01 Oct 2016 06:29:53 +0000 Subject: [issue28322] chain.__setstate__ Type Confusion In-Reply-To: <1475303268.33.0.0947529181772.issue28322@psf.upfronthosting.co.za> Message-ID: <1475303393.87.0.798147946359.issue28322@psf.upfronthosting.co.za> Changes by John Leitch : Added file: http://bugs.python.org/file44900/Py35_itertools.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 02:33:15 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Oct 2016 06:33:15 +0000 Subject: [issue28321] Plistlib: Half of the double width characters are missing when writing binary plist In-Reply-To: <1475276484.39.0.492967421117.issue28321@psf.upfronthosting.co.za> Message-ID: <1475303595.44.0.223011792749.issue28321@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The simplest reproducer: >>> import plistlib >>> plistlib.loads(plistlib.dumps('\U0001f40d', fmt=plistlib.FMT_BINARY)) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/plistlib.py", line 1006, in loads fp, fmt=fmt, use_builtin_types=use_builtin_types, dict_type=dict_type) File "/usr/lib/python3.5/plistlib.py", line 997, in load return p.parse(fp) File "/usr/lib/python3.5/plistlib.py", line 623, in parse return self._read_object(self._object_offsets[top_object]) File "/usr/lib/python3.5/plistlib.py", line 704, in _read_object return self._fp.read(s * 2).decode('utf-16be') File "/usr/lib/python3.5/encodings/utf_16_be.py", line 16, in decode return codecs.utf_16_be_decode(input, errors, True) UnicodeDecodeError: 'utf-16-be' codec can't decode bytes in position 0-1: unexpected end of data Proposed patch fixes this issue. ---------- keywords: +patch nosy: +ronaldoussoren, serhiy.storchaka stage: -> patch review versions: +Python 2.7, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file44901/plistlib-astral-characters.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 02:34:45 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Oct 2016 06:34:45 +0000 Subject: [issue28322] chain.__setstate__ Type Confusion In-Reply-To: <1475303268.33.0.0947529181772.issue28322@psf.upfronthosting.co.za> Message-ID: <1475303685.16.0.502282132261.issue28322@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +rhettinger, serhiy.storchaka stage: -> patch review versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 02:44:02 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 01 Oct 2016 06:44:02 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1475304242.97.0.22792218719.issue26439@psf.upfronthosting.co.za> Martin Panter added the comment: Hi Michael, I have done some cleanup and modifications to your patch. The result is in aix-library.161001.patch, which has all the changes, i.e. it is not based on another patch. More significant changes I made: * Change getExecLibPath_aix() and find_parts() to return a list object, rather than building a colon-separated string only to be pulled apart again * Escape dots in get_legacy() regular expressions, so that they no longer match [shr_64xo], [shrxo], etc. * Make get_dumpH() return the a list of (object, objectinfo) tuples, where objectinfo is a list of lines; avoids building multiline strings and then splitting them apart again * Rewrite get_exactMatch() and get_version() without nested inline ?for? loops; use RE capture group * Reuse util._last_version() instead of copying the _num_version() function * Use lower case B for liB in get_member(). This means e.g. libcrypto.so is now preferred over libcrypto.so.1.0.0. I did test it a bit on Linux with faked dump -H output, but I may have made mistakes that I did not pick up. Also, this still needs documentation, and I think some more tests for the test suite exercising various aspects of find_library() would be nice if possible. Another thing: in the last few patches, you dropped the definition of RTLD_MEMBER from Modules/_ctypes/_ctypes.c. Is that intended, or just a temporary thing? ---------- versions: -Python 3.6 Added file: http://bugs.python.org/file44902/aix-library.161001.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 04:34:31 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 01 Oct 2016 08:34:31 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1475310871.34.0.049204842653.issue28201@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- stage: -> patch review type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 04:36:24 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 01 Oct 2016 08:36:24 +0000 Subject: [issue24274] erroneous comments in dictobject.c In-Reply-To: <1432442952.38.0.376658937682.issue24274@psf.upfronthosting.co.za> Message-ID: <1475310984.41.0.238288110406.issue24274@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- assignee: -> inada.naoki stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 05:47:07 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 01 Oct 2016 09:47:07 +0000 Subject: [issue28323] Remove MacOS 9-specific codes from exit() and quit() Message-ID: <1475315227.15.0.994565473323.issue28323@psf.upfronthosting.co.za> New submission from Chi Hsuan Yen: As per PEP 11, MacOS 9 support is removed in Python 2.4. There are some leftovers in CPython code base, among which site.setquit is an example. I propose to remove it for cleaner codes. Added Mac experts as well as Guido, the author of this code in the 18-years-ago changeset 813f527f3bec ---------- components: Library (Lib), Macintosh files: quit-macos9.patch keywords: patch messages: 277802 nosy: Chi Hsuan Yen, gvanrossum, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Remove MacOS 9-specific codes from exit() and quit() type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file44903/quit-macos9.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 05:56:14 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 01 Oct 2016 09:56:14 +0000 Subject: [issue28324] Clean up MacOS 9-specific description in the docstring of os.py Message-ID: <1475315774.15.0.00184796665768.issue28324@psf.upfronthosting.co.za> New submission from Chi Hsuan Yen: As per PEP 11, MacOS 9 support is removed in Python 2.4. There are some leftovers in CPython code base, among which comments about os.py are examples. I propose to clean them up for cleaner codes. Added Mac experts as well as Guido, the author of these comments in some 24-year-ago changesets 3169d38f6774, d945cf33a64f and 259923e4d7b1. ---------- components: Library (Lib), Macintosh files: os-macos9.patch keywords: patch messages: 277803 nosy: Chi Hsuan Yen, gvanrossum, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Clean up MacOS 9-specific description in the docstring of os.py type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file44904/os-macos9.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 06:06:59 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Oct 2016 10:06:59 +0000 Subject: [issue28322] chain.__setstate__ Type Confusion In-Reply-To: <1475303268.33.0.0947529181772.issue28322@psf.upfronthosting.co.za> Message-ID: <1475316419.38.0.310268648526.issue28322@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is similar issue with itertools.cycle(). And leaking SystemError to user code should be considered as a bug. Proposed patch fixes these issues. ---------- type: security -> crash Added file: http://bugs.python.org/file44905/itertools_setstate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 06:15:54 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 01 Oct 2016 10:15:54 +0000 Subject: [issue28325] Remove MacOS 9-specific module macurl2path.py Message-ID: <1475316954.78.0.654297187037.issue28325@psf.upfronthosting.co.za> New submission from Chi Hsuan Yen: As per PEP 11, MacOS 9 support is removed in Python 2.4. There are some leftovers in CPython code base, among which the macurl2path module is an example. I propose to remove it for cleaner codes. In f6785bce54b5 (issue7908), reference to macurl2path was removed from Lib/urllib.py, and macurl2path.py says: Do not import directly; use urllib instead. So, unlike the concern in issue9850, I bet there are no third party codes importing this module. It can be removed from CPython safely. Added some Mac experts. ---------- components: Library (Lib), Macintosh messages: 277805 nosy: Chi Hsuan Yen, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Remove MacOS 9-specific module macurl2path.py type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 06:34:57 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 01 Oct 2016 10:34:57 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1475318097.55.0.0877741040133.issue9850@psf.upfronthosting.co.za> Changes by Chi Hsuan Yen : ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 06:43:12 2016 From: report at bugs.python.org (Aristotel) Date: Sat, 01 Oct 2016 10:43:12 +0000 Subject: [issue28259] Ctypes bug windows In-Reply-To: <1474647946.24.0.533944480109.issue28259@psf.upfronthosting.co.za> Message-ID: <1475318592.61.0.516826944984.issue28259@psf.upfronthosting.co.za> Changes by Aristotel : ---------- components: +Windows -ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 06:44:39 2016 From: report at bugs.python.org (Aristotel) Date: Sat, 01 Oct 2016 10:44:39 +0000 Subject: [issue28259] Ctypes bug windows In-Reply-To: <1474647946.24.0.533944480109.issue28259@psf.upfronthosting.co.za> Message-ID: <1475318679.53.0.422171611391.issue28259@psf.upfronthosting.co.za> Aristotel added the comment: Oh it's ctypes bug on windows only ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 07:45:34 2016 From: report at bugs.python.org (ProgVal) Date: Sat, 01 Oct 2016 11:45:34 +0000 Subject: [issue28326] multiprocessing.Process depends on sys.stdout being open Message-ID: <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za> New submission from ProgVal: Hello, The following code: import sys import multiprocessing sys.stdout.close() def foo(): pass p = multiprocessing.Process(target=foo) p.start() Crashes with: Traceback (most recent call last): File "foo.py", line 10, in p.start() File "/usr/lib/python3.5/multiprocessing/process.py", line 105, in start self._popen = self._Popen(self) File "/usr/lib/python3.5/multiprocessing/context.py", line 212, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "/usr/lib/python3.5/multiprocessing/context.py", line 267, in _Popen return Popen(process_obj) File "/usr/lib/python3.5/multiprocessing/popen_fork.py", line 17, in __init__ sys.stdout.flush() ValueError: I/O operation on closed file. This bug has been reported to me on a daemonized program (written prior to PEP 3143). ---------- components: Library (Lib) messages: 277807 nosy: Valentin.Lorentz priority: normal severity: normal status: open title: multiprocessing.Process depends on sys.stdout being open versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 08:18:35 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Oct 2016 12:18:35 +0000 Subject: [issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs Message-ID: <1475324315.92.0.282609876939.issue28327@psf.upfronthosting.co.za> New submission from Mark Dickinson: The following calculations should all be giving the same result: >>> import statistics >>> statistics.geometric_mean([2, 3, 5, 7]) 3.80675409583932 >>> statistics.geometric_mean([2, 3, 5, 7.0]) 1.6265765616977859 >>> statistics.geometric_mean([2, 3, 5.0, 7.0]) 2.4322992790977875 >>> statistics.geometric_mean([2, 3.0, 5.0, 7.0]) 3.201085872943679 >>> statistics.geometric_mean([2.0, 3.0, 5.0, 7.0]) 3.80675409583932 (Correct result is 3.80675409583932.) The culprit is this line in statistics._product: mant, scale = 1, 0 #math.frexp(prod) # FIXME ... and indeed, we should be starting from `prod` rather than 1 here. But simply using math.frexp has potential for failure if the accumulated integer product overflows a float. ---------- assignee: steven.daprano messages: 277808 nosy: mark.dickinson, steven.daprano priority: normal severity: normal status: open title: statistics.geometric_mean gives incorrect results for mixed int/float inputs type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 08:20:11 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Oct 2016 12:20:11 +0000 Subject: [issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs In-Reply-To: <1475324315.92.0.282609876939.issue28327@psf.upfronthosting.co.za> Message-ID: <1475324411.64.0.160821043307.issue28327@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a fix. I was planning to add tests, but as far as I can tell geometric_mean currently has no tests at all. Steve, is that correct? That seems like something that should be fixed before the 3.6 release. ---------- keywords: +patch Added file: http://bugs.python.org/file44906/geometric_mean_int_float.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 08:23:40 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Oct 2016 12:23:40 +0000 Subject: [issue28258] Broken python-config generated with Estonian locale In-Reply-To: <1474637498.59.0.401173871387.issue28258@psf.upfronthosting.co.za> Message-ID: <1475324620.41.0.23288920982.issue28258@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Victor! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 08:33:54 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Oct 2016 12:33:54 +0000 Subject: [issue28328] statistics.geometric_mean has no tests. Defer to 3.7? Message-ID: <1475325234.65.0.257375698668.issue28328@psf.upfronthosting.co.za> New submission from Mark Dickinson: The newly-added statistics.geometric_mean function appears to have no tests at all, with the exception of a single doctest: >>> geometric_mean([1.10, 0.95, 1.12]) 1.0538483123382172 Steve, Ned: what do you think about taking geometric_mean out of Python 3.6, leaving us time to get it into shape for 3.7? The implementation of geometric_mean is complicated, with many edge cases. The original code was committed without review in #27181, and it currently suffers from some serious bugs: see #27761, #28111, #28327 (the first of these affects only the tests for nroot; the second and third are behaviour bugs in geometric_mean). With the lack of tests, and Python 3.6 b2 looming, I think the best thing to do might be to defer the inclusion of geometric_mean to Python 3.7. I'll mark this as a release blocker until we decide what to do. ---------- assignee: steven.daprano messages: 277811 nosy: mark.dickinson, ned.deily, steven.daprano priority: release blocker severity: normal stage: test needed status: open title: statistics.geometric_mean has no tests. Defer to 3.7? type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 08:50:20 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 01 Oct 2016 12:50:20 +0000 Subject: [issue28328] statistics.geometric_mean has no tests. Defer to 3.7? In-Reply-To: <1475325234.65.0.257375698668.issue28328@psf.upfronthosting.co.za> Message-ID: <20161001125012.GB22471@ando.pearwood.info> Steven D'Aprano added the comment: Unfortunately I'm in a pickle at the moment, I cannot build 3.6 on any of the machines I have available (three), and no time to upgrade them to something that will build 3.6. But I can provide some tests, if somebody is willing to review and check them in to 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 09:01:02 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Oct 2016 13:01:02 +0000 Subject: [issue28294] HTTPServer server.py assumes sys.stderr != None In-Reply-To: <1475046504.95.0.666561329413.issue28294@psf.upfronthosting.co.za> Message-ID: <1475326862.34.0.209267071121.issue28294@psf.upfronthosting.co.za> R. David Murray added the comment: That would be my answer if we aren't switching to logging. I would consider that an enhancement, but are there reasons to not do that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 09:05:23 2016 From: report at bugs.python.org (Satoru Logic) Date: Sat, 01 Oct 2016 13:05:23 +0000 Subject: [issue28329] Add support for customizing scheduler's timefunc and delayfunc using subclassing Message-ID: <1475327123.48.0.0947614494483.issue28329@psf.upfronthosting.co.za> Changes by Satoru Logic : ---------- components: Library (Lib) files: overridable_time_delay.patch keywords: patch nosy: Satoru Logic priority: normal severity: normal status: open title: Add support for customizing scheduler's timefunc and delayfunc using subclassing type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file44907/overridable_time_delay.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 09:22:25 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 01 Oct 2016 13:22:25 +0000 Subject: [issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs In-Reply-To: <1475324315.92.0.282609876939.issue28327@psf.upfronthosting.co.za> Message-ID: <1475328145.75.0.399603023034.issue28327@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Looks good for me. Thanks for catching this: I knew it was a bug, but then I ran into the issue that I could no longer build 3.6 before I could fix it, and between that and various issues in the real world I never got back to this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 09:23:01 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Oct 2016 13:23:01 +0000 Subject: [issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs In-Reply-To: <1475324315.92.0.282609876939.issue28327@psf.upfronthosting.co.za> Message-ID: <1475328181.65.0.0371385895651.issue28327@psf.upfronthosting.co.za> Mark Dickinson added the comment: New patch, with a (very slightly) cleaner implementation of `_frexp_gen`. ---------- Added file: http://bugs.python.org/file44908/geometric_mean_int_float_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 09:26:42 2016 From: report at bugs.python.org (Satoru Logic) Date: Sat, 01 Oct 2016 13:26:42 +0000 Subject: [issue28330] Use simpler and faster sched.Event definition Message-ID: <1475328402.1.0.435562335061.issue28330@psf.upfronthosting.co.za> New submission from Satoru Logic: By removing the rich comparison dunder methods, the sorting of events will use the faster default implementation. ---------- components: Library (Lib) files: simple_def.patch keywords: patch messages: 277816 nosy: Satoru Logic priority: normal severity: normal status: open title: Use simpler and faster sched.Event definition versions: Python 3.7 Added file: http://bugs.python.org/file44909/simple_def.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 09:29:12 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 01 Oct 2016 13:29:12 +0000 Subject: [issue28331] "CPython implementation detail:" is removed when contents is translated Message-ID: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> New submission from INADA Naoki: "CPython implementation detail:" label is removed when contents of impl-detail directive is translated. This is very bad for people reading translated documents. Attached patch fixes this, with enabling translating the label, like versionchanged directive. ---------- assignee: docs at python components: Documentation files: impl-detail.patch keywords: patch messages: 277817 nosy: docs at python, inada.naoki priority: normal severity: normal stage: patch review status: open title: "CPython implementation detail:" is removed when contents is translated type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file44910/impl-detail.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 09:46:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Oct 2016 13:46:55 +0000 Subject: [issue28330] Use simpler and faster sched.Event definition In-Reply-To: <1475328402.1.0.435562335061.issue28330@psf.upfronthosting.co.za> Message-ID: <1475329615.7.0.0902247997784.issue28330@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue5830. ---------- nosy: +rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 10:35:40 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Oct 2016 14:35:40 +0000 Subject: [issue25732] functools.total_ordering does not correctly implement not equal behaviour In-Reply-To: <1448457169.16.0.121144285875.issue25732@psf.upfronthosting.co.za> Message-ID: <1475332540.46.0.0561403362261.issue25732@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 10:57:11 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Oct 2016 14:57:11 +0000 Subject: [issue27800] Regular expressions with multiple repeat codes In-Reply-To: <1471608420.14.0.872966965651.issue27800@psf.upfronthosting.co.za> Message-ID: <1475333831.51.0.707151821254.issue27800@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> martin.panter stage: patch review -> commit review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 11:06:10 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 01 Oct 2016 15:06:10 +0000 Subject: [issue28332] silent truncations in socket.htons and socket.ntohs Message-ID: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> New submission from Oren Milman: ------------ current state ------------ Due to the implementation of socket_htons (in Modules/socketmodule.c), in case the received integer does not fit in 16-bit unsigned integer, but does fit in a positive C int, it is silently truncated to 16-bit unsigned integer (before converting to network byte order): >>> import socket >>> hex(socket.htons(0x1234)) '0x3412' >>> hex(socket.htons(0x81234)) '0x3412' >>> hex(socket.htons(0x881234)) '0x3412' >>> hex(socket.htons(0x8881234)) '0x3412' >>> hex(socket.htons(0x88881234)) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C long >>> Likewise, socket.ntohs has the same silent truncation feature, due to the implementation of socket_ntohs. ISTM this silent truncation feature has the potential to conceal nasty bugs, and I guess it is rarely used in purpose. With regard to relevant changes made in the past: * The silent truncation was there since the two functions were first added, in changeset 3673 (https://hg.python.org/cpython/rev/f6ace61c3dfe). * A check whether the received integer is negative was added (to each of the two functions) in changeset 40632 (https://hg.python.org/cpython/rev/6efe3a4b10ac), as part of #1635058. Note the lack of discussion in #1635058 and #1619659 about backward compatibility. It might suggest that Guido didn't hesitate to make the change, even though at the time, the four conversion functions (socket.htons, socket.ntohs, socket.htonl and socket.ntohl) were already in the wild for 10 years. ------------ proposed changes ------------ 1. In Modules/socketmodule.c, raise a DeprecationWarning before silently truncating the received integer. In Python 3.8, replace the DeprecationWarning with an OverflowError. 2. In Lib/test/test_socket.py, add tests to verify a DeprecationWarning is raised as expected. 3. In Doc/library/socket.rst, add a description of the silent truncation feature, and declare it is deprecated. ------------ diff ------------ The proposed patches diff file is attached. (I wasn't sure you would approve deprecating a feature that was in the wild for so long, but I implemented it anyway, as it was quite simple.) ------------ tests ------------ I ran 'python_d.exe -m test -j3' (on my 64-bit Windows 10) with and without the patches, and got quite the same output. (That also means my new tests in test_socket passed.) The outputs of both runs are attached. ---------- components: Library (Lib) files: CPythonTestOutput.txt messages: 277820 nosy: Oren Milman priority: normal severity: normal status: open title: silent truncations in socket.htons and socket.ntohs type: behavior versions: Python 3.7 Added file: http://bugs.python.org/file44911/CPythonTestOutput.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 11:07:08 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 01 Oct 2016 15:07:08 +0000 Subject: [issue28332] silent truncations in socket.htons and socket.ntohs In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <1475334428.18.0.724577059525.issue28332@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file44912/patchedCPythonTestOutput_ver1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 11:07:52 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 01 Oct 2016 15:07:52 +0000 Subject: [issue28332] silent truncations in socket.htons and socket.ntohs In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <1475334472.45.0.872858428176.issue28332@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- keywords: +patch Added file: http://bugs.python.org/file44913/issue28332_ver1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 11:20:25 2016 From: report at bugs.python.org (=?utf-8?q?Adam_Barto=C5=A1?=) Date: Sat, 01 Oct 2016 15:20:25 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows Message-ID: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> New submission from Adam Barto?: In my setting (Python 3.6b1 on Windows), trying to prompt a non-ASCII character via input() results in mojibake. This is related to the recent fix of #1602 and so is Windows-specific. >>> input("?") ?? The result corresponds to print("?".encode("utf-8").decode("cp852")). That cp852 the default terminal encoding in my locale. ---------- components: Unicode, Windows messages: 277821 nosy: Drekin, ezio.melotti, haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: input() with Unicode prompt produces mojibake on Windows type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 11:22:26 2016 From: report at bugs.python.org (Jaap van der Velde) Date: Sat, 01 Oct 2016 15:22:26 +0000 Subject: [issue28294] HTTPServer server.py assumes sys.stderr != None In-Reply-To: <1475046504.95.0.666561329413.issue28294@psf.upfronthosting.co.za> Message-ID: <1475335346.1.0.480440465178.issue28294@psf.upfronthosting.co.za> Jaap van der Velde added the comment: Closing and not fixing is fair enough - I did not realize that this would be an issue that occurs in many places in stdlib. I realize this is not a help forum, so I will ask elsewhere to see if there's some way to redirect all of sys.stderr in scenarios like these (running a service), because tracking down an issue like this takes a lot of time and finding the issue buried in a standard library caught me off guard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 11:35:33 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 01 Oct 2016 15:35:33 +0000 Subject: [issue28294] HTTPServer server.py assumes sys.stderr != None In-Reply-To: <1475326862.34.0.209267071121.issue28294@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: A problem with switching to logging is the API design. There are three functions, log_request(), log_error() and log_message(). The former two call the latter. The API explicitly encourages overriding log_message() to customize logging. But it has no way to know whether it's called from log_error(), log_request(), or directly. So how is it to choose logging levels? I imagine log_request() should log at the INFO level, log_error() at the ERROR level, and let's say that direct calls to log_message() should also log at the INFO level (from looking at the few calls). So how should log_error() distinguish itself to log_message() without breaking apps that override the latter? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 11:35:54 2016 From: report at bugs.python.org (Dimitri Merejkowsky) Date: Sat, 01 Oct 2016 15:35:54 +0000 Subject: [issue28334] netrc does not work if $HOME is not set Message-ID: <1475336154.44.0.44449733804.issue28334@psf.upfronthosting.co.za> New submission from Dimitri Merejkowsky: If $HOME is not set, netrc will raise an exception. Attached patch fixes the problem by using `os.path.expanduser` instead ---------- components: Library (Lib) files: netrc-use-expanduser.patch keywords: patch messages: 277824 nosy: Dimitri Merejkowsky priority: normal severity: normal status: open title: netrc does not work if $HOME is not set type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file44914/netrc-use-expanduser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 12:40:35 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 01 Oct 2016 16:40:35 +0000 Subject: [issue28326] multiprocessing.Process depends on sys.stdout being open In-Reply-To: <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za> Message-ID: <1475340035.44.0.572712471584.issue28326@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 13:21:28 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Oct 2016 17:21:28 +0000 Subject: [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475342488.32.0.376393343241.issue28331@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 13:28:22 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Oct 2016 17:28:22 +0000 Subject: [issue28326] multiprocessing.Process depends on sys.stdout being open In-Reply-To: <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za> Message-ID: <1475342902.84.0.894782875453.issue28326@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 13:56:00 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 01 Oct 2016 17:56:00 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1475344560.81.0.840563469119.issue26617@psf.upfronthosting.co.za> Guido van Rossum added the comment: Ben Bangert reported to me that this crash caused instabilities in an app using asyncio (https://github.com/home-assistant/home-assistant/issues/3453). This hack made his crashes go away: https://github.com/home-assistant/home-assistant/commit/922dbba8814b81b69471dc4f1bf5c5a3b2bfe4ed What are the chances of getting the crash fixed in 3.5.3 and 3.6b2? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 14:17:48 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 01 Oct 2016 18:17:48 +0000 Subject: [issue22392] Clarify documentation of __getinitargs__ In-Reply-To: <1410461552.96.0.589396040073.issue22392@psf.upfronthosting.co.za> Message-ID: <1475345868.17.0.182833143945.issue22392@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 14:20:17 2016 From: report at bugs.python.org (Ram Rachum) Date: Sat, 01 Oct 2016 18:20:17 +0000 Subject: [issue28335] Exception reporting in `logging.config` Message-ID: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> New submission from Ram Rachum: In `logging.config.DictConfigurator.configure`, there are exceptions that are caught and then replaced with `ValueError` exceptions. I think you should use the `raise x from y` syntax so that the original tracebacks will be preserved. (I'm debugging such an exception now and it's quite frustrating that I'm not seeing the full traceback of the original exception.) ---------- components: Library (Lib) messages: 277826 nosy: cool-RR, vinay.sajip priority: normal severity: normal status: open title: Exception reporting in `logging.config` type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 14:24:55 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Sat, 01 Oct 2016 18:24:55 +0000 Subject: [issue28273] Make os.waitpid() option parameter optional. In-Reply-To: <1474821975.19.0.432444074991.issue28273@psf.upfronthosting.co.za> Message-ID: <1475346295.12.0.49320803569.issue28273@psf.upfronthosting.co.za> Jaysinh shukla added the comment: Removing the `options` default argument from all the call to os.waitpid. Note: This patch is based on [this patch](http://bugs.python.org/file44822/os_waitpid-optional_options.diff) submitted by StyXman. ---------- nosy: +jaysinh.shukla Added file: http://bugs.python.org/file44915/os_waitpid_updated_codebase_jaysinh.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 14:27:33 2016 From: report at bugs.python.org (Ram Rachum) Date: Sat, 01 Oct 2016 18:27:33 +0000 Subject: [issue28335] Exception reporting in `logging.config` In-Reply-To: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> Message-ID: <1475346453.26.0.475040670441.issue28335@psf.upfronthosting.co.za> Ram Rachum added the comment: I now see similar raises that could use a `from` in other places in this module, so I'd suggest going over the module and putting `from`s all over the place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 14:44:28 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Sat, 01 Oct 2016 18:44:28 +0000 Subject: [issue28273] Make os.waitpid() option parameter optional. In-Reply-To: <1474821975.19.0.432444074991.issue28273@psf.upfronthosting.co.za> Message-ID: <1475347468.6.0.663528918719.issue28273@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44915/os_waitpid_updated_codebase_jaysinh.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 14:45:18 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Sat, 01 Oct 2016 18:45:18 +0000 Subject: [issue28273] Make os.waitpid() option parameter optional. In-Reply-To: <1474821975.19.0.432444074991.issue28273@psf.upfronthosting.co.za> Message-ID: <1475347518.36.0.809887875139.issue28273@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44916/os_waitpid_updated_codebase_2_jaysinh.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 14:57:29 2016 From: report at bugs.python.org (Juan Carlos Pujol Mainegra) Date: Sat, 01 Oct 2016 18:57:29 +0000 Subject: [issue28336] Slicing (operation) is not symmetrical with respect to suffixes and prefixes Message-ID: <1475348249.16.0.807469092149.issue28336@psf.upfronthosting.co.za> New submission from Juan Carlos Pujol Mainegra: Let s be a string or other array-like object, a, b > 0 integers, s[0:b] returns a b-long prefix to s, the same as s[:b], but s[-a:0] returns empty (for len(s) > 0 and a > 1), while it should return the same as s[-a:], an a-long suffix (a > 0). A syntax asymmetry like this shall not be imposed to those using non-literal slicing indexes, as it would be necessarily to introduce a control condition to test whether the upper bound index is a non-negative quantity, assuming the lower bound index is negative. Furthermore, it breaks the whole negative slicing idea, being that (I consider) index i always be treated as i mod len(s), so that constructions like s[-a:b] (for a, b > 0 or a, b < 0) could return s[-a:] + s[:b]. ---------- components: Interpreter Core messages: 277829 nosy: jksware priority: normal severity: normal status: open title: Slicing (operation) is not symmetrical with respect to suffixes and prefixes type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 15:40:14 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Oct 2016 19:40:14 +0000 Subject: [issue28332] silent truncations in socket.htons and socket.ntohs In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <1475350814.12.0.851027336578.issue28332@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Looks reasonable. ntohl() and htonl() already raise an exception if the argument exceeds 32 bit. Added comments on Rietveld. ---------- nosy: +serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 15:52:42 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Oct 2016 19:52:42 +0000 Subject: [issue28336] Slicing (operation) is not symmetrical with respect to suffixes and prefixes In-Reply-To: <1475348249.16.0.807469092149.issue28336@psf.upfronthosting.co.za> Message-ID: <1475351562.13.0.507980374712.issue28336@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The default value of the lower bound index is 0, but the default value of the upper bound index is the length of the sequence. s[:a] is the same as s[0:a], but s[a:] is the same as s[a:len(s)]. If make s[a:0] meaning the same as s[a:len(s)], i.e. return a subsequence from index a to the end, while s[0:a] means the same as s[:a], i.e. returns a subsequence from the begin to index a, what should mean s[0:0]? There is a contradiction. This change would break existing code. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 16:58:49 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 01 Oct 2016 20:58:49 +0000 Subject: [issue28335] Exception reporting in `logging.config` In-Reply-To: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> Message-ID: <1475355529.99.0.71294138964.issue28335@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 17:15:22 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Oct 2016 21:15:22 +0000 Subject: [issue13756] Python3.2.2 make fail on cygwin In-Reply-To: <1326199459.04.0.575648132034.issue13756@psf.upfronthosting.co.za> Message-ID: <20161001211519.95050.65149.CBF25F5F@psf.io> Roundup Robot added the comment: New changeset 5b4c21436036 by Zachary Ware in branch 'default': Issue #13756: Fix building extensions modules on Cygwin https://hg.python.org/cpython/rev/5b4c21436036 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 17:26:41 2016 From: report at bugs.python.org (Zachary Ware) Date: Sat, 01 Oct 2016 21:26:41 +0000 Subject: [issue13756] Python3.2.2 make fail on cygwin In-Reply-To: <1326199459.04.0.575648132034.issue13756@psf.upfronthosting.co.za> Message-ID: <1475357201.92.0.270364543435.issue13756@psf.upfronthosting.co.za> Zachary Ware added the comment: Fixed on 3.7, we can evaluate backporting later. With this committed, a build on Cygwin can succeed if you configure with --without-threads. Thanks for the patch! ---------- nosy: +zach.ware resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 17:39:05 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 01 Oct 2016 21:39:05 +0000 Subject: [issue28088] Document Transport.set_protocol and get_protocol Message-ID: <1475357945.78.0.355949366487.issue28088@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 17:39:21 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 01 Oct 2016 21:39:21 +0000 Subject: [issue28089] Document TCP_NODELAY by default Message-ID: <1475357961.79.0.406403933732.issue28089@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 18:47:48 2016 From: report at bugs.python.org (James Lu) Date: Sat, 01 Oct 2016 22:47:48 +0000 Subject: [issue28326] multiprocessing.Process depends on sys.stdout being open In-Reply-To: <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za> Message-ID: <1475362068.82.0.636126364829.issue28326@psf.upfronthosting.co.za> Changes by James Lu : ---------- nosy: +James Lu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 20:10:14 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 02 Oct 2016 00:10:14 +0000 Subject: [issue28294] HTTPServer server.py assumes sys.stderr != None In-Reply-To: <1475046504.95.0.666561329413.issue28294@psf.upfronthosting.co.za> Message-ID: <1475367014.42.0.300390778344.issue28294@psf.upfronthosting.co.za> R. David Murray added the comment: OK, lets close this won't fix, then. Especially since aiohttp does use logging already.... Sorry, Mariatta. Thanks for the patch, but we aren't going to use it. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 20:15:57 2016 From: report at bugs.python.org (Mark Gollahon) Date: Sun, 02 Oct 2016 00:15:57 +0000 Subject: [issue28281] Remove year limits from calendar In-Reply-To: <1474922646.39.0.781731359123.issue28281@psf.upfronthosting.co.za> Message-ID: <1475367357.55.0.0277349158759.issue28281@psf.upfronthosting.co.za> Mark Gollahon added the comment: First time patch for CPython. I followed instructions given by belopolsky and added tests. Please critique. ---------- keywords: +patch nosy: +golly Added file: http://bugs.python.org/file44917/calendar-no-year-limits.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 20:46:13 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 02 Oct 2016 00:46:13 +0000 Subject: [issue28088] Document Transport.set_protocol and get_protocol Message-ID: <1475369173.63.0.247466795846.issue28088@psf.upfronthosting.co.za> New submission from Mariatta Wijaya: Added the documentation for set_protocol and get_protocol. ---------- keywords: +patch Added file: http://bugs.python.org/file44918/issue28088.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 20:56:51 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Oct 2016 00:56:51 +0000 Subject: [issue28328] statistics.geometric_mean has no tests. Defer to 3.7? In-Reply-To: <1475325234.65.0.257375698668.issue28328@psf.upfronthosting.co.za> Message-ID: <1475369811.2.0.663719035674.issue28328@psf.upfronthosting.co.za> Ned Deily added the comment: I was hoping that the open issues could be resolved in time for b2 but that seems unlikely at this point. So I have to agree that this feature should be deferred to 3.7. Steven, can you make the necessary reverts on the 3.6 branch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 21:34:04 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 01:34:04 +0000 Subject: [issue28324] Clean up MacOS 9-specific description in the docstring of os.py In-Reply-To: <1475315774.15.0.00184796665768.issue28324@psf.upfronthosting.co.za> Message-ID: <20161002013401.17279.37287.9896E2BB@psf.io> Roundup Robot added the comment: New changeset dbdcedf3583e by Ned Deily in branch '3.6': Issue #28324: Remove vestigal MacOS 9 references in os.py docstring. https://hg.python.org/cpython/rev/dbdcedf3583e New changeset d55fd379b994 by Ned Deily in branch 'default': Issue #28324: Merge from 3.6 https://hg.python.org/cpython/rev/d55fd379b994 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 21:34:04 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 01:34:04 +0000 Subject: [issue28323] Remove MacOS 9-specific codes from exit() and quit() In-Reply-To: <1475315227.15.0.994565473323.issue28323@psf.upfronthosting.co.za> Message-ID: <20161002013401.17279.79603.D4483875@psf.io> Roundup Robot added the comment: New changeset 2d8d9abb3bf8 by Ned Deily in branch '3.6': Issue #28323: Remove vestigal MacOS 9 checks from exit() and quit(). https://hg.python.org/cpython/rev/2d8d9abb3bf8 New changeset 2c7034d59c7b by Ned Deily in branch 'default': Issue #28323: Merge from 3.6 https://hg.python.org/cpython/rev/2c7034d59c7b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 21:35:13 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Oct 2016 01:35:13 +0000 Subject: [issue28323] Remove MacOS 9-specific codes from exit() and quit() In-Reply-To: <1475315227.15.0.994565473323.issue28323@psf.upfronthosting.co.za> Message-ID: <1475372113.38.0.46656855154.issue28323@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch! ---------- resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 21:36:28 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Oct 2016 01:36:28 +0000 Subject: [issue28324] Clean up MacOS 9-specific description in the docstring of os.py In-Reply-To: <1475315774.15.0.00184796665768.issue28324@psf.upfronthosting.co.za> Message-ID: <1475372188.22.0.171961911657.issue28324@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for this patch, too! ---------- keywords: +gsoc -patch resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 22:06:09 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 02:06:09 +0000 Subject: [issue28325] Remove MacOS 9-specific module macurl2path.py In-Reply-To: <1475316954.78.0.654297187037.issue28325@psf.upfronthosting.co.za> Message-ID: <20161002020606.79323.65845.44C81A4F@psf.io> Roundup Robot added the comment: New changeset 07c593845994 by Ned Deily in branch 'default': Issue #28325: Remove vestigal MacOS 9 macurl2path module and its tests. https://hg.python.org/cpython/rev/07c593845994 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 22:09:53 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Oct 2016 02:09:53 +0000 Subject: [issue28325] Remove MacOS 9-specific module macurl2path.py In-Reply-To: <1475316954.78.0.654297187037.issue28325@psf.upfronthosting.co.za> Message-ID: <1475374193.84.0.983314105833.issue28325@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the suggestion; I didn't even know that was still around. Because it is a bit late in the game for 3.6 and to be extra cautious, I decided to remove it starting with 3.7. ---------- resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 22:18:14 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Oct 2016 02:18:14 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1475374694.51.0.237413181998.issue9850@psf.upfronthosting.co.za> Ned Deily added the comment: It's a bit late in the 3.6 cycle to be removing macpath, but it's not too late to mark it in 3.6 as deprecated and to be removed in 3.7. If someone wants to write two patches, one for 3.6 to add a deprecation warning to the code and to the docs, the other for 3.7 to actually remove all traces of macpath, that would be great! ---------- assignee: ronaldoussoren -> type: enhancement -> versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 22:34:35 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 02 Oct 2016 02:34:35 +0000 Subject: [issue28222] test_distutils fails In-Reply-To: <1474432052.98.0.601076913744.issue28222@psf.upfronthosting.co.za> Message-ID: <1475375675.96.0.336990860699.issue28222@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hmm.. the test works for me on master branch $ ./python.exe -m test test_distutils Run tests sequentially 0:00:00 [1/1] test_distutils 1 test OK. Total duration: 4 sec Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 22:37:50 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 02:37:50 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1475375870.06.0.917799666114.issue9850@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +easy -needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 23:09:51 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 02 Oct 2016 03:09:51 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1475377791.17.0.297776325567.issue9850@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 23:41:30 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 03:41:30 +0000 Subject: [issue28222] test_distutils fails In-Reply-To: <1474432052.98.0.601076913744.issue28222@psf.upfronthosting.co.za> Message-ID: <1475379690.53.0.749881954975.issue28222@psf.upfronthosting.co.za> Berker Peksag added the comment: I can reproduce it with the following dependencies: $ pip list docutils (0.12) pip (8.1.2) setuptools (27.1.2) The test was added in issue 23063. Since the purpose of the test was testing a bug in _check_rst_data(), skipping it if pygments is not available wouldn't be an ideal solution. We probably need to do something like: if pygments is not None: self.assertEqual(len(msgs), 0) else: self.assertEqual(len(msgs), 1) self.assertEqual( str(msgs[0][1]), 'Cannot analyze code. Pygments package not found.' ) ---------- nosy: +berker.peksag versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 00:00:57 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 04:00:57 +0000 Subject: [issue28334] netrc does not work if $HOME is not set In-Reply-To: <1475336154.44.0.44449733804.issue28334@psf.upfronthosting.co.za> Message-ID: <1475380857.53.0.835176705403.issue28334@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, Dimitri. I think this is a reasonable improvement. However, since we are changing the behavior of the netrc() class, I'm not sure this can be considered as a bug fix. In any case, 3.3 and 3.4 are in security-fix-only mode so I'm going to remove them from the versions field. We need two things from you to move this forward: 1. A test. It should go in Lib/test/test_netrc.py. You can use env = support.EnvironmentVarGuard() env.unset('HOME') to test the new behavior. 2. A CLA form. You can sign it online at https://www.python.org/psf/contrib/contrib-form/ ---------- nosy: +berker.peksag stage: -> patch review versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 00:25:34 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Oct 2016 04:25:34 +0000 Subject: [issue28322] chain.__setstate__ Type Confusion In-Reply-To: <1475303268.33.0.0947529181772.issue28322@psf.upfronthosting.co.za> Message-ID: <1475382334.02.0.500462590028.issue28322@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The patch looks reasonable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 00:38:18 2016 From: report at bugs.python.org (Tiago Antao) Date: Sun, 02 Oct 2016 04:38:18 +0000 Subject: [issue28326] multiprocessing.Process depends on sys.stdout being open In-Reply-To: <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za> Message-ID: <1475383098.57.0.500641398127.issue28326@psf.upfronthosting.co.za> Tiago Antao added the comment: I made a small patch for this. This is the first time I submit one, so please be careful with this... ---------- keywords: +patch nosy: +tiagoantao Added file: http://bugs.python.org/file44919/mp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 01:04:48 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sun, 02 Oct 2016 05:04:48 +0000 Subject: [issue28325] Remove MacOS 9-specific module macurl2path.py In-Reply-To: <1475316954.78.0.654297187037.issue28325@psf.upfronthosting.co.za> Message-ID: <1475384688.73.0.701228422466.issue28325@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Thanks for landing all the changes :) It's definitely surprising to see those old CPython codes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 01:12:39 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 02 Oct 2016 05:12:39 +0000 Subject: [issue28328] statistics.geometric_mean has no tests. Defer to 3.7? In-Reply-To: <1475325234.65.0.257375698668.issue28328@psf.upfronthosting.co.za> Message-ID: <20161002051230.GC22471@ando.pearwood.info> Steven D'Aprano added the comment: > The newly-added statistics.geometric_mean function appears to have no > tests at all That's weird and unfortunate. I certainly wrote tests, and I have a backup of them. I have no idea what happened. Attached is a patch that adds the tests, but obviously I haven't been able to run this until I resolve my gcc issues and can build 3.6 again. (I did run this some weeks ago, and they passed *then*, but I cannot be sure they still pass now.) If somebody would like to test this for me, it would be appreciated. ---------- keywords: +patch Added file: http://bugs.python.org/file44920/geometric_mean_tests.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff --git a/Lib/test/test_statistics.py b/Lib/test/test_statistics.py --- a/Lib/test/test_statistics.py +++ b/Lib/test/test_statistics.py @@ -1694,6 +1694,124 @@ self.assertEqual(statistics.mean([tiny]*n), tiny) +class TestGeometricMean(NumericTestCase, AverageMixin, UnivariateTypeMixin): + def setUp(self): + self.func = statistics.geometric_mean + + def prepare_data(self): + # Override mixin method. + values = super().prepare_data() + values.remove(0) + return values + + def prepare_types_for_conservation_test(self): + # Override mixin method. + return (float, Decimal) + + def prepare_values_for_repeated_single_test(self): + # Override mixin method. + return (3.5, 17, 2.5e9, Decimal('4.9712'), Decimal('9236.40781')) + + def test_repeated_fractions(self): + # This test has been split out from the test_repeated_single_value mixin. + for x in (Fraction(61, 67), Fraction(935, 821)): + expected = float(x) + for n in (2, 14, 93): + with self.subTest(x=x, n=n): + self.assertEqual(self.func([x]*n), expected) + + def test_repeated_huge_single_value(self): + # Test geometric mean with a single really big float repeated many times. + x = 2.5e15 + for count in (2, 3, 10): + self.assertEqual(self.func([x]*count), x) + count = 20 + self.assertApproxEqual(self.func([x]*count), x, rel=1e-15) + + def test_zero(self): + # Test that geometric mean returns zero if zero is an element. + values = [1, 2, 3, 0, 5] + self.assertEqual(self.func(values), 0.0) + + def test_negative_error(self): + # Test that geometric mean raises when given a negative value. + exc = statistics.StatisticsError + for values in ([-1], [1, -2, 3]): + with self.subTest(values=values): + self.assertRaises(exc, self.func, values) + + def test_ints(self): + # Test geometric mean with ints. + data = [12, 21, 294] + random.shuffle(data) + self.assertEqual(self.func(data), 42.0) + data = [90, 135, 270, 320] + random.shuffle(data) + self.assertEqual(self.func(data), 180.0) + + def test_floats_exact(self): + # Test geometric mean with some carefully chosen floats. + data = [1.0, 2.0, 6.125, 12.25] + random.shuffle(data) + self.assertEqual(self.func(data), 3.5) + + def test_singleton_lists(self): + # Test that geometric mean([x]) returns x. + for i in range(100): + x = random.uniform(0.0, 10000.0) + self.assertEqual(self.func([x]), x) + + def test_decimals_exact(self): + # Test geometric mean with some carefully chosen Decimals. + D = Decimal + data = [D("0.972"), D("8.748"), D("23.328")] + random.shuffle(data) + self.assertEqual(self.func(data), D("5.832")) + + def test_fractions(self): + # Test geometric mean with Fractions. + F = Fraction + data = [F(1, 2), F(2, 3), F(3, 4), F(4, 5), F(5, 6), F(6, 7), F(7, 8)] + random.shuffle(data) + expected = 1/(8**(1/7)) + self.assertApproxEqual(self.func(data), expected, rel=1e-13) + + def test_inf(self): + # Test geometric mean with infinity. + INF = float('inf') + values = [2.0, INF, 1.0] + self.assertEqual(self.func(values), INF) + + def test_nan(self): + # Test geometric mean with NANs. + values = [2.0, float('nan'), 1.0] + self.assertTrue(math.isnan(self.func(values))) + + def test_multiply_data_points(self): + # Test multiplying every data point by a constant. + c = 111 + data = [3.4, 4.5, 4.9, 6.7, 6.8, 7.2, 8.0, 8.1, 9.4] + expected = self.func(data)*c + result = self.func([x*c for x in data]) + self.assertApproxEqual(self.func(data), expected, rel=1e-13) + + def test_doubled_data(self): + # Test doubling data from [a,b...z] to [a,a,b,b...z,z]. + data = [random.uniform(1, 500) for _ in range(1000)] + expected = self.func(data) + actual = self.func(data*2) + self.assertApproxEqual(actual, expected, rel=1e-13) + + def test_float_overflow(self): + # Test with a set of data which will overflow when multiplied. + data = [2.0**900, 2.0**920, 2.0**960, 2.0**980, 2.0**990] + expected = 2.0**950 + self.assertApproxEqual(self.func(data), expected, rel=1e-13) + data = [2e300, 4e300, 8e300, 16e300, 32e300] + expected = 8e300 + self.assertApproxEqual(self.func(data), expected, rel=1e-13) + + class TestHarmonicMean(NumericTestCase, AverageMixin, UnivariateTypeMixin): def setUp(self): self.func = statistics.harmonic_mean From report at bugs.python.org Sun Oct 2 01:34:12 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 05:34:12 +0000 Subject: [issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4 In-Reply-To: <1396363951.96.0.324613047949.issue21124@psf.upfronthosting.co.za> Message-ID: <20161002053409.19983.37028.197D57BA@psf.io> Roundup Robot added the comment: New changeset 3bde312ae936 by Zachary Ware in branch 'default': Issue #21124: Fix building _struct on Cygwin. https://hg.python.org/cpython/rev/3bde312ae936 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 01:38:25 2016 From: report at bugs.python.org (Zachary Ware) Date: Sun, 02 Oct 2016 05:38:25 +0000 Subject: [issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4 In-Reply-To: <1396363951.96.0.324613047949.issue21124@psf.upfronthosting.co.za> Message-ID: <1475386705.21.0.848421462335.issue21124@psf.upfronthosting.co.za> Zachary Ware added the comment: For future reference, having a patch attached to the issue does not mean the issue is fixed, and it should not be closed. ---------- nosy: +zach.ware stage: -> resolved type: -> compile error versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 01:43:32 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 02 Oct 2016 05:43:32 +0000 Subject: [issue28183] Clean up and speed up dict iteration In-Reply-To: <1474063807.66.0.276436600383.issue28183@psf.upfronthosting.co.za> Message-ID: <1475387012.68.0.779222562904.issue28183@psf.upfronthosting.co.za> INADA Naoki added the comment: dict_iter8.patch is based on dict_iter3.patch. Added some comments and fixing indents. No change about _PyDict_Next API. ---------- Added file: http://bugs.python.org/file44921/dict_iter8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 02:17:32 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 06:17:32 +0000 Subject: [issue28322] chain.__setstate__ Type Confusion In-Reply-To: <1475303268.33.0.0947529181772.issue28322@psf.upfronthosting.co.za> Message-ID: <20161002061729.15793.87859.647EFA22@psf.io> Roundup Robot added the comment: New changeset 258ebc539b2e by Serhiy Storchaka in branch '3.5': Issue #28322: Fixed possible crashes when unpickle itertools objects from https://hg.python.org/cpython/rev/258ebc539b2e New changeset c4937d066a8e by Serhiy Storchaka in branch '3.6': Issue #28322: Fixed possible crashes when unpickle itertools objects from https://hg.python.org/cpython/rev/c4937d066a8e New changeset cb0755aa9f3d by Serhiy Storchaka in branch 'default': Issue #28322: Fixed possible crashes when unpickle itertools objects from https://hg.python.org/cpython/rev/cb0755aa9f3d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 02:21:44 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 06:21:44 +0000 Subject: [issue28322] chain.__setstate__ Type Confusion In-Reply-To: <1475303268.33.0.0947529181772.issue28322@psf.upfronthosting.co.za> Message-ID: <1475389304.63.0.609821583689.issue28322@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution John. cycle.__setstate__() was fixed in a4d5ef7fdec3 in 3.6, but the fix was not backported to 3.5. There is no pickle support in 2.7. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 02:50:46 2016 From: report at bugs.python.org (Oren Milman) Date: Sun, 02 Oct 2016 06:50:46 +0000 Subject: [issue28332] silent truncations in socket.htons and socket.ntohs In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <1475391046.31.0.146797867945.issue28332@psf.upfronthosting.co.za> Oren Milman added the comment: Thanks for the review :) I changed some stuff, according to your comments (and replied to one comment in Rietveld). Version2 diff and test output are attached. ---------- Added file: http://bugs.python.org/file44922/issue28332_ver2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 02:51:22 2016 From: report at bugs.python.org (Oren Milman) Date: Sun, 02 Oct 2016 06:51:22 +0000 Subject: [issue28332] silent truncations in socket.htons and socket.ntohs In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <1475391082.89.0.697934288247.issue28332@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file44923/patchedCPythonTestOutput_ver2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 03:38:16 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 07:38:16 +0000 Subject: [issue28257] Regression for star argument parameter error messages In-Reply-To: <1474631746.14.0.840095421551.issue28257@psf.upfronthosting.co.za> Message-ID: <20161002073813.79323.55602.D9143251@psf.io> Roundup Robot added the comment: New changeset 88b319dfc909 by Serhiy Storchaka in branch '3.6': Issue #28257: Improved error message when pass a non-iterable as https://hg.python.org/cpython/rev/88b319dfc909 New changeset bde594cd8369 by Serhiy Storchaka in branch 'default': Issue #28257: Improved error message when pass a non-iterable as https://hg.python.org/cpython/rev/bde594cd8369 New changeset 40d7ce58ebd0 by Serhiy Storchaka in branch '3.5': Issue #28257: Backported a test. https://hg.python.org/cpython/rev/40d7ce58ebd0 New changeset a8168a52a56f by Serhiy Storchaka in branch '2.7': Issue #28257: Backported a test. https://hg.python.org/cpython/rev/a8168a52a56f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 03:41:56 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 07:41:56 +0000 Subject: [issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow In-Reply-To: <1466473561.23.0.768330028286.issue27358@psf.upfronthosting.co.za> Message-ID: <1475394116.01.0.610363646414.issue27358@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 04:12:37 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 08:12:37 +0000 Subject: [issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow In-Reply-To: <1466473561.23.0.768330028286.issue27358@psf.upfronthosting.co.za> Message-ID: <20161002081225.85867.51377.C38CB0DC@psf.io> Roundup Robot added the comment: New changeset 148172f75d43 by Serhiy Storchaka in branch '3.6': Issue #27358: Optimized merging var-keyword arguments and improved error https://hg.python.org/cpython/rev/148172f75d43 New changeset 489ad68b35c0 by Serhiy Storchaka in branch 'default': Issue #27358: Optimized merging var-keyword arguments and improved error https://hg.python.org/cpython/rev/489ad68b35c0 New changeset ec84d815e90f by Serhiy Storchaka in branch '3.5': Issue #27358: Backported tests. https://hg.python.org/cpython/rev/ec84d815e90f New changeset 29a658d47ae8 by Serhiy Storchaka in branch '2.7': Issue #27358: Backported tests. https://hg.python.org/cpython/rev/29a658d47ae8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 04:37:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 08:37:57 +0000 Subject: [issue28257] Regression for star argument parameter error messages In-Reply-To: <1474631746.14.0.840095421551.issue28257@psf.upfronthosting.co.za> Message-ID: <1475397477.48.0.468257215173.issue28257@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch with smaller (in comparison with issue27358) change for 3.5 that improves error message when pass a non-mapping as second var-keyword argument. Unpatched: >>> f(**{'a': 1}, **[]) Traceback (most recent call last): File "", line 1, in TypeError: 'list' object is not a mapping >>> f(**{'a': 1}, **0) Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is not iterable Patched: >>> f(**{'a': 1}, **[]) Traceback (most recent call last): File "", line 1, in TypeError: f() argument after ** must be a mapping, not list >>> f(**{'a': 1}, **0) Traceback (most recent call last): File "", line 1, in TypeError: f() argument after ** must be a mapping, not int ---------- assignee: -> serhiy.storchaka priority: deferred blocker -> normal versions: +Python 3.5 -Python 3.6, Python 3.7 Added file: http://bugs.python.org/file44924/build-map-unpack-with-call-error-messages-3.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 04:38:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 08:38:18 +0000 Subject: [issue20254] Duplicate bytearray test on test_socket.py In-Reply-To: <1389684647.88.0.881886101386.issue20254@psf.upfronthosting.co.za> Message-ID: <20161002083815.1356.74635.E2213E30@psf.io> Roundup Robot added the comment: New changeset 6406322f4749 by Berker Peksag in branch '3.5': Issue #20254: Fix duplicate tests in test_socket https://hg.python.org/cpython/rev/6406322f4749 New changeset ac9734540eb7 by Berker Peksag in branch '3.6': Issue #20254: Merge from 3.5 https://hg.python.org/cpython/rev/ac9734540eb7 New changeset 7dab3c6ac42f by Berker Peksag in branch 'default': Issue #20254: Merge from 3.6 https://hg.python.org/cpython/rev/7dab3c6ac42f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 04:38:50 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 08:38:50 +0000 Subject: [issue20254] Duplicate bytearray test on test_socket.py In-Reply-To: <1389684647.88.0.881886101386.issue20254@psf.upfronthosting.co.za> Message-ID: <1475397530.72.0.423935420902.issue20254@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 04:39:02 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 08:39:02 +0000 Subject: [issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow In-Reply-To: <1466473561.23.0.768330028286.issue27358@psf.upfronthosting.co.za> Message-ID: <1475397542.62.0.098370611159.issue27358@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:02:35 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 02 Oct 2016 09:02:35 +0000 Subject: [issue20766] reference leaks in pdb In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za> Message-ID: <1475398955.02.0.0615704266893.issue20766@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The problem may still be reproduced by running the attached pdb_refleak.py script. Enter three times 'c' (short for the pdb 'continue' command) and the following line is printed: pdb 3 -> pdb 2 -> pdb 1 This shows that the third pdb instance 'pdb 3', owns indirectly a reference to the second and first pdb instances. As the _signal extension module owns a reference to 'pdb 3' through its sigint_handler() method, then it also owns indirectly a reference to 'pdb 1'. ---------- Added file: http://bugs.python.org/file44925/pdb_refleak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:10:51 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 02 Oct 2016 09:10:51 +0000 Subject: [issue20766] reference leaks in pdb In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za> Message-ID: <1475399451.93.0.883436898122.issue20766@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Oh, test_pdb does not fail anymore in refleak mode as expected (see msg212510 for the change to apply to test_pdb.py in order to reproduce that). 'hg bisect' says that this is happening since: The first bad revision is: changeset: 103552:ee0bbfd972de user: ?ukasz Langa date: Fri Sep 09 22:21:17 2016 -0700 summary: Issue #18401: pdb tests don't read ~/.pdbrc anymore And indeed, this changeset has removed entirely the doctests from the test suite :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:12:15 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 09:12:15 +0000 Subject: [issue28227] gzip does not support pathlib In-Reply-To: <1474446973.31.0.180513637528.issue28227@psf.upfronthosting.co.za> Message-ID: <1475399535.62.0.3842617283.issue28227@psf.upfronthosting.co.za> Berker Peksag added the comment: I've addressed all of Serhiy's review comments. Thanks! ---------- Added file: http://bugs.python.org/file44926/issue28227_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:15:55 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 09:15:55 +0000 Subject: [issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow In-Reply-To: <1466473561.23.0.768330028286.issue27358@psf.upfronthosting.co.za> Message-ID: <1475399755.31.0.0203952872905.issue27358@psf.upfronthosting.co.za> Berker Peksag added the comment: test_unpack_ex fails on several buildbots: http://buildbot.python.org/all/builders/x86-64%20Ubuntu%2015.10%20Skylake%20CPU%203.6/builds/120/steps/test/logs/stdio test test_unpack_ex failed ********************************************************************** File "/home/buildbot/buildarea/3.6.intel-ubuntu-skylake/build/Lib/test/test_unpack_ex.py", line ?, in test.test_unpack_ex.__test__.doctests Failed example: {**1} Expected: Traceback (most recent call last): ... TypeError: 'int' object is not a mapping Got: Traceback (most recent call last): File "/home/buildbot/buildarea/3.6.intel-ubuntu-skylake/build/Lib/doctest.py", line 1330, in __run compileflags, 1), test.globs) File "", line 1, in {**1} TypeError: 'int' object is not a mapping1 ********************************************************************** File "/home/buildbot/buildarea/3.6.intel-ubuntu-skylake/build/Lib/test/test_unpack_ex.py", line ?, in test.test_unpack_ex.__test__.doctests Failed example: {**[]} Expected: Traceback (most recent call last): ... TypeError: 'list' object is not a mapping Got: Traceback (most recent call last): File "/home/buildbot/buildarea/3.6.intel-ubuntu-skylake/build/Lib/doctest.py", line 1330, in __run compileflags, 1), test.globs) File "", line 1, in {**[]} TypeError: 'list' object is not a mapping1 ********************************************************************** 1 items had failures: 2 of 85 in test.test_unpack_ex.__test__.doctests ***Test Failed*** 2 failures. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:17:09 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Sun, 02 Oct 2016 09:17:09 +0000 Subject: [issue28337] Segfault in _struct.unpack_iterator Message-ID: <1475399829.48.0.464642269918.issue28337@psf.upfronthosting.co.za> New submission from Masayuki Yamamoto: After #21224 was applied into default branch, the _struct.unpack_iterator has crashed by segfault. reproduce segfault: $ uname -a Linux masayuki-P35-DS3 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:41:41 UTC 2016 i686 i686 i686 GNU/Linux $ hg update -C -r "branch(default)" $ ./configure --prefix=/opt/py35 --without-threads --with-system-ffi --with-system-expat $ make (build succeed) $ ./python Python 3.7.0a0 (default:6f299f7d6643, Oct 2 2016, 17:50:08) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import struct >>> it = struct.iter_unpack('b', b'123') >>> type(it) (segfault happens) ---------- components: Extension Modules messages: 277867 nosy: mark.dickinson, masamoto, meador.inge, zach.ware priority: normal severity: normal status: open title: Segfault in _struct.unpack_iterator type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:20:17 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 02 Oct 2016 09:20:17 +0000 Subject: [issue28338] test_pdb doctests have been removed from its test suite Message-ID: <1475400017.05.0.963185548302.issue28338@psf.upfronthosting.co.za> New submission from Xavier de Gaye: Changeset ee0bbfd972de in issue 18401 has removed the doctests from the pdb test suite as can be seen by running test_pdb in verbose mode. See also msg277864 that triggered the creation of this issue. Nosying members of the issue 18401 nosy list. ---------- assignee: xdegaye components: Tests messages: 277868 nosy: lukasz.langa, ncoghlan, numerodix, python-dev, r.david.murray, ronaldoussoren, sam.kimbrel, sptonkin, terry.reedy, xdegaye priority: normal severity: normal status: open title: test_pdb doctests have been removed from its test suite type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:21:49 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Sun, 02 Oct 2016 09:21:49 +0000 Subject: [issue28337] Segfault in _struct.unpack_iterator In-Reply-To: <1475399829.48.0.464642269918.issue28337@psf.upfronthosting.co.za> Message-ID: <1475400109.76.0.181071753997.issue28337@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: I made a mistake that is issue number. The correct issue number is #21124. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:22:46 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 02 Oct 2016 09:22:46 +0000 Subject: [issue20766] reference leaks in pdb In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za> Message-ID: <1475400166.88.0.328735238853.issue20766@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > And indeed, this changeset has removed entirely the doctests from the test suite :( Entered new issue 28338. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:35:15 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 09:35:15 +0000 Subject: [issue28332] silent truncations in socket.htons and socket.ntohs In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <20161002093512.75858.94323.A51E0350@psf.io> Roundup Robot added the comment: New changeset 3da460ca854b by Serhiy Storchaka in branch 'default': Issue #28332: Deprecated silent truncations in socket.htons and socket.ntohs. https://hg.python.org/cpython/rev/3da460ca854b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:39:43 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 09:39:43 +0000 Subject: [issue28332] silent truncations in socket.htons and socket.ntohs In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <1475401183.28.0.647956731947.issue28332@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for you contribution Oren. Rules for promotion unsinged integers to signed integers are not simple. I changed PyLong_FromLong() to PyLong_FromUnsignedLong() for the clarity. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:44:15 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 09:44:15 +0000 Subject: [issue28338] test_pdb doctests have been removed from its test suite In-Reply-To: <1475400017.05.0.963185548302.issue28338@psf.upfronthosting.co.za> Message-ID: <20161002094412.79404.62075.0EC23619@psf.io> Roundup Robot added the comment: New changeset 7fe1f23ec60a by Xavier de Gaye in branch '3.6': Issue #28338: Restore test_pdb doctests. https://hg.python.org/cpython/rev/7fe1f23ec60a New changeset d23ac799fe83 by Xavier de Gaye in branch 'default': Issue #28338: Merge from 3.6. https://hg.python.org/cpython/rev/d23ac799fe83 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:46:22 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 02 Oct 2016 09:46:22 +0000 Subject: [issue28338] test_pdb doctests have been removed from its test suite In-Reply-To: <1475400017.05.0.963185548302.issue28338@psf.upfronthosting.co.za> Message-ID: <1475401582.61.0.197181378052.issue28338@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:51:26 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 09:51:26 +0000 Subject: [issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4 In-Reply-To: <1396363951.96.0.324613047949.issue21124@psf.upfronthosting.co.za> Message-ID: <1475401886.91.0.785182657408.issue21124@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PyType_Ready() should be called for unpackiter_type. See also issue26906. ---------- nosy: +serhiy.storchaka resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 05:54:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 09:54:36 +0000 Subject: [issue26906] format(object.__reduce__) fails intermittently In-Reply-To: <1462194444.45.0.679859267338.issue26906@psf.upfronthosting.co.za> Message-ID: <1475402076.0.0.0842147194894.issue26906@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Similar bug just was introduced in issue21124. ---------- priority: normal -> high versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:03:06 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 10:03:06 +0000 Subject: [issue28227] gzip does not support pathlib In-Reply-To: <1474446973.31.0.180513637528.issue28227@psf.upfronthosting.co.za> Message-ID: <1475402586.14.0.0770306567544.issue28227@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You missed one my comment. GzipFile.name is not converted in write mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:06:36 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 10:06:36 +0000 Subject: [issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow In-Reply-To: <1466473561.23.0.768330028286.issue27358@psf.upfronthosting.co.za> Message-ID: <20161002100632.82310.59209.E2F03788@psf.io> Roundup Robot added the comment: New changeset e2d4e077cfb2 by Berker Peksag in branch '3.6': Issue #27358: Fix typo in error message https://hg.python.org/cpython/rev/e2d4e077cfb2 New changeset 9abb316f1593 by Berker Peksag in branch 'default': Issue #27358: Merge from 3.6 https://hg.python.org/cpython/rev/9abb316f1593 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:10:28 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 10:10:28 +0000 Subject: [issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow In-Reply-To: <1466473561.23.0.768330028286.issue27358@psf.upfronthosting.co.za> Message-ID: <1475403028.26.0.724082554714.issue27358@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Berker! This was temporary change for debugging. I forgot to remove it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:19:41 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 10:19:41 +0000 Subject: [issue28227] gzip does not support pathlib In-Reply-To: <1474446973.31.0.180513637528.issue28227@psf.upfronthosting.co.za> Message-ID: <1475403581.68.0.17424404047.issue28227@psf.upfronthosting.co.za> Berker Peksag added the comment: You're right. I definitely missed that one. Here is an updated patch. Thanks again! ---------- Added file: http://bugs.python.org/file44927/issue28227_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:21:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 10:21:38 +0000 Subject: [issue15727] PyType_FromSpecWithBases tp_new bugfix In-Reply-To: <1345391866.4.0.54341725267.issue15727@psf.upfronthosting.co.za> Message-ID: <1475403698.14.0.730923616174.issue15727@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Affected modules were tkinter and curses (see issue23815). This was fixed by explicit nullifying tp_new after calling PyType_FromSpec(). Issue26979 was open for documenting this danger effect. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:21:56 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 10:21:56 +0000 Subject: [issue28227] gzip does not support pathlib In-Reply-To: <1474446973.31.0.180513637528.issue28227@psf.upfronthosting.co.za> Message-ID: <1475403716.19.0.112568626767.issue28227@psf.upfronthosting.co.za> Berker Peksag added the comment: By the way, for some reason it doesn't show up at https://bugs.python.org/review/28227/patch/18629/74286 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:22:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 10:22:24 +0000 Subject: [issue15727] PyType_FromSpecWithBases tp_new bugfix In-Reply-To: <1345391866.4.0.54341725267.issue15727@psf.upfronthosting.co.za> Message-ID: <1475403744.92.0.33498580736.issue15727@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- type: behavior -> crash versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:25:26 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 10:25:26 +0000 Subject: [issue18287] PyType_Ready() should sanity-check the tp_name field In-Reply-To: <1372000372.42.0.425313116494.issue18287@psf.upfronthosting.co.za> Message-ID: <1475403926.17.0.320310153286.issue18287@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:31:01 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 10:31:01 +0000 Subject: [issue18287] PyType_Ready() should sanity-check the tp_name field In-Reply-To: <1372000372.42.0.425313116494.issue18287@psf.upfronthosting.co.za> Message-ID: <1475404261.4.0.623656594206.issue18287@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch LGTM, but I think SystemError is more appropriate. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:38:25 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 10:38:25 +0000 Subject: [issue28227] gzip does not support pathlib In-Reply-To: <1474446973.31.0.180513637528.issue28227@psf.upfronthosting.co.za> Message-ID: <1475404705.63.0.463306150013.issue28227@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch LGTM. ---------- assignee: -> berker.peksag stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:46:52 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 10:46:52 +0000 Subject: [issue28227] gzip does not support pathlib In-Reply-To: <1474446973.31.0.180513637528.issue28227@psf.upfronthosting.co.za> Message-ID: <20161002104649.94990.88915.FBC87565@psf.io> Roundup Robot added the comment: New changeset 3f71d1a93053 by Berker Peksag in branch '3.6': Issue #28227: gzip now supports pathlib https://hg.python.org/cpython/rev/3f71d1a93053 New changeset b244bf74b638 by Berker Peksag in branch 'default': Issue #28227: Merge from 3.6 https://hg.python.org/cpython/rev/b244bf74b638 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:47:36 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 10:47:36 +0000 Subject: [issue28227] gzip does not support pathlib In-Reply-To: <1474446973.31.0.180513637528.issue28227@psf.upfronthosting.co.za> Message-ID: <1475405256.02.0.887659197814.issue28227@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks Ethan and Serhiy. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 06:56:17 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 02 Oct 2016 10:56:17 +0000 Subject: [issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception In-Reply-To: <1475050266.78.0.386373068592.issue28295@psf.upfronthosting.co.za> Message-ID: <1475405777.93.0.572280688493.issue28295@psf.upfronthosting.co.za> Xiang Zhang added the comment: v3 resolves comments on v2. ---------- Added file: http://bugs.python.org/file44928/PyUnicode_AsUCS4_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 07:08:58 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Sun, 02 Oct 2016 11:08:58 +0000 Subject: [issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4 In-Reply-To: <1396363951.96.0.324613047949.issue21124@psf.upfronthosting.co.za> Message-ID: <1475406538.95.0.78196431643.issue21124@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: I wrote a patch to add the unpackiter_type initialization into PyInit__struct function. I has confirmed solve #28337 on ubuntu x86 16.04. ---------- nosy: +masamoto Added file: http://bugs.python.org/file44929/PyType_Ready-unpackiter_type.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 08:19:57 2016 From: report at bugs.python.org (Jaap van der Velde) Date: Sun, 02 Oct 2016 12:19:57 +0000 Subject: [issue28294] HTTPServer server.py assumes sys.stderr != None In-Reply-To: <1475046504.95.0.666561329413.issue28294@psf.upfronthosting.co.za> Message-ID: <1475410797.87.0.257065443506.issue28294@psf.upfronthosting.co.za> Jaap van der Velde added the comment: Breaking the API isn't good, but it will only break if log_message doesn't *receive* all messages, because that's what people who override it count on. If there's some way of detecting who called log_message, you could use the appropriate log level on logging without compromising the API. But the only way I see without changing the signature of log_message is through inspect functions like getouterframes and that seems way nastier than these functions merit... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 09:19:01 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 02 Oct 2016 13:19:01 +0000 Subject: [issue28335] Exception reporting in `logging.config` In-Reply-To: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> Message-ID: <1475414341.72.0.264665451676.issue28335@psf.upfronthosting.co.za> Vinay Sajip added the comment: This is marked as relevant to Python 3.7, so I ran a test script using the latest Python sources: import logging import logging.config import sys def main(): config = { 'version': 1, 'formatters': { 'default': { '()': 'foo', }, } } logging.config.dictConfig(config) if __name__ == '__main__': sys.exit(main()) The exception printouts with/without "raise ... from" are shown in this Gist: https://gist.github.com/vsajip/a17b51695bbe16bd3c9e156405388e57 I can't see much difference in terms of figuring out where the exception came from. The only substantial difference is one line "During handling of the above exception, another exception occurred:" with another "The above exception was the direct cause of the following exception:". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 09:25:45 2016 From: report at bugs.python.org (Ram Rachum) Date: Sun, 02 Oct 2016 13:25:45 +0000 Subject: [issue28335] Exception reporting in `logging.config` In-Reply-To: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> Message-ID: <1475414745.73.0.0545810899932.issue28335@psf.upfronthosting.co.za> Ram Rachum added the comment: You're right Vinay: I missed that first traceback because I wasn't running code in the console, I was running it with a debugger. (I'll ask my debugger vendor to maybe include these extra tracebacks.) But in any case, I think that the correct way to raise would be with `from`, don't you think? (It's also more likely that debugger vendor would include these tracebacks rather than the "During handling" traceback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 09:49:21 2016 From: report at bugs.python.org (Zachary Ware) Date: Sun, 02 Oct 2016 13:49:21 +0000 Subject: [issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4 In-Reply-To: <1396363951.96.0.324613047949.issue21124@psf.upfronthosting.co.za> Message-ID: <1475416161.22.0.593686011933.issue21124@psf.upfronthosting.co.za> Zachary Ware added the comment: Do we not have a unit test for that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 10:04:41 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sun, 02 Oct 2016 14:04:41 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1475417081.48.0.540045776559.issue9850@psf.upfronthosting.co.za> Changes by Chi Hsuan Yen : Added file: http://bugs.python.org/file44930/3.6-deprecate-macpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 10:07:11 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sun, 02 Oct 2016 14:07:11 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1475417231.17.0.189735811548.issue9850@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Here are my tries. There are more MacOS-specific module names in Tools/freeze/freeze.py. They are unrelated to macpath so I leave them to the next bug. ---------- Added file: http://bugs.python.org/file44931/3.7-remove-macpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 10:20:48 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sun, 02 Oct 2016 14:20:48 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1475418048.26.0.628323159218.issue9850@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Oops forgot to commit deleted files in the 3.7 patch. ---------- Added file: http://bugs.python.org/file44932/3.7-remove-macpath_ver2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 10:50:53 2016 From: report at bugs.python.org (Dimitri Merejkowsky) Date: Sun, 02 Oct 2016 14:50:53 +0000 Subject: [issue28334] netrc does not work if $HOME is not set In-Reply-To: <1475336154.44.0.44449733804.issue28334@psf.upfronthosting.co.za> Message-ID: <1475419853.51.0.165761937343.issue28334@psf.upfronthosting.co.za> Dimitri Merejkowsky added the comment: > However, since we are changing the behavior of the netrc() class, I'm not sure this can be considered as a bug fix. I was not sure either. The patch does change behavior in subtle ways... I've added a new patch, and sent the CLA form. Thanks for your time! ---------- Added file: http://bugs.python.org/file44933/netrc-use-expanduser-with-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 11:16:57 2016 From: report at bugs.python.org (=?utf-8?q?Micha=C5=82_Klich?=) Date: Sun, 02 Oct 2016 15:16:57 +0000 Subject: [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1475421417.38.0.443474097267.issue16399@psf.upfronthosting.co.za> Micha? Klich added the comment: The documentation for argparse still does not mention this behaviour. I decided to make a patch based no the optparse issue. Hopefully it is good enough to be merged. ---------- keywords: +patch nosy: +michal.klich Added file: http://bugs.python.org/file44934/append_to_default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 11:21:33 2016 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 02 Oct 2016 15:21:33 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module Message-ID: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: Commits 09cc43df4509 (3.5), 81f27d3ab214 (3.6), 8f0df4db2b06 (3.7) cause "TypeError: Parameterized generics cannot be used with class or instance checks" errors in 4 tests in Lib/test/test_functools.py file in situation when typing module is already imported. Examples of steps to reproduce: $ LD_LIBRARY_PATH="$(pwd)" ./python -m test -v test_typing test_functools $ LD_LIBRARY_PATH="$(pwd)" ./python -m test -v test___all__ test_functools $ LD_LIBRARY_PATH="$(pwd)" ./python -c 'import runpy, typing; runpy.run_module("test")' -v test_functools Errors in test_functools: ====================================================================== ERROR: test_cache_invalidation (test.test_functools.TestSingleDispatch) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/cpython/Lib/functools.py", line 776, in dispatch impl = dispatch_cache[cls] File "/tmp/cpython/Lib/test/test_functools.py", line 1896, in __getitem__ result = self.data[key] KeyError: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/cpython/Lib/functools.py", line 779, in dispatch impl = registry[cls] KeyError: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/cpython/Lib/test/test_functools.py", line 1955, in test_cache_invalidation self.assertEqual(g(d), "sized") File "/tmp/cpython/Lib/functools.py", line 801, in wrapper return dispatch(args[0].__class__)(*args, **kw) File "/tmp/cpython/Lib/functools.py", line 781, in dispatch impl = _find_impl(cls, registry) File "/tmp/cpython/Lib/functools.py", line 732, in _find_impl mro = _compose_mro(cls, registry.keys()) File "/tmp/cpython/Lib/functools.py", line 709, in _compose_mro if sub not in bases and issubclass(cls, sub): File "/tmp/cpython/Lib/typing.py", line 1043, in __subclasscheck__ raise TypeError("Parameterized generics cannot be used with class " TypeError: Parameterized generics cannot be used with class or instance checks ====================================================================== ERROR: test_compose_mro (test.test_functools.TestSingleDispatch) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/cpython/Lib/test/test_functools.py", line 1594, in test_compose_mro m = mro(c.defaultdict, [c.Sized, c.Container, str]) File "/tmp/cpython/Lib/functools.py", line 709, in _compose_mro if sub not in bases and issubclass(cls, sub): File "/tmp/cpython/Lib/typing.py", line 1043, in __subclasscheck__ raise TypeError("Parameterized generics cannot be used with class " TypeError: Parameterized generics cannot be used with class or instance checks ====================================================================== ERROR: test_mro_conflicts (test.test_functools.TestSingleDispatch) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/cpython/Lib/functools.py", line 776, in dispatch impl = dispatch_cache[cls] File "/tmp/cpython/Lib/test/test_functools.py", line 1896, in __getitem__ result = self.data[key] KeyError: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/cpython/Lib/functools.py", line 779, in dispatch impl = registry[cls] KeyError: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/cpython/Lib/test/test_functools.py", line 1822, in test_mro_conflicts h(c.defaultdict(lambda: 0)) File "/tmp/cpython/Lib/functools.py", line 801, in wrapper return dispatch(args[0].__class__)(*args, **kw) File "/tmp/cpython/Lib/functools.py", line 781, in dispatch impl = _find_impl(cls, registry) File "/tmp/cpython/Lib/functools.py", line 732, in _find_impl mro = _compose_mro(cls, registry.keys()) File "/tmp/cpython/Lib/functools.py", line 709, in _compose_mro if sub not in bases and issubclass(cls, sub): File "/tmp/cpython/Lib/typing.py", line 1043, in __subclasscheck__ raise TypeError("Parameterized generics cannot be used with class " TypeError: Parameterized generics cannot be used with class or instance checks ====================================================================== ERROR: test_register_abc (test.test_functools.TestSingleDispatch) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/cpython/Lib/functools.py", line 776, in dispatch impl = dispatch_cache[cls] File "/tmp/cpython/Lib/test/test_functools.py", line 1896, in __getitem__ result = self.data[key] KeyError: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/cpython/Lib/functools.py", line 779, in dispatch impl = registry[cls] KeyError: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/cpython/Lib/test/test_functools.py", line 1641, in test_register_abc self.assertEqual(g(d), "sized") File "/tmp/cpython/Lib/functools.py", line 801, in wrapper return dispatch(args[0].__class__)(*args, **kw) File "/tmp/cpython/Lib/functools.py", line 781, in dispatch impl = _find_impl(cls, registry) File "/tmp/cpython/Lib/functools.py", line 732, in _find_impl mro = _compose_mro(cls, registry.keys()) File "/tmp/cpython/Lib/functools.py", line 709, in _compose_mro if sub not in bases and issubclass(cls, sub): File "/tmp/cpython/Lib/typing.py", line 1043, in __subclasscheck__ raise TypeError("Parameterized generics cannot be used with class " TypeError: Parameterized generics cannot be used with class or instance checks ---------------------------------------------------------------------- Ran 186 tests in 0.431s FAILED (errors=4) ---------- components: Library (Lib), Tests messages: 277896 nosy: Arfrever, gvanrossum, ncoghlan, rhettinger priority: normal severity: normal status: open title: "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 11:48:07 2016 From: report at bugs.python.org (sreyas) Date: Sun, 02 Oct 2016 15:48:07 +0000 Subject: [issue28335] Exception reporting in `logging.config` In-Reply-To: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> Message-ID: <1475423287.16.0.818497699434.issue28335@psf.upfronthosting.co.za> Changes by sreyas : ---------- keywords: +patch Added file: http://bugs.python.org/file44935/raisefrom.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 11:51:14 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 02 Oct 2016 15:51:14 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1475423474.81.0.100039533991.issue28339@psf.upfronthosting.co.za> Guido van Rossum added the comment: Sorry about that. I haven't looked into this but I suspect this is due to some manipulation of the ABC registry by typing.py that exceed their intended scope. I'll ask Ivan to fix it; if he's not available before b2 goes out I'll roll this back. ---------- keywords: +3.5regression nosy: +larry, levkivskyi, ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 11:51:27 2016 From: report at bugs.python.org (Rob Malouf) Date: Sun, 02 Oct 2016 15:51:27 +0000 Subject: [issue28340] TextIOWrapper.tell extremely slow Message-ID: <1475423487.6.0.338998508065.issue28340@psf.upfronthosting.co.za> New submission from Rob Malouf: io.TextIOWrapper.tell() is unusably slow in Python 2.7. This same problem was introduced in Python 3 and fixed in Python 3.3 (see Issue # 11114). Any chance of getting the fix backported into the Python 2.7 library? It would make it much easier to modernize Unicode handling in libraries that have to support both 2 and 3 using the same codebase. ---------- components: IO messages: 277898 nosy: rmalouf priority: normal severity: normal status: open title: TextIOWrapper.tell extremely slow type: performance versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 11:59:33 2016 From: report at bugs.python.org (Ram Rachum) Date: Sun, 02 Oct 2016 15:59:33 +0000 Subject: [issue28335] Exception reporting in `logging.config` In-Reply-To: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> Message-ID: <1475423973.11.0.687580797906.issue28335@psf.upfronthosting.co.za> Ram Rachum added the comment: Thanks for the patch sreyas! Maybe we should also take this opportunity to remove the string formatting from the exception that shows the name of the original exception? Because when you think about it, it's just a poor man's `raise from`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 12:13:14 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 02 Oct 2016 16:13:14 +0000 Subject: [issue20766] reference leaks in pdb In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za> Message-ID: <1475424794.96.0.738086664906.issue20766@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Uploaded refleak_5.patch with a simpler test case. With the patch applied, './python -m test -R 3:3 test_pdb' runs with success. The '_previous_sigint_handler' is reset at the Pdb prompt - instead of when the signal is triggered - to handle the case where pdb stops at a new set_trace() hard breakpoint after it has been run with 'continue'. As a side effect, this also fixes issue 22502. ---------- assignee: -> xdegaye stage: -> patch review versions: +Python 3.6, Python 3.7 -Python 3.4 Added file: http://bugs.python.org/file44936/refleak_5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 12:27:35 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 16:27:35 +0000 Subject: [issue28225] bz2 does not support pathlib In-Reply-To: <1474443304.08.0.670640094883.issue28225@psf.upfronthosting.co.za> Message-ID: <1475425655.3.0.69676042049.issue28225@psf.upfronthosting.co.za> Berker Peksag added the comment: Here's an updated patch. ---------- Added file: http://bugs.python.org/file44937/issue28225_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 12:43:37 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 16:43:37 +0000 Subject: [issue28225] bz2 does not support pathlib In-Reply-To: <1474443304.08.0.670640094883.issue28225@psf.upfronthosting.co.za> Message-ID: <1475426617.86.0.25742538294.issue28225@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +serhiy.storchaka stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 13:05:23 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 17:05:23 +0000 Subject: [issue28225] bz2 does not support pathlib In-Reply-To: <1474443304.08.0.670640094883.issue28225@psf.upfronthosting.co.za> Message-ID: <20161002170520.21187.88698.A2C91030@psf.io> Roundup Robot added the comment: New changeset fc0c244c6e79 by Berker Peksag in branch '3.6': Issue #28225: bz2 module now supports pathlib https://hg.python.org/cpython/rev/fc0c244c6e79 New changeset 0e9b77424d10 by Berker Peksag in branch 'default': Issue #28225: Merge from 3.6 https://hg.python.org/cpython/rev/0e9b77424d10 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 13:05:47 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 17:05:47 +0000 Subject: [issue28225] bz2 does not support pathlib In-Reply-To: <1474443304.08.0.670640094883.issue28225@psf.upfronthosting.co.za> Message-ID: <1475427947.0.0.198303975714.issue28225@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 13:24:57 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 02 Oct 2016 17:24:57 +0000 Subject: [issue28229] lzma does not support pathlib Message-ID: <1475429097.02.0.755290053819.issue28229@psf.upfronthosting.co.za> New submission from Berker Peksag: Here's an updated patch that adds more tests and documentation changes. ---------- components: +Library (Lib) nosy: +berker.peksag Added file: http://bugs.python.org/file44938/issue28229_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 13:39:02 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 17:39:02 +0000 Subject: [issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception In-Reply-To: <1475050266.78.0.386373068592.issue28295@psf.upfronthosting.co.za> Message-ID: <1475429942.9.0.212101722993.issue28295@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The remaining question is what should be the type of the exception. ValueError is documented exception, but SystemError is actually raised exception (and it always was raised). PyUnicode_AsUCS4() is used 6 times in 3 files in CPython code, and it should never raise this exception. PyUnicode_AsUCS4() is in public API an can be used in third party code. Seems raising this exception can be caused only by programming error in C extension. SystemError is right exception in this case. It looks to me that the code is correct and the documentation should be fixed to match the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 13:54:06 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 02 Oct 2016 17:54:06 +0000 Subject: [issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception In-Reply-To: <1475050266.78.0.386373068592.issue28295@psf.upfronthosting.co.za> Message-ID: <1475430846.31.0.02389454225.issue28295@psf.upfronthosting.co.za> Xiang Zhang added the comment: Yes. Changing the implementation or the doc is still in question so in the title I just use conflicts. Scanning unicodeobject.c there seems no general rules about which to use. But actually I'm in favour of ValueError. From the description in https://docs.python.org/3/library/exceptions.html, SystemError is raised when the interpreter finds an internal error. I actually don't think this error is an interpreter internal error. But no matter what the resolution is, we can add a test for ucs4. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 13:55:42 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 17:55:42 +0000 Subject: [issue28286] gzip guessing of mode is ambiguilous In-Reply-To: <1474984904.89.0.353695342219.issue28286@psf.upfronthosting.co.za> Message-ID: <1475430942.92.0.52031328847.issue28286@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Or maybe FutureWarning is better than DeprecationWarning. ---------- Added file: http://bugs.python.org/file44939/gzip_deprecate_implicit_write2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 14:31:24 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Oct 2016 18:31:24 +0000 Subject: [issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception In-Reply-To: <1475050266.78.0.386373068592.issue28295@psf.upfronthosting.co.za> Message-ID: <20161002183121.20698.36359.801C41AD@psf.io> Roundup Robot added the comment: New changeset ac838bf5499d by Serhiy Storchaka in branch '3.5': Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4(). https://hg.python.org/cpython/rev/ac838bf5499d New changeset 3efeafc6517a by Serhiy Storchaka in branch '3.6': Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4(). https://hg.python.org/cpython/rev/3efeafc6517a New changeset 94fb4c4f58dd by Serhiy Storchaka in branch 'default': Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4(). https://hg.python.org/cpython/rev/94fb4c4f58dd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 14:35:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 18:35:19 +0000 Subject: [issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception In-Reply-To: <1475050266.78.0.386373068592.issue28295@psf.upfronthosting.co.za> Message-ID: <1475433319.21.0.750622513453.issue28295@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Additional tests are always nice. Thank you for your report and your patch Xiang. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 14:35:41 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 18:35:41 +0000 Subject: [issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception In-Reply-To: <1475050266.78.0.386373068592.issue28295@psf.upfronthosting.co.za> Message-ID: <1475433341.81.0.907030810845.issue28295@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 14:50:39 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 02 Oct 2016 18:50:39 +0000 Subject: [issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception In-Reply-To: <1475050266.78.0.386373068592.issue28295@psf.upfronthosting.co.za> Message-ID: <1475434239.05.0.398230403051.issue28295@psf.upfronthosting.co.za> Xiang Zhang added the comment: Serhiy, in 05788a9a0b88, test_invalid_sequences seems don't have to stay in CAPITest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 15:00:59 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 19:00:59 +0000 Subject: [issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception In-Reply-To: <1475050266.78.0.386373068592.issue28295@psf.upfronthosting.co.za> Message-ID: <1475434859.51.0.920258375781.issue28295@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good catch! Thanks Xiang. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 17:10:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Oct 2016 21:10:38 +0000 Subject: [issue26906] format(object.__reduce__) fails intermittently In-Reply-To: <1462194444.45.0.679859267338.issue26906@psf.upfronthosting.co.za> Message-ID: <1475442638.57.0.999214393625.issue26906@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yet one similar bug: issue11702. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 18:05:26 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 02 Oct 2016 22:05:26 +0000 Subject: [issue26906] format(object.__reduce__) fails intermittently In-Reply-To: <1462194444.45.0.679859267338.issue26906@psf.upfronthosting.co.za> Message-ID: <1475445926.01.0.756689252382.issue26906@psf.upfronthosting.co.za> Guido van Rossum added the comment: Serhiy -- please do what do you think we should do. At this point I'm open to just about anything, but I don't feel comfortable creating or reviewing patches any more. ---------- assignee: gvanrossum -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 18:57:36 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 02 Oct 2016 22:57:36 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1475449056.31.0.658857315799.issue8145@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 18:59:15 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 02 Oct 2016 22:59:15 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475449155.52.0.574620154831.issue10716@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 18:59:33 2016 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 02 Oct 2016 22:59:33 +0000 Subject: [issue28341] cpython tip fails to build on Mac OS X Message-ID: <1475449173.08.0.90782279022.issue28341@psf.upfronthosting.co.za> New submission from Skip Montanaro: Just trying an infrequent update of tip (last time seems to have been early July), I get a link error on my Mac: % make ./Programs/_freeze_importlib \ ./Lib/importlib/_bootstrap.py Python/importlib.h dyld: lazy symbol binding failed: Symbol not found: _getentropy Referenced from: /Users/skip/src/hgpython/cpython/./Programs/_freeze_importlib Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: _getentropy Referenced from: /Users/skip/src/hgpython/cpython/./Programs/_freeze_importlib Expected in: /usr/lib/libSystem.B.dylib make: *** [Python/importlib.h] Trace/BPT trap: 5 I'm running Mac OS X 10.11.6, and upgraded to XCode 8.0 a few days ago. Searching for the error, I saw some suggestions elsewhere on the web that this might be a known problem, though I saw nothing here (just searched for _getentropy). ---------- components: Build messages: 277914 nosy: skip.montanaro priority: normal severity: normal status: open title: cpython tip fails to build on Mac OS X type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 19:01:53 2016 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 02 Oct 2016 23:01:53 +0000 Subject: [issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0 In-Reply-To: <1475449173.08.0.90782279022.issue28341@psf.upfronthosting.co.za> Message-ID: <1475449313.91.0.171645276125.issue28341@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- title: cpython tip fails to build on Mac OS X -> cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 19:05:19 2016 From: report at bugs.python.org (paul j3) Date: Sun, 02 Oct 2016 23:05:19 +0000 Subject: [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1475449519.43.0.914153568745.issue16399@psf.upfronthosting.co.za> paul j3 added the comment: It may help to know something about how defaults are handled - in general. `add_argument` and `set_defaults` set the `default` attribute of the Action (the object created by `add_argument` to hold all of its information). The default `default` is `None`. At the start of `parse_args`, a fresh Namespace is created, and all defaults are loaded into it (I'm ignoring some details). The argument strings are then parsed, and individual Actions update the Namespace with their values, via their `__call__` method. At the end of parsing it reviews the Namespace. Any remaining defaults that are strings are evaluated (passed through `type` function that converts a commandline string). The handling of defaults threads a fine line between giving you maximum power, and keeping things simple and predictable. The important thing for this issue is that the defaults are loaded into the Namespace at the start of parsing. The `append` call fetches the value from the Namespace, replaces it with `[]` if it is None, appends the new value(s), and puts it back on the Namespace. The first `--foo` append is handled in just the same way as the 2nd and third (fetch, append, and put back). The first can't tell that the list it fetches from the namespace came from the `default` as opposed to a previous `append`. The `__call__` for `append` was intentionally kept simple, and predictable. As I demonstrated earlier it is possible to write an `append` that checks the namespace value against some default, and does something different. But that is more complicated. The simplest alternative to this behavior is to leave the default as None. If after parsing the value is still None, put the desired list (or any other object) there. The primary purpose of the parser is to parse the commandline - to figure out what the user wants to tell you. There's nothing wrong with tweaking (and checking) the `args` Namespace after parsing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 19:48:13 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sun, 02 Oct 2016 23:48:13 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1475452093.42.0.532519940921.issue28128@psf.upfronthosting.co.za> Emanuel Barry added the comment: Ping. I'd like for this to get merged in beta 2; should I (or Eric if he wants to) get to work on this? Is the DeprecatedSyntaxWarning subclass route still desired? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 19:48:56 2016 From: report at bugs.python.org (Alexander Mohr) Date: Sun, 02 Oct 2016 23:48:56 +0000 Subject: [issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf Message-ID: <1475452134.75.0.942961822081.issue28342@psf.upfronthosting.co.za> New submission from Alexander Mohr: I have a unittest which spawns several processes repeatedly. One of these subprocesses uses botocore, which itself uses the above two methods through the calls proxy_bypass and getproxies. It seems after re-spawning the methods a few times the titled calls eventually repeatedly cause python to crash on 10.12. I have a core file if that would help, zip'd it's ~242MB. I've attached a file that shows the lldb callstack and python callstack. ---------- components: Library (Lib) files: python_urllib_crash.txt messages: 277917 nosy: thehesiod priority: normal severity: normal status: open title: OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf versions: Python 3.5 Added file: http://bugs.python.org/file44940/python_urllib_crash.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 20:23:15 2016 From: report at bugs.python.org (John Mark Vandenberg) Date: Mon, 03 Oct 2016 00:23:15 +0000 Subject: [issue25699] Easier way to specify reduced globals for doctest In-Reply-To: <1448225180.77.0.54969716848.issue25699@psf.upfronthosting.co.za> Message-ID: <1475454195.42.0.455668765751.issue25699@psf.upfronthosting.co.za> John Mark Vandenberg added the comment: pyflakes does assume doctest run with a copy of the module scope. However when there is an __all__, the module scope as seen by other modules 'should' be only items in __all__. If a doctest is included in documentation, it 'should' only use names that are in __all__. In addition, pyflakes has an outstanding feature request (https://bugs.launchpad.net/pyflakes/+bug/1178807/comments/8) that doctest run as if they are an independent module, and need to import everything that they use, so that each doctest is self-contained. pyflakes can build support for both of those needs within the package. No worries. If you cant see a broader need for these, please close. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 20:31:40 2016 From: report at bugs.python.org (paul j3) Date: Mon, 03 Oct 2016 00:31:40 +0000 Subject: [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1475454700.32.0.885180578725.issue16399@psf.upfronthosting.co.za> paul j3 added the comment: One thing that this default behavior does is allow us to append values to any object, just so long as it has the `append` method. The default does not have to be a standard list. For example, in another bug/issue someone asked for an `extend` action. I could provide that with `append` and a custom list class class MyList(list): def append(self,arg): if isinstance(arg,list): self.extend(arg) else: super(MyList, self).append(arg) This just modifies `append` so that it behaves like `extend` when given a list argument. parser = argparse.ArgumentParser() a = parser.add_argument('-f', action='append', nargs='*',default=[]) args = parser.parse_args('-f 1 2 3 -f 4 5'.split()) produces a nested list: In [155]: args Out[155]: Namespace(f=[['1', '2', '3'], ['4', '5']]) but if I change the `default`: a.default = MyList([]) args = parser.parse_args('-f 1 2 3 -f 4 5'.split()) produces a flat list: In [159]: args Out[159]: Namespace(f=['1', '2', '3', '4', '5']) I've tested this idea with an `array.array` and `set` subclass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 22:03:26 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 03 Oct 2016 02:03:26 +0000 Subject: [issue11702] dir on return value of msilib.OpenDatabase() crashes python In-Reply-To: <1301325222.81.0.910767875041.issue11702@psf.upfronthosting.co.za> Message-ID: <1475460206.23.0.0491116198689.issue11702@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is a generic issue as there are multiple unready types that can raise (or in this case crash) with code that should work. #26906 gives other examples and discussion of possible generic solutions that would make this issue obsolete. ---------- nosy: +serhiy.storchaka, terry.reedy versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 22:22:59 2016 From: report at bugs.python.org (Alexander Mohr) Date: Mon, 03 Oct 2016 02:22:59 +0000 Subject: [issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf In-Reply-To: <1475452134.75.0.942961822081.issue28342@psf.upfronthosting.co.za> Message-ID: <1475461379.32.0.776715355371.issue28342@psf.upfronthosting.co.za> Alexander Mohr added the comment: interestingly I haven't been able to get this to crash in a separate test app. There must be either timing related to some interaction with another module. let me know how you guys would like to proceed. I can definitely reproduce it consistently in our application. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 22:33:05 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Oct 2016 02:33:05 +0000 Subject: [issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf In-Reply-To: <1475452134.75.0.942961822081.issue28342@psf.upfronthosting.co.za> Message-ID: <1475461985.94.0.698240324066.issue28342@psf.upfronthosting.co.za> Ned Deily added the comment: This is likely a duplicate of issues like #27126 and #13829. In #24273 there is a suggested workaround: set environment variable "no_proxy" to "*". http://bugs.python.org/issue24273#msg243963 ---------- nosy: +ned.deily resolution: -> duplicate superseder: -> exception error in _scproxy.so when called after fork _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 22:33:19 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Oct 2016 02:33:19 +0000 Subject: [issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf In-Reply-To: <1475452134.75.0.942961822081.issue28342@psf.upfronthosting.co.za> Message-ID: <1475461999.82.0.710690458888.issue28342@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 22:43:56 2016 From: report at bugs.python.org (=?utf-8?q?Rog=C3=A9rio_Nunes_Wolff?=) Date: Mon, 03 Oct 2016 02:43:56 +0000 Subject: [issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents In-Reply-To: <1444404560.14.0.409888700573.issue25356@psf.upfronthosting.co.za> Message-ID: <1475462636.57.0.558949721527.issue25356@psf.upfronthosting.co.za> Rog?rio Nunes Wolff added the comment: I find this bug recently in my IDLE. Ubuntu 14.04, Python 3.4.3, Tk 8.6.1. How can I fix this? ---------- nosy: +rogeriowolff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 22:46:21 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Oct 2016 02:46:21 +0000 Subject: [issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0 In-Reply-To: <1475449173.08.0.90782279022.issue28341@psf.upfronthosting.co.za> Message-ID: <1475462781.47.0.506458144593.issue28341@psf.upfronthosting.co.za> Ned Deily added the comment: There are various reports about Xcode 8.0 providing a 10.12 SDK which will include refs to symbols not available yet on 10.11. Try installing the command line tools via: $ xcode-select --install and doing a "make distclean" and then a complete configure and rebuild. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 23:11:31 2016 From: report at bugs.python.org (Mingye Wang (Arthur2e5)) Date: Mon, 03 Oct 2016 03:11:31 +0000 Subject: [issue28343] Bad encoding alias cp936 -> gbk: euro sign Message-ID: <1475464291.36.0.0934021228231.issue28343@psf.upfronthosting.co.za> New submission from Mingye Wang (Arthur2e5): Microsoft's cp936 defines a euro sign at 0x80, but Python would kick the bucket when asked to do something like `u'\u20ac'.encode('cp936')`. This may break things for zh-hans-cn windows users who wants to put a euro sign in their file name (if they insist on using a non-unicode str for open() in py2, well.) By looking at the codecs documentation, 'cp936' appears to be an alias for the GBK encoder, which by itself has been a very ambiguous name and subject to confusion -- The name "GBK" might refer to any of the four commonly-known members of the family of EUC-CN (gb2312) extensions that has full coverage of Unicode 1.1 CJK Unified Ideographs block: 1) The original GBK. Rust-Encoding says that it's in a normative annex of GB13000.1-1993, but the closest thing I can find in my archive.org copy of that standard is an annex on an EUC (GB/T 2311) UCS. 2) IANA GBK, or Microsoft cp936. This is the one with the euro sign I am looking for. 3) GBK 1.0, a recommendation from the official standardization committees based on cp936. It's roughly cp936 without the euro sign but with some additional 95 PUA code points. 4) W3C TR GBK. This GBK is basically gb18030-2005 without four-byte UTF, and with the euro sign. Roughly a union of 2) and 3) with some PUA code points moved into the right place. Looking at Modules/cjkcodecs/_codecs_cn.c @ 104259:36b052adf5a7, Python seems to be doing either 1) or 3). For a quick fix you can just make an additional cp936 encoding around the gbk encoding that handles U+20AC; for some excitement (of potentially breaking stuff) you can join the web people and use either 2) or 4). ---------- components: Unicode messages: 277925 nosy: Mingye Wang (Arthur2e5), ezio.melotti, haypo priority: normal severity: normal status: open title: Bad encoding alias cp936 -> gbk: euro sign type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 23:50:57 2016 From: report at bugs.python.org (Mingye Wang) Date: Mon, 03 Oct 2016 03:50:57 +0000 Subject: [issue24036] GB2312 codec is using a wrong covert table In-Reply-To: <1429781381.54.0.113233811407.issue24036@psf.upfronthosting.co.za> Message-ID: <1475466657.29.0.442621050122.issue24036@psf.upfronthosting.co.za> Mingye Wang added the comment: > Advice for final user: This seems something worthy of adding to the codecs doc as a footnote. Perhaps something like "(deprecated) ... gb2312 is an obsolete encoding from the 1980s. Use gbk or gb18030 instead." will do. > libiconv-1.14 is also using the wrong version. Just a side note on the right/wrongfulness of libiconv: I have reported the GB18030 incompatibility as a libiconv bug.[1] From the replies, I learnt that 1) what libiconv is using currently is a then-official mapping published on ftp.unicode.org; 2) vendor implementations of gb2312 differed historically. I have updated the corresponding section[2] on Wikipedia to include these old references. [1]: https://lists.gnu.org/archive/html/bug-gnu-libiconv/2016-09/msg00004.html [2]: https://en.wikipedia.org/wiki/GB_2312#Two_implementations_of_GB2312 Still, being old and common does not necessarily mean being correct, as Ma Lin have demonstrated by showing the character semantics. To reflect this in a better-supported manner, I have added names for the glyphs in question from GB2312-80 to [2]. ---------- nosy: +Artoria2e5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 23:58:48 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 03 Oct 2016 03:58:48 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1475467128.94.0.240769510318.issue26806@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I ran into this again. Raising priority. ---------- priority: normal -> high title: IDLE not displaying RecursionError tracebacks -> IDLE not displaying RecursionError tracebacks and hangs versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 00:00:10 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 03 Oct 2016 04:00:10 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1475467210.33.0.152184580076.issue28339@psf.upfronthosting.co.za> Guido van Rossum added the comment: Offline, Ivan and I have discussed a solution. We can make a small incision in typing.py that will fix this, at the cost of still allowing isinstance()/issubclass()). We also have a slightly better quick fix in mind. Ultimately we will have a more complex and complete fix, and if that's not ready by b2, one of the quicker fixes will definitely be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 01:34:11 2016 From: report at bugs.python.org (George Fagin) Date: Mon, 03 Oct 2016 05:34:11 +0000 Subject: [issue28264] Turtle.onclick events blocked by Turtle.stamp In-Reply-To: <1474684600.08.0.523173866083.issue28264@psf.upfronthosting.co.za> Message-ID: <1475472851.87.0.562514601529.issue28264@psf.upfronthosting.co.za> George Fagin added the comment: When you say "left click always moves the turtle" I fear my explanation was not clear enough. A left click always moves the turtle in my version as well. What changes when stamp is activated is that OnClick events are not issued when you click on the turtle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 02:05:23 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 03 Oct 2016 06:05:23 +0000 Subject: [issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) In-Reply-To: <1445194189.09.0.0973348556564.issue25435@psf.upfronthosting.co.za> Message-ID: <1475474723.08.0.453706764272.issue25435@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 02:14:44 2016 From: report at bugs.python.org (spooja) Date: Mon, 03 Oct 2016 06:14:44 +0000 Subject: [issue28344] Python 3.5.2 hangs when running in session 0 Message-ID: <1475475284.89.0.546394834548.issue28344@psf.upfronthosting.co.za> New submission from spooja: Started the python 3.5.2 exe in session 0 using the task scheduler, 2 instances of python are running in task manager and the process gets hanged, killing the process did not create any logs in %temp% folder. ---------- messages: 277930 nosy: spooja priority: normal severity: normal status: open title: Python 3.5.2 hangs when running in session 0 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 02:16:34 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Mon, 03 Oct 2016 06:16:34 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1475475394.9.0.758828365004.issue28339@psf.upfronthosting.co.za> Changes by Chi Hsuan Yen : ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 02:20:30 2016 From: report at bugs.python.org (Jonas Wegelius) Date: Mon, 03 Oct 2016 06:20:30 +0000 Subject: [issue28345] 8/3 is calculated incorrectly Message-ID: <1475475630.46.0.74903307256.issue28345@psf.upfronthosting.co.za> New submission from Jonas Wegelius: When you type 8/3, the interpreter return incorrect value: 2.6666666666666665 it should be 2.6666666666666667 ---------- components: Interpreter Core messages: 277931 nosy: Jonas Wegelius priority: normal severity: normal status: open title: 8/3 is calculated incorrectly type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 02:23:30 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 03 Oct 2016 06:23:30 +0000 Subject: [issue28345] 8/3 is calculated incorrectly In-Reply-To: <1475475630.46.0.74903307256.issue28345@psf.upfronthosting.co.za> Message-ID: <1475475810.47.0.821400605887.issue28345@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Please see https://docs.python.org/3/tutorial/floatingpoint.html Python 3.5.2 (default, Sep 10 2016, 08:21:44) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 2.6666666666666667 == 2.6666666666666665 True ---------- nosy: +benjamin.peterson resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 02:27:52 2016 From: report at bugs.python.org (Paulus Schoutsen) Date: Mon, 03 Oct 2016 06:27:52 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1475476072.4.0.401252075953.issue26617@psf.upfronthosting.co.za> Changes by Paulus Schoutsen : ---------- nosy: +balloob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 02:41:02 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 03 Oct 2016 06:41:02 +0000 Subject: [issue28345] 8/3 is calculated incorrectly In-Reply-To: <1475475630.46.0.74903307256.issue28345@psf.upfronthosting.co.za> Message-ID: <1475476862.92.0.869690582211.issue28345@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 02:42:01 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 03 Oct 2016 06:42:01 +0000 Subject: [issue28344] Python 3.5.2 hangs when running in session 0 In-Reply-To: <1475475284.89.0.546394834548.issue28344@psf.upfronthosting.co.za> Message-ID: <1475476921.88.0.473538101448.issue28344@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 03:05:33 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 03 Oct 2016 07:05:33 +0000 Subject: [issue28264] Turtle.onclick events blocked by Turtle.stamp In-Reply-To: <1474684600.08.0.523173866083.issue28264@psf.upfronthosting.co.za> Message-ID: <1475478333.91.0.0725671670881.issue28264@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I understand now, you mean the printing of '************* turtle click detected *************' is suppressed by turning stamping on. It is slightly confusing that the effect of clicking the stamp box, to disable or re-enable, does not happen until after the next left click. If I check the box, click a turtle, it spins, uncheck the box, click a turtle, and it does not spin. It takes at least two clicks to see the effect. Anyway, verified on Win10 with 3.6.0b1. ---------- stage: -> test needed versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 03:10:44 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 03 Oct 2016 07:10:44 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475478644.84.0.438077685608.issue10716@psf.upfronthosting.co.za> Berker Peksag added the comment: (As a result of the discussion at http://psf.upfronthosting.co.za/roundup/meta/issue605, I started to re-triage all easy issues.) I don't think this is a suitable task for new contributors. It requires a) good HTML and CSS knowledge b) familiarity with pydoc API c) possibly design of a new API to finish this task. There are also some key points that needs to be discussed: * The current API ties to the dated HTML output and we may not need some of the members in the new format (look at the signature of HTMLDoc.section() for example) Also, I know HTMLDoc is not a public API, but I saw a number of HTMLDoc subclasses in GitHub (even I did it myself in my own projects) so there is a risk of breaking working applications. My suggestion is to keep the old API as-is and create a new one with new output. * The another question is that do we need HTMLDoc in 2016? Sphinx, sphinx-autodoc and readthedocs.org doing an amazing job and it might be better to refer people to alternative solutions (like we did for requests) See also https://mail.python.org/mailman/private/core-mentorship/2016-August/003622.html for a discussion about this subject. ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 03:55:33 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Oct 2016 07:55:33 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1475481333.36.0.905504563808.issue26617@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 03:59:32 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Oct 2016 07:59:32 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1475481572.15.0.234779499883.issue26617@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't think that the crash is a release blocker, but I just sent an email to python-dev to ask for reviews. ---------- nosy: +larry, ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 04:23:32 2016 From: report at bugs.python.org (Nick Papior) Date: Mon, 03 Oct 2016 08:23:32 +0000 Subject: [issue27859] argparse - subparsers does not retain namespace In-Reply-To: <1472137330.56.0.683571624156.issue27859@psf.upfronthosting.co.za> Message-ID: <1475483012.85.0.16677624087.issue27859@psf.upfronthosting.co.za> Nick Papior added the comment: Sorry I haven't responded previously. Thanks a lot for helping me. I hadn't realized the `register` function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 04:37:07 2016 From: report at bugs.python.org (lurker10) Date: Mon, 03 Oct 2016 08:37:07 +0000 Subject: [issue28346] 3.6 source doesn't build on centos 6 Message-ID: <1475483827.37.0.674411154506.issue28346@psf.upfronthosting.co.za> New submission from lurker10: Centos 6.7 Python 2.6.6 (default in Centos 6, no other python installed) GCC 4.4.7 # ./configure ... (no errors) # make python ./Tools/scripts/generate_opcode_h.py ./Lib/opcode.py ./Include/opcode.h /bin/mkdir -p Include python ./Parser/asdl_c.py -h Include ./Parser/Python.asdl Traceback (most recent call last): File "./Parser/asdl_c.py", line 6, in import asdl File "/root/cpython/Parser/asdl.py", line 36 builtin_types = {'identifier', 'string', 'bytes', 'int', 'object', 'singleton', ^ SyntaxError: invalid syntax make: *** [Include/Python-ast.h] Error 1 ---------- components: Build messages: 277937 nosy: lurker10 priority: normal severity: normal status: open title: 3.6 source doesn't build on centos 6 type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 04:57:27 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 03 Oct 2016 08:57:27 +0000 Subject: [issue28346] 3.6 source doesn't build on centos 6 In-Reply-To: <1475483827.37.0.674411154506.issue28346@psf.upfronthosting.co.za> Message-ID: <1475485047.9.0.00123431464129.issue28346@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. I think you need to run "make touch". ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 04:59:25 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 03 Oct 2016 08:59:25 +0000 Subject: [issue28345] 8/3 is calculated incorrectly In-Reply-To: <1475475630.46.0.74903307256.issue28345@psf.upfronthosting.co.za> Message-ID: <1475485165.71.0.726619598683.issue28345@psf.upfronthosting.co.za> Eryk Sun added the comment: A CPython float uses the platform's double-precision floating point. The significand of a double has 53 bits of precision, which is 15 decimal digits of precision. However, uniquely representing a double in decimal requires 17 digits, which is why the str and repr format is extended with the otherwise insignificant "65" digits. For output, you can format the number with sys.float_info.dig decimal digits. For example: >>> sys.float_info.dig 15 >>> '%0.*g' % (sys.float_info.dig, 8/3) '2.66666666666667' ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 05:00:20 2016 From: report at bugs.python.org (lurker10) Date: Mon, 03 Oct 2016 09:00:20 +0000 Subject: [issue28346] 3.6 source doesn't build on centos 6 In-Reply-To: <1475483827.37.0.674411154506.issue28346@psf.upfronthosting.co.za> Message-ID: <1475485220.0.0.32282156963.issue28346@psf.upfronthosting.co.za> lurker10 added the comment: I am sorry, it's actually 3.7.0a1 I was trying to build that errors. 3.6.0b1 builds fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 05:04:53 2016 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Oct 2016 09:04:53 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1475485493.68.0.736846489422.issue26617@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I was unable to reproduce a crash but the patch looks straightforward and obvious. After applying test suite for aiohttp still works without problems at least. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 05:06:25 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 03 Oct 2016 09:06:25 +0000 Subject: [issue28346] 3.6 source doesn't build on centos 6 In-Reply-To: <1475483827.37.0.674411154506.issue28346@psf.upfronthosting.co.za> Message-ID: <1475485585.0.0.575330318691.issue28346@psf.upfronthosting.co.za> Berker Peksag added the comment: Running make distclean make touch should solve your problem. There isn't any significant change between 3.6.0b1 and 3.7.0a1 to cause build problems if I recall correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 05:18:14 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 03 Oct 2016 09:18:14 +0000 Subject: [issue28344] Python 3.5.2 hangs when running in session 0 In-Reply-To: <1475475284.89.0.546394834548.issue28344@psf.upfronthosting.co.za> Message-ID: <1475486294.33.0.689309095551.issue28344@psf.upfronthosting.co.za> Eryk Sun added the comment: Are you running python.exe without a script or command? That runs the REPL in session 0, which will block reading from stdin. It's harmless to kill this process. The REPL could detect that it's running in session 0 and exit. However, I'm not in favor of such a change because sometimes I intentionally run in session 0 via psexec.exe. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 05:31:59 2016 From: report at bugs.python.org (Michael Haubenwallner) Date: Mon, 03 Oct 2016 09:31:59 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1475487119.18.0.0899645164157.issue18235@psf.upfronthosting.co.za> Michael Haubenwallner added the comment: ...a long time since I've been in this area... David, I'm not completely sure which code fragments you're talking about for "revert or change". Anyway: If I remember correctly, the confusion here is about the idea behind LDSHARED and BLDSHARED. As far as I understand, this idea originally was: LDSHARED: The "command to create shared modules". Used as variable in the "Makefile (and similar) templates to build python modules" for both in-python and third party modules. Initialized to hold the value which works for third party modules to link against the _installed_ python. BLDSHARED: Read as "Buildtime-LDSHARED". Holds the value to override LDSHARED with while building python itself (_PYTHON_BUILD=True), which works for building in-python modules to link against the _builddir_ python. So there's no point in ever setting BLDSHARED to the value of LDSHARED. Actually there is no point in having BLDSHARED visible at all in an installed python, nor using its value while building third party modules - there's just no code yet that prunes BLDSHARED from the installed _sysconfigdata.py. HTH, /haubi/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 05:40:20 2016 From: report at bugs.python.org (lurker10) Date: Mon, 03 Oct 2016 09:40:20 +0000 Subject: [issue28346] 3.6 source doesn't build on centos 6 In-Reply-To: <1475483827.37.0.674411154506.issue28346@psf.upfronthosting.co.za> Message-ID: <1475487620.29.0.320191131548.issue28346@psf.upfronthosting.co.za> lurker10 added the comment: Ok, a new error when running make touch. Not a mercurial directory (no .hg found). I am not familiar with mercurial though, could be an easy fix. It happens for both 3.7.0a1 and for the current 3.6 branch. It's alright I'll just use the 3.6.0b1 from the official site. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 05:53:47 2016 From: report at bugs.python.org (spooja) Date: Mon, 03 Oct 2016 09:53:47 +0000 Subject: [issue28344] Python 3.5.2 hangs when running in session 0 In-Reply-To: <1475475284.89.0.546394834548.issue28344@psf.upfronthosting.co.za> Message-ID: <1475488427.67.0.0495023840541.issue28344@psf.upfronthosting.co.za> spooja added the comment: Sorry I did not understand your comment, what is REPL? I am not using any script just scheduling a task to run python using this command 'python-3.5.2-x86.exe' with /quiet option. Are u telling me to kill the 2nd process that is getting created by the installer and the installation will work fine? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 05:56:07 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 03 Oct 2016 09:56:07 +0000 Subject: [issue28346] 3.6 source doesn't build on centos 6 In-Reply-To: <1475483827.37.0.674411154506.issue28346@psf.upfronthosting.co.za> Message-ID: <1475488567.61.0.130213319803.issue28346@psf.upfronthosting.co.za> Berker Peksag added the comment: How did you get 3.7.0a1? I assumed you cloned it from hg.python.org. If you clone it from the GitHub mirror, you can use the trick mentioned at http://bugs.python.org/issue23404#msg275285 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 06:03:33 2016 From: report at bugs.python.org (lurker10) Date: Mon, 03 Oct 2016 10:03:33 +0000 Subject: [issue28346] 3.6 source doesn't build on centos 6 In-Reply-To: <1475483827.37.0.674411154506.issue28346@psf.upfronthosting.co.za> Message-ID: <1475489013.65.0.682715215567.issue28346@psf.upfronthosting.co.za> lurker10 added the comment: This has to be it, thank you! I used github to get source. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 06:15:34 2016 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 03 Oct 2016 10:15:34 +0000 Subject: [issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0 In-Reply-To: <1475449173.08.0.90782279022.issue28341@psf.upfronthosting.co.za> Message-ID: <1475489734.2.0.423377592946.issue28341@psf.upfronthosting.co.za> Skip Montanaro added the comment: Thanks, Ned. Unintuitive though it may be, that seems to have done the trick. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 06:15:50 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 03 Oct 2016 10:15:50 +0000 Subject: [issue28346] 3.6 source doesn't build on centos 6 In-Reply-To: <1475483827.37.0.674411154506.issue28346@psf.upfronthosting.co.za> Message-ID: <1475489750.03.0.572297723941.issue28346@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 06:57:39 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 03 Oct 2016 10:57:39 +0000 Subject: [issue28328] statistics.geometric_mean has no tests. Defer to 3.7? In-Reply-To: <1475325234.65.0.257375698668.issue28328@psf.upfronthosting.co.za> Message-ID: <1475492259.5.0.506486518918.issue28328@psf.upfronthosting.co.za> INADA Naoki added the comment: I run attached test, and saw following errors. On macOS 10.11 (XCode 8) $ hg summary parent: 104258:0d948a46c59a test_invalid_sequences seems don't have to stay in CAPITest. branch: 3.6 commit: 1 modified, 1 unknown update: (current) $ ./python.exe -m test.test_statistics -v ... ====================================================================== ERROR: test_negative_error (__main__.TestGeometricMean) (values=[-1]) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/inada-n/work/python/py36/Lib/test/test_statistics.py", line 1741, in test_negative_error self.assertRaises(exc, self.func, values) File "/Users/inada-n/work/python/py36/Lib/unittest/case.py", line 728, in assertRaises return context.handle('assertRaises', args, kwargs) File "/Users/inada-n/work/python/py36/Lib/unittest/case.py", line 177, in handle callable_obj(*args, **kwargs) File "/Users/inada-n/work/python/py36/Lib/statistics.py", line 567, in geometric_mean if isinstance(g, (numbers.Real, Decimal)): NameError: name 'g' is not defined ====================================================================== ERROR: test_single_value (__main__.TestGeometricMean) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/inada-n/work/python/py36/Lib/test/test_statistics.py", line 1587, in test_single_value self.assertEqual(self.func([x]), x) File "/Users/inada-n/work/python/py36/Lib/statistics.py", line 567, in geometric_mean if isinstance(g, (numbers.Real, Decimal)): NameError: name 'g' is not defined ====================================================================== ERROR: test_singleton_lists (__main__.TestGeometricMean) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/inada-n/work/python/py36/Lib/test/test_statistics.py", line 1762, in test_singleton_lists self.assertEqual(self.func([x]), x) File "/Users/inada-n/work/python/py36/Lib/statistics.py", line 567, in geometric_mean if isinstance(g, (numbers.Real, Decimal)): NameError: name 'g' is not defined ====================================================================== FAIL: test_multiply_data_points (__main__.TestGeometricMean) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/inada-n/work/python/py36/Lib/test/test_statistics.py", line 1796, in test_multiply_data_points self.assertApproxEqual(self.func(data), expected, rel=1e-13) File "/Users/inada-n/work/python/py36/Lib/test/test_statistics.py", line 227, in assertApproxEqual check(first, second, tol, rel, msg) File "/Users/inada-n/work/python/py36/Lib/test/test_statistics.py", line 247, in _check_approx_num raise self.failureException(msg) AssertionError: 6.27015835359916 != 695.9875772495068 values differ by more than tol=0 and rel=1e-13 -> absolute error = 689.7174188959076 -> relative error = 0.990990990990991 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 07:09:43 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 03 Oct 2016 11:09:43 +0000 Subject: [issue28328] statistics.geometric_mean has no tests. Defer to 3.7? In-Reply-To: <1475325234.65.0.257375698668.issue28328@psf.upfronthosting.co.za> Message-ID: <1475492983.42.0.20309800606.issue28328@psf.upfronthosting.co.za> INADA Naoki added the comment: Attached patch fixes first two errors. Last one error is from test. I've commented it in review tool. ---------- Added file: http://bugs.python.org/file44941/geometric_mean.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 07:28:13 2016 From: report at bugs.python.org (JIahua Guo) Date: Mon, 03 Oct 2016 11:28:13 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1475494093.04.0.596485204146.issue26617@psf.upfronthosting.co.za> JIahua Guo added the comment: Hi asvetlov, debug mode of python interpreter should be enabled to reproduce this bug, cause assertion is disabled in release mode. (https://hg.python.org/cpython/file/104259/Modules/gcmodule.c#l365) One environment that can reproduce this bug: $ cat /etc/issue Ubuntu 14.04.3 LTS \n \l $ uname -r 3.13.0-32-generic $ uname -m x86_64 $ dpkg -s python3.4-dbg | grep Version Version: 3.4.3-1ubuntu1~14.04.4 $ python3.4-dbg crash.py python3.4-dbg: ../Modules/gcmodule.c:364: update_refs: Assertion `((gc)->gc.gc_refs >> (1)) != 0' failed. Aborted ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 07:41:18 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 03 Oct 2016 11:41:18 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1475494878.99.0.615618057309.issue28339@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I have submitted a PR with one of the quick fixes upstream (to python/typing). Also I have played a bit with a more permanent fix. Here is an important observation: it is not easy to avoid adding parameterized generics to __subclasses__. For example, Node[int] should have at least one base, that base will have it in __subclasses__. The former is dynamically updated, so that we cannot "fool" it. Also making subclass checks for all subclasses is a "deliberate act", so that it should be treated by common rules. It looks like we have only three options: 1. Abandon the idea of raising TypeError for generics, most users expect True or False, so that some exiting code might break 2. Make __getitem__ for generics return self, so that ``Node[int] is Node`` at runtime (this is a subset of the first option). 3. Still force people not to use issubclass() with parameterized generics (this is quite bad idea and could have misleading consequences), but make an exception for existing stdlib modules abc and functools, all later additions should respect the rule. 4. Similarly to above, but just make tiny patches to abc and functools to use __origin__ in subclass checks if it is present and not None. Which option is the right one? I would vote for the last one. This could break some (probably very small amount) existing code. So that formally speaking it is a backward incompatible change. We could go with option 1 for 3.5 and with option 4 for 3.6 Also I have found another failure in test suite with latest version from python/typing after importing typing while running ./python -c 'import runpy, typing; runpy.run_module("test")' test test_collections failed -- Traceback (most recent call last): File "/Users/ivan/hg-cpython/Lib/test/test_collections.py", line 1309, in test_ByteString self.assertNotIsInstance(memoryview(b""), ByteString) AssertionError: is an instance of This is because of this line in typing.py ByteString.register(type(memoryview(b''))) The fix for this is very simple, we just need to decide whether memoryview should be an instance of ByteString or not, and either remove this line or remove the failing test. I do not have any strong opinion on this, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 07:44:50 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 03 Oct 2016 11:44:50 +0000 Subject: [issue28088] Document Transport.set_protocol and get_protocol In-Reply-To: <1475369173.63.0.247466795846.issue28088@psf.upfronthosting.co.za> Message-ID: <1475495090.28.0.607582996614.issue28088@psf.upfronthosting.co.za> INADA Naoki added the comment: lgtm. But I think adding note like following may be helpful to avoid users try switching protocols which protocol author doesn't expect. (I'm not good English writer. I hope someone polish my sentence). .. note:: Generally speaking, switching protocols requires special knowledge about two protocols. For example, old protocol may have inner receive buffer and new protocol should take over it. Transport doesn't take care about such issues. Protocols should support switching protocol using this API. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 07:51:03 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 03 Oct 2016 11:51:03 +0000 Subject: [issue28344] Python 3.5.2 installer hangs when run in session 0 In-Reply-To: <1475475284.89.0.546394834548.issue28344@psf.upfronthosting.co.za> Message-ID: <1475495463.88.0.57204383358.issue28344@psf.upfronthosting.co.za> Eryk Sun added the comment: For some reason you're trying to schedule the installer to run in session 0. I thought you were running python.exe in session 0 via the task scheduler, which would hang in the REPL [1]. [1]: https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop ---------- components: +Installation title: Python 3.5.2 hangs when running in session 0 -> Python 3.5.2 installer hangs when run in session 0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 08:37:11 2016 From: report at bugs.python.org (spooja) Date: Mon, 03 Oct 2016 12:37:11 +0000 Subject: [issue28344] Python 3.5.2 installer hangs when run in session 0 In-Reply-To: <1475475284.89.0.546394834548.issue28344@psf.upfronthosting.co.za> Message-ID: <1475498231.45.0.687747844359.issue28344@psf.upfronthosting.co.za> spooja added the comment: Thank you for the link, yes am running in session 0 via the task scheduler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 08:47:37 2016 From: report at bugs.python.org (Satoru Logic) Date: Mon, 03 Oct 2016 12:47:37 +0000 Subject: [issue28329] Add support for customizing scheduler's timefunc and delayfunc using subclassing Message-ID: <1475498857.46.0.670568400115.issue28329@psf.upfronthosting.co.za> Changes by Satoru Logic : Added file: http://bugs.python.org/file44942/overridable_time_delay_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 09:25:06 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 03 Oct 2016 13:25:06 +0000 Subject: [issue28259] Ctypes bug windows In-Reply-To: <1474647946.24.0.533944480109.issue28259@psf.upfronthosting.co.za> Message-ID: <1475501106.49.0.146079884063.issue28259@psf.upfronthosting.co.za> Eryk Sun added the comment: Since this is 32-bit, are you using CDLL (cdecl) or WinDLL (stdcall)? Either way, I made a simple test for the given function prototype, and it worked fine in 32-bit 3.5.2 on Windows 10 for both calling conventions. You'll have to provide a minimal example that reproduces the problem. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 11:26:40 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Oct 2016 15:26:40 +0000 Subject: [issue28329] Add support for customizing scheduler's timefunc and delayfunc using subclassing Message-ID: <1475508400.02.0.394772928057.issue28329@psf.upfronthosting.co.za> New submission from Raymond Hettinger: Why do you need a second way to do it? Is there any use case not handled by the current API? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 11:29:43 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Mon, 03 Oct 2016 15:29:43 +0000 Subject: [issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4 In-Reply-To: <1396363951.96.0.324613047949.issue21124@psf.upfronthosting.co.za> Message-ID: <1475508583.86.0.0318716599641.issue21124@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: unpack_iterator type has not been registered into _struct module. And all users get only unpack_iterator object from function returning iterator. The object iterating doesn't need reference to type. Therefore, I think issue finish by PyType_Ready fix because this segfault doesn't have big impact. However, I think if possible, it is preferable that extension module having un-initialize type objects gets a compile error at build time. And impossible case for compile error is better that wrong extension module always fails import. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 11:43:17 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 03 Oct 2016 15:43:17 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1475509397.96.0.842990663668.issue28339@psf.upfronthosting.co.za> Guido van Rossum added the comment: I have merged the upstream fix (and some other things) into 3.5, 3.6, 3.7. changeset: 104262:7f0d27180b6d tag: tip parent: 104259:36b052adf5a7 parent: 104261:0e0189b47291 user: Guido van Rossum date: Mon Oct 03 08:42:17 2016 -0700 summary: More updates from upstream typing.py (3.6->3.7) changeset: 104261:0e0189b47291 branch: 3.6 parent: 104258:0d948a46c59a parent: 104260:b24d0f274623 user: Guido van Rossum date: Mon Oct 03 08:41:37 2016 -0700 summary: More updates from upstream typing.py (3.5->3.6) changeset: 104260:b24d0f274623 branch: 3.5 parent: 104255:ac838bf5499d user: Guido van Rossum date: Mon Oct 03 08:40:50 2016 -0700 summary: More updates from upstream typing.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 11:59:10 2016 From: report at bugs.python.org (Poren Chiang) Date: Mon, 03 Oct 2016 15:59:10 +0000 Subject: [issue28348] Doc typo in asyncio.Task Message-ID: <1475510350.17.0.416323283403.issue28348@psf.upfronthosting.co.za> New submission from Poren Chiang: Version: Latest (v3.5.2) Affected module: asyncio (section 18.5) Problem: Under section 18.5.3.5. "Task", The word "completion" is misspelled "completition". > A task is responsible for executing a coroutine object in an event loop. If the wrapped coroutine yields from a future, the task suspends the execution of the wrapped coroutine and waits for the **completition** of the future. When the future is done, the execution of the wrapped coroutine restarts with the result or the exception of the future. Possible fixes: Replace "completition" with "completion". Reference: [1] https://docs.python.org/3/library/asyncio-task.html#task ---------- assignee: docs at python components: Documentation messages: 277962 nosy: RSChiang, docs at python priority: normal severity: normal status: open title: Doc typo in asyncio.Task versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 11:59:55 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 03 Oct 2016 15:59:55 +0000 Subject: [issue28251] Help manuals do not appear in Windows search In-Reply-To: <1474582472.92.0.826055372381.issue28251@psf.upfronthosting.co.za> Message-ID: <1475510395.45.0.419605101546.issue28251@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:12:55 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Oct 2016 16:12:55 +0000 Subject: [issue28217] Add interactive console tests In-Reply-To: <1474393467.21.0.584094770072.issue28217@psf.upfronthosting.co.za> Message-ID: <20161003161251.82463.39023.A8D783F6@psf.io> Roundup Robot added the comment: New changeset 363888141f41 by Steve Dower in branch '3.6': Issue #28217: Adds _testconsole module to test console input. Fixes some issues found by the tests. https://hg.python.org/cpython/rev/363888141f41 New changeset 3ec6a610e93e by Steve Dower in branch 'default': Issue #28217: Adds _testconsole module to test console input. https://hg.python.org/cpython/rev/3ec6a610e93e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:13:41 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 03 Oct 2016 16:13:41 +0000 Subject: [issue28217] Add interactive console tests In-Reply-To: <1474393467.21.0.584094770072.issue28217@psf.upfronthosting.co.za> Message-ID: <1475511221.38.0.964438522378.issue28217@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:15:54 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Oct 2016 16:15:54 +0000 Subject: [issue28218] Windows docs have wrong versionadded description In-Reply-To: <1474398990.63.0.365606610979.issue28218@psf.upfronthosting.co.za> Message-ID: <20161003161550.82187.37760.26118B02@psf.io> Roundup Robot added the comment: New changeset de79cc895203 by Steve Dower in branch '3.6': Issue #28218: Fixes versionadded description in using/windows.rst https://hg.python.org/cpython/rev/de79cc895203 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:18:16 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 03 Oct 2016 16:18:16 +0000 Subject: [issue28218] Windows docs have wrong versionadded description In-Reply-To: <1474398990.63.0.365606610979.issue28218@psf.upfronthosting.co.za> Message-ID: <1475511496.45.0.865579581864.issue28218@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:18:19 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 16:18:19 +0000 Subject: [issue11698] Improve repr for structseq objects to show named, but unindexed fields In-Reply-To: <1301264097.04.0.982421975108.issue11698@psf.upfronthosting.co.za> Message-ID: <1475511499.1.0.993713226569.issue11698@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: -> patch review versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:19:08 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 16:19:08 +0000 Subject: [issue1820] Enhance Object/structseq.c to match namedtuple and tuple api In-Reply-To: <1200284428.58.0.762384814897.issue1820@psf.upfronthosting.co.za> Message-ID: <1475511548.75.0.669278836463.issue1820@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: needs patch -> patch review versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:20:14 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 16:20:14 +0000 Subject: [issue5907] repr of time.struct_time type does not eval In-Reply-To: <1241281843.36.0.110450032545.issue5907@psf.upfronthosting.co.za> Message-ID: <1475511614.15.0.543747019775.issue5907@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- priority: low -> normal versions: +Python 3.7 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:29:46 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 16:29:46 +0000 Subject: [issue6280] calendar.timegm() belongs in time module, next to time.gmtime() In-Reply-To: <1244911683.12.0.112588761912.issue6280@psf.upfronthosting.co.za> Message-ID: <1475512186.89.0.549236836149.issue6280@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I would like to revisit this for 3.7. ---------- keywords: -needs review, patch priority: low -> normal resolution: rejected -> stage: commit review -> needs patch status: closed -> open versions: +Python 3.7 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:34:18 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 03 Oct 2016 16:34:18 +0000 Subject: [issue28348] Doc typo in asyncio.Task In-Reply-To: <1475510350.17.0.416323283403.issue28348@psf.upfronthosting.co.za> Message-ID: <1475512458.17.0.0870361285503.issue28348@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for the report. Seems like easy fix :) I'll work on a patch for this today. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:58:36 2016 From: report at bugs.python.org (Jim Jewett) Date: Mon, 03 Oct 2016 16:58:36 +0000 Subject: [issue28286] gzip guessing of mode is ambiguous In-Reply-To: <1474984904.89.0.353695342219.issue28286@psf.upfronthosting.co.za> Message-ID: <1475513916.53.0.683484471835.issue28286@psf.upfronthosting.co.za> Changes by Jim Jewett : ---------- title: gzip guessing of mode is ambiguilous -> gzip guessing of mode is ambiguous _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 13:06:35 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 03 Oct 2016 17:06:35 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1475514395.68.0.898173457564.issue28128@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 13:13:28 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 03 Oct 2016 17:13:28 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1475514808.19.0.758584089997.issue28128@psf.upfronthosting.co.za> Nick Coghlan added the comment: Eric's basic approach sounds fine to me, as it gets the traceback in the right place (i.e. blaming the code being compiled, not the code doing the import). For beta 2, how about we just go with a plain SyntaxWarning? Since users running pre-compiled modules won't see it regardless, so it will be effectively silenced by default for end users of pre-built Python applications. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 13:33:10 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 17:33:10 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475515990.2.0.872511374898.issue2897@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +skip.montanaro versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 13:34:39 2016 From: report at bugs.python.org (Alexander Mohr) Date: Mon, 03 Oct 2016 17:34:39 +0000 Subject: [issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf In-Reply-To: <1475452134.75.0.942961822081.issue28342@psf.upfronthosting.co.za> Message-ID: <1475516079.28.0.787544430097.issue28342@psf.upfronthosting.co.za> Alexander Mohr added the comment: ya I did a monkey patch which resolved it. if sys.platform == 'darwin': import botocore.vendored.requests.utils, urllib.request botocore.vendored.requests.utils.proxy_bypass = urllib.request.proxy_bypass_environment botocore.vendored.requests.utils.getproxies = urllib.request.getproxies_environment urllib.request.proxy_bypass = urllib.request.proxy_bypass_environment urllib.request.getproxies = urllib.request.getproxies_environment ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 13:55:57 2016 From: report at bugs.python.org (Johannes Bauer) Date: Mon, 03 Oct 2016 17:55:57 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1475517357.32.0.459894170936.issue20491@psf.upfronthosting.co.za> Johannes Bauer added the comment: Hey there, wanted to follow up on the state of this... is there a reason why this has not made it into vanilla yet? If so, I'd like to try to help out clear impediments if I can. This issue is *really*, really, really annoying me. I've posted about a year ago on python-list (http://code.activestate.com/lists/python-list/685604/) and was referred to this bug and thought I'd wait it out. But now the last change was 2 years ago and no relief in sight. So if nothing else, please take it as a gentle reassurance that this bug is really affecting real-world scenarios and annoying as hell. Especially since the semantic of a non-breaking space is pretty much exactly to *not* break on text wrapping. If there's anything I can contribute to get things going again, by all means please let me know. All hands on deck! Cheers, Johannes ---------- nosy: +joebauer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 13:56:32 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Oct 2016 17:56:32 +0000 Subject: [issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf In-Reply-To: <1475452134.75.0.942961822081.issue28342@psf.upfronthosting.co.za> Message-ID: <1475517392.01.0.0606307181725.issue28342@psf.upfronthosting.co.za> Ned Deily added the comment: Glad you have it working. Did you try the suggested workaround of setting environment variable "no_proxy" to "*"? I believe that should have had the same net effect as the monkey patching. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:00:19 2016 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Oct 2016 18:00:19 +0000 Subject: [issue11702] dir on return value of msilib.OpenDatabase() crashes python In-Reply-To: <1301325222.81.0.910767875041.issue11702@psf.upfronthosting.co.za> Message-ID: <1475517619.65.0.656864278589.issue11702@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:05:45 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:05:45 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475517945.19.0.967022337401.issue2897@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a patch that implements steps 1 and 2 of Martin's plan. There are over 50 files that include structmember.h. I am not sure it is worth the trouble to update all those files before structmember.h is actually removed. If we agree that this is the right way forward, I'll make the necessary changes to the docs. ---------- keywords: +patch Added file: http://bugs.python.org/file44943/issue2897.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:07:59 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:07:59 +0000 Subject: [issue28349] Issues with PyMemberDef flags Message-ID: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: As documented in Doc/extending/newtypes.rst, the flags field of PyMemberDef must be bitwise-or-ed combination of flag constants READONLY, READ_RESTRICTED, WRITE_RESTRICTED and RESTRICTED. There are problems with this: 1. Actually WRITE_RESTRICTED was renamed to PY_WRITE_RESTRICTED in 2.6 (a8dd8874ff2d). I didn't find mention of this backward incompatible change in Misc/NEWS and whatsnew files. 2. Since the support of restricted mode was removed in 3.x, only READONLY flag has effect. Other flags are still documented and used in CPython sources. I think we should get rid of using these flags and undocument them or document as outdated. 3. As noted by Skip Montanaro on the Python-Dev mailing list, these flags (as well as T_* type tags in Include/structmember.h) should have the PY_ prefix. ---------- assignee: docs at python components: Documentation messages: 277972 nosy: christian.heimes, docs at python, serhiy.storchaka, skip.montanaro priority: normal severity: normal status: open title: Issues with PyMemberDef flags versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:11:46 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:11:46 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475518306.54.0.278659206465.issue2897@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I would also like this opportunity to rename T_PYSSIZET to something more readable: maybe PY_T_PY_SSIZE_T or PY_T_SSIZE_T. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:14:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:14:17 +0000 Subject: [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475518457.05.0.330233469266.issue28349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The latter issue is a duplicate of issue2897. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:17:39 2016 From: report at bugs.python.org (Guillaume Chorn) Date: Mon, 03 Oct 2016 18:17:39 +0000 Subject: [issue28318] Python unittest.mock.mock_calls stores references to arguments instead of their values In-Reply-To: <1475258078.84.0.445986439292.issue28318@psf.upfronthosting.co.za> Message-ID: <1475518659.41.0.343405848976.issue28318@psf.upfronthosting.co.za> Guillaume Chorn added the comment: If it's true that our ability to accurately deep-copy mutable args makes fixing this behavior impossible, we should at the very least update the official unittest.mock documentation to warn users that testing for mock calls with mutable arguments is not reliable; i.e. make it clear that we're storing a reference to the arguments and not just the values. If it's not a bug, it's certainly a limitation that deserves as much mention as possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:20:01 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:20:01 +0000 Subject: [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475518801.53.0.550678738336.issue28349@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> include structmember.h in Python.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:20:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:20:17 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475518817.55.0.00941825610494.issue2897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please don't forget to use "hg copy" for creating object.h from structmember.h. This preserves the history. structmember.h should be implemented using object.h. Include object.h and add aliases. Only READONLY flag is used in 3.x (issue28349). Other flags can be removed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:22:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:22:39 +0000 Subject: [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475518959.48.0.339333820592.issue28349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We still should correct the documentation in 2.7 and 3.x. ---------- resolution: duplicate -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:23:34 2016 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 03 Oct 2016 18:23:34 +0000 Subject: [issue28335] Exception reporting in `logging.config` In-Reply-To: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> Message-ID: <1475519014.96.0.0182239986867.issue28335@psf.upfronthosting.co.za> Vinay Sajip added the comment: Patch as posted will not work (contains a syntax error), and was thus never tested. Never mind, I will address this soon. ---------- assignee: -> vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:24:50 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:24:50 +0000 Subject: [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475519090.46.0.693979278806.issue28349@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Serhiy, while I see that you've raised some additional issues here, let's keep the discussion related to Include/structmember.h in one place. I would not mind adding additional affected versions there. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:30:50 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:30:50 +0000 Subject: [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475519449.99.0.463759159697.issue28349@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: There is also #24065 ("Outdated *_RESTRICTED flags in structmember.h") which I think should be folded into #2897. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:33:41 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:33:41 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475519621.22.0.0365736385005.issue2897@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As explained in #24065, READ_RESTRICTED, PY_WRITE_RESTRICTED and RESTRICTED flags were used for "restricted mode" in Python 2. I don't think we would want to preserve these as we move the rest to object.h. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:35:06 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:35:06 +0000 Subject: [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475519706.79.0.468782369043.issue28349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah this is a duplicate of issue24065! ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: include structmember.h in Python.h -> Outdated *_RESTRICTED flags in structmember.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:36:03 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:36:03 +0000 Subject: [issue24065] Outdated *_RESTRICTED flags in structmember.h In-Reply-To: <1430156419.01.0.516849484938.issue24065@psf.upfronthosting.co.za> Message-ID: <1475519763.18.0.685212205546.issue24065@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: See #2897 for a plan to deperecate Include/structmember.h. ---------- nosy: +belopolsky resolution: -> duplicate status: open -> closed superseder: -> include structmember.h in Python.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:40:48 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:40:48 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475520048.38.0.990771288242.issue2897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PY_T_PY_SSIZE_T is not much readable than PY_T_PYSSIZET. I think it can be just PY_T_SSIZE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:41:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:41:53 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475520113.58.0.0311348697939.issue2897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And please don't miss to fix the documentation in 2.7 and 3.5-3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:43:06 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:43:06 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475520186.87.0.887053967794.issue2897@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +Issues with PyMemberDef flags, Outdated *_RESTRICTED flags in structmember.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:46:16 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Oct 2016 18:46:16 +0000 Subject: [issue28335] Exception reporting in `logging.config` In-Reply-To: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> Message-ID: <20161003184613.20673.13054.D990E7D0@psf.io> Roundup Robot added the comment: New changeset 69bf09bf4952 by Vinay Sajip in branch 'default': Closes #28335: used 'raise from' in logging configuration code. https://hg.python.org/cpython/rev/69bf09bf4952 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:50:13 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:50:13 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475520613.26.0.696000687879.issue2897@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Changed the title to reflect the way forward and added affected versions to remember to update the documentation. See #28349 and #24065 for details. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python title: include structmember.h in Python.h -> Deprecate structmember.h versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:51:05 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Oct 2016 18:51:05 +0000 Subject: [issue28335] Exception reporting in `logging.config` In-Reply-To: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> Message-ID: <20161003185101.85745.16645.F48B940D@psf.io> Roundup Robot added the comment: New changeset 8c005be54305 by Vinay Sajip in branch 'default': Issue #28335: made minor improvement to implementation. https://hg.python.org/cpython/rev/8c005be54305 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:52:51 2016 From: report at bugs.python.org (Aristotel) Date: Mon, 03 Oct 2016 18:52:51 +0000 Subject: [issue28259] Ctypes bug windows In-Reply-To: <1474647946.24.0.533944480109.issue28259@psf.upfronthosting.co.za> Message-ID: <1475520771.78.0.829202053176.issue28259@psf.upfronthosting.co.za> Aristotel added the comment: CDLL. I didn't test it on Python 3.5.2, 3.3 - 3.4 only. And btw my OS is windows 7. Lib is also used by some apps (not Python apps) and there this function works well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 15:00:58 2016 From: report at bugs.python.org (Ram Rachum) Date: Mon, 03 Oct 2016 19:00:58 +0000 Subject: [issue28335] Exception reporting in `logging.config` In-Reply-To: <1475346017.58.0.463787476643.issue28335@psf.upfronthosting.co.za> Message-ID: <1475521258.25.0.315055584891.issue28335@psf.upfronthosting.co.za> Ram Rachum added the comment: Thanks for the quick fix Vinay! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 15:17:41 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Oct 2016 19:17:41 +0000 Subject: [issue28111] geometric_mean can raise OverflowError for large input length In-Reply-To: <1473733233.31.0.576673883283.issue28111@psf.upfronthosting.co.za> Message-ID: <1475522261.24.0.896990619464.issue28111@psf.upfronthosting.co.za> Mark Dickinson added the comment: The attached patch provides a fix, and is based partly on Tim Peters' suggestions and code from the issue 27761 discussion. It needs tests. For convenience, it includes the fix for #28327, since it needs the `_frexp_gen` function added there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 15:17:53 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Oct 2016 19:17:53 +0000 Subject: [issue28111] geometric_mean can raise OverflowError for large input length In-Reply-To: <1473733233.31.0.576673883283.issue28111@psf.upfronthosting.co.za> Message-ID: <1475522273.97.0.74168184912.issue28111@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 15:18:42 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Oct 2016 19:18:42 +0000 Subject: [issue28111] geometric_mean can raise OverflowError for large input length In-Reply-To: <1473733233.31.0.576673883283.issue28111@psf.upfronthosting.co.za> Message-ID: <1475522322.33.0.255396799477.issue28111@psf.upfronthosting.co.za> Mark Dickinson added the comment: And here's the actual patch. :-) ---------- Added file: http://bugs.python.org/file44944/geometric_mean_long_input.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 15:23:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 19:23:36 +0000 Subject: [issue28350] Interning string constants with null character Message-ID: <1475522616.74.0.369918481264.issue28350@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Currently string constants are interned if they consist of ASCII word characters ([0-9A-Za-z_]). But strings are tested only to the first null character. This is not problem for names, since they can't include null characters, but string constants that contains ASCII non-word characters after the null character passes this test. Proposed simple patch fixes the testing function all_name_chars(). Other question: shouldn't PyUnicode_IsIdentifier() be used in 3.x? ---------- components: Interpreter Core files: all_name_chars.patch keywords: patch messages: 277994 nosy: benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, rhettinger, serhiy.storchaka, yselivanov priority: normal severity: normal stage: patch review status: open title: Interning string constants with null character type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file44945/all_name_chars.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 15:33:07 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Oct 2016 19:33:07 +0000 Subject: [issue28351] statistics.geometric_mean enters infinite loop for Decimal inputs Message-ID: <1475523187.92.0.24883134157.issue28351@psf.upfronthosting.co.za> New submission from Mark Dickinson: On my machine, the following code enters an infinite loop: Python 3.7.0a0 (default:14c52bb996be, Oct 3 2016, 20:20:58) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from statistics import geometric_mean >>> from decimal import Decimal >>> x = [0.5636536271446626, 0.7185039116960741, 0.5265438727361142] >>> geometric_mean(map(Decimal, x)) The nth_root implementation for Decimals does a repeated Newton iteration until convergence, with convergence being defined as the current iteration value being exactly equal to the last one. It's very easy for the iteration to end up alternating between two (or more) nearby values, and that's what happens above. This isn't a rare corner case: if you generate triples of random floats, convert to Decimal and apply geometric mean, you'll hit something like the above within just a few trials. I don't think there's any need for an iteration here: I'd suggest simply computing the nth root directly after increasing the Decimal context precision by a suitable amount. If we do use Newton iteration, it should likely restrict itself to doing a single polishing step, as in the issue #28111 fix and #27181 discussion. ---------- messages: 277995 nosy: mark.dickinson priority: normal severity: normal status: open title: statistics.geometric_mean enters infinite loop for Decimal inputs type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 15:36:53 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Oct 2016 19:36:53 +0000 Subject: [issue28328] statistics.geometric_mean has no tests. Defer to 3.7? In-Reply-To: <1475325234.65.0.257375698668.issue28328@psf.upfronthosting.co.za> Message-ID: <1475523413.56.0.682041089672.issue28328@psf.upfronthosting.co.za> Mark Dickinson added the comment: One more geometric_mean issue (the current code can enter an infinite loop for Decimal inputs): #28351. Steve, I really think we should postpone to 3.7. I'm very happy to help out with all the necessary fixes, tests and review, but I'm not going to have time for that before 3.6b2. If we defer, that takes the pressure off a bit and lets us get a good solid implementation in for 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 15:37:14 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Oct 2016 19:37:14 +0000 Subject: [issue28350] Interning string constants with null character In-Reply-To: <1475522616.74.0.369918481264.issue28350@psf.upfronthosting.co.za> Message-ID: <1475523434.34.0.926498668215.issue28350@psf.upfronthosting.co.za> STINNER Victor added the comment: all_name_chars.patch LGTM. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 15:42:26 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Oct 2016 19:42:26 +0000 Subject: [issue28351] statistics.geometric_mean can enter infinite loop for Decimal inputs In-Reply-To: <1475523187.92.0.24883134157.issue28351@psf.upfronthosting.co.za> Message-ID: <1475523746.84.0.910835179736.issue28351@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- title: statistics.geometric_mean enters infinite loop for Decimal inputs -> statistics.geometric_mean can enter infinite loop for Decimal inputs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 15:47:11 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 03 Oct 2016 19:47:11 +0000 Subject: [issue28259] Ctypes bug windows In-Reply-To: <1474647946.24.0.533944480109.issue28259@psf.upfronthosting.co.za> Message-ID: <1475524031.53.0.908844545043.issue28259@psf.upfronthosting.co.za> Eryk Sun added the comment: If you want a resolution to this issue, then you need to provide a minimal example that reproduces the problem. It would also be helpful if you could provide a download link for the library that you're wrapping. If not, at least upload a dump file, preferably from 3.5 since 3.4 is no longer actively maintained. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 16:08:13 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Oct 2016 20:08:13 +0000 Subject: [issue28111] geometric_mean can raise OverflowError for large input length In-Reply-To: <1473733233.31.0.576673883283.issue28111@psf.upfronthosting.co.za> Message-ID: <1475525293.91.0.361680753792.issue28111@psf.upfronthosting.co.za> Mark Dickinson added the comment: Whoops; that patch was incomplete (it was missing the change to the geometric_mean function itself). Here's an updated patch. ---------- Added file: http://bugs.python.org/file44946/geometric_mean_long_input_v2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 16:55:56 2016 From: report at bugs.python.org (Roy Williams) Date: Mon, 03 Oct 2016 20:55:56 +0000 Subject: [issue28288] Expose environment variable for Py_Py3kWarningFlag In-Reply-To: <1474993446.86.0.709676160725.issue28288@psf.upfronthosting.co.za> Message-ID: <1475528156.19.0.516315878132.issue28288@psf.upfronthosting.co.za> Changes by Roy Williams : Added file: http://bugs.python.org/file44947/pythonenable3kwarningsflag.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 16:57:14 2016 From: report at bugs.python.org (Roy Williams) Date: Mon, 03 Oct 2016 20:57:14 +0000 Subject: [issue28288] Expose environment variable for Py_Py3kWarningFlag In-Reply-To: <1474993446.86.0.709676160725.issue28288@psf.upfronthosting.co.za> Message-ID: <1475528234.69.0.673490647818.issue28288@psf.upfronthosting.co.za> Roy Williams added the comment: Thanks for the feedback Berker. I addressed your feedback, but unfortunately I get a 500 from Rietveld when I try to attach a new patchset. I've uploaded the new patchset here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 17:16:12 2016 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Oct 2016 21:16:12 +0000 Subject: [issue11698] Improve repr for structseq objects to show named, but unindexed fields In-Reply-To: <1301264097.04.0.982421975108.issue11698@psf.upfronthosting.co.za> Message-ID: <1475529372.37.0.689138953196.issue11698@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 17:28:32 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 03 Oct 2016 21:28:32 +0000 Subject: [issue28130] Document that time.tzset updates time module globals In-Reply-To: <1473782506.71.0.242774514927.issue28130@psf.upfronthosting.co.za> Message-ID: <1475530112.16.0.966104352947.issue28130@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 17:37:33 2016 From: report at bugs.python.org (Alexander Mohr) Date: Mon, 03 Oct 2016 21:37:33 +0000 Subject: [issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf In-Reply-To: <1475452134.75.0.942961822081.issue28342@psf.upfronthosting.co.za> Message-ID: <1475530653.24.0.915517643456.issue28342@psf.upfronthosting.co.za> Alexander Mohr added the comment: I'm sure it would work, I just wanted a solution that didn't changes to our build infrastructure. btw if we're marking this as a duplicate of the other bug, can we update the other bug to say it affects python3.x as well? Thanks! ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 17:51:04 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 03 Oct 2016 21:51:04 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1475531464.6.0.694277751939.issue26240@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 19:15:48 2016 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 03 Oct 2016 23:15:48 +0000 Subject: [issue28338] test_pdb doctests have been removed from its test suite In-Reply-To: <1475400017.05.0.963185548302.issue28338@psf.upfronthosting.co.za> Message-ID: <1475536548.19.0.866030125734.issue28338@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Uh oh. Sorry for the mess! If this is any consolation, that was in the heat of the sprint. Thank you for cleaning it up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 20:16:32 2016 From: report at bugs.python.org (karl) Date: Tue, 04 Oct 2016 00:16:32 +0000 Subject: [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1475540192.39.0.946624925438.issue24712@psf.upfronthosting.co.za> karl added the comment: @ezio.melotti What is the next step for getting the patch accepted. ---------- nosy: +karlcow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 22:03:51 2016 From: report at bugs.python.org (Tyler Sweeden) Date: Tue, 04 Oct 2016 02:03:51 +0000 Subject: [issue28352] winfo_pathname(..) | window id "xyz" doesn't exist in this application. | Python 3.4.4 Message-ID: <1475546631.28.0.75775044978.issue28352@psf.upfronthosting.co.za> New submission from Tyler Sweeden: This issue presents itself in 3.4.4.. Reverted back to 3.4.1 and the issue was gone. ---------- components: Tkinter messages: 278004 nosy: Tyler Sweeden priority: normal severity: normal status: open title: winfo_pathname(..) | window id "xyz" doesn't exist in this application. | Python 3.4.4 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 22:28:55 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 02:28:55 +0000 Subject: [issue28352] winfo_pathname(..) | window id "xyz" doesn't exist in this application. | Python 3.4.4 In-Reply-To: <1475546631.28.0.75775044978.issue28352@psf.upfronthosting.co.za> Message-ID: <1475548135.39.0.360732018738.issue28352@psf.upfronthosting.co.za> Zachary Ware added the comment: Can you provide a minimal example to reproduce the issue with Python 3.5.2 or 3.6b1 (3.4 is no longer receiving bug fixes)? Also, what OS are you on, and if not Windows, what version of Tcl/Tk are you using? ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 22:51:52 2016 From: report at bugs.python.org (Tim Smith) Date: Tue, 04 Oct 2016 02:51:52 +0000 Subject: [issue19398] test_trace fails with -S In-Reply-To: <1382730233.11.0.30990585871.issue19398@psf.upfronthosting.co.za> Message-ID: <1475549512.77.0.360484051818.issue19398@psf.upfronthosting.co.za> Changes by Tim Smith : ---------- nosy: +tdsmith versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 23:23:35 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 03:23:35 +0000 Subject: [issue28348] Doc typo in asyncio.Task In-Reply-To: <1475510350.17.0.416323283403.issue28348@psf.upfronthosting.co.za> Message-ID: <1475551415.83.0.74912244534.issue28348@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: fixed the typo as reported. ---------- keywords: +patch Added file: http://bugs.python.org/file44948/issue28348.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 23:48:25 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 03:48:25 +0000 Subject: [issue26149] Suggest PyCharm Community as an editor for Unix platforms In-Reply-To: <1453153728.95.0.733172914649.issue26149@psf.upfronthosting.co.za> Message-ID: <1475552905.07.0.0809229456682.issue26149@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: ping :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 01:34:03 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 04 Oct 2016 05:34:03 +0000 Subject: [issue28318] Python unittest.mock.mock_calls stores references to arguments instead of their values In-Reply-To: <1475258078.84.0.445986439292.issue28318@psf.upfronthosting.co.za> Message-ID: <1475559243.02.0.492965347412.issue28318@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: > # passes, even though we didn't make the exact same call twice! Weird. It looks like a matter of perspective, but to me it surely _does_ seem like you _did_ make the exact same call twice. > test_function(arg) > test_function(arg) Neither test_function nor arg were rebound in the meantime. (If there's a "bug", it's a subtle thing that += seems like rebinding, and in fact it does rebind immutable objects. But that's off topic here.) [*Also, it could be argued that assert_has_calls should compare the arguments with `is` instead of `==`, but that would probably break too many things.] But let's try to be constructive. IIRC, unittest was modelled after Java's analogous library. Can someone check how Java solves this? I'm pretty sure it has the same "problem" (when arguments are objects), but maybe it keeps the reference semantics totally as conjectured in the previous paragraph. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 01:47:42 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 05:47:42 +0000 Subject: [issue26149] Suggest PyCharm Community as an editor for Unix platforms In-Reply-To: <1453153728.95.0.733172914649.issue26149@psf.upfronthosting.co.za> Message-ID: <1475560062.94.0.508158501964.issue26149@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for the feedback, Berker. I updated the patch as suggested. ---------- Added file: http://bugs.python.org/file44949/issue26149.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 01:47:45 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 05:47:45 +0000 Subject: [issue28288] Expose environment variable for Py_Py3kWarningFlag In-Reply-To: <1474993446.86.0.709676160725.issue28288@psf.upfronthosting.co.za> Message-ID: <1475560065.46.0.252685022869.issue28288@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the new patch. > I've uploaded the new patchset here. We don't directly upload patches to Rietveld so you did the right thing :) See https://docs.python.org/devguide/patch.html for details. Can you also add a note about this new variable to Doc/howto/pyporting.rst? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 02:25:05 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 06:25:05 +0000 Subject: [issue28337] Segfault in _struct.unpack_iterator In-Reply-To: <1475399829.48.0.464642269918.issue28337@psf.upfronthosting.co.za> Message-ID: <20161004062501.1685.4201.A258D032@psf.io> Roundup Robot added the comment: New changeset c4eb211fb38b by Zachary Ware in branch 'default': Closes #21124, #28337: Call PyType_Ready on unpackiter_type. https://hg.python.org/cpython/rev/c4eb211fb38b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 02:25:05 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 06:25:05 +0000 Subject: [issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4 In-Reply-To: <1396363951.96.0.324613047949.issue21124@psf.upfronthosting.co.za> Message-ID: <20161004062501.1685.29678.858F7DD3@psf.io> Roundup Robot added the comment: New changeset c4eb211fb38b by Zachary Ware in branch 'default': Closes #21124, #28337: Call PyType_Ready on unpackiter_type. https://hg.python.org/cpython/rev/c4eb211fb38b ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 02:25:26 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 06:25:26 +0000 Subject: [issue28337] Segfault in _struct.unpack_iterator In-Reply-To: <1475399829.48.0.464642269918.issue28337@psf.upfronthosting.co.za> Message-ID: <1475562326.97.0.551400071433.issue28337@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 02:26:33 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 06:26:33 +0000 Subject: [issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4 In-Reply-To: <1396363951.96.0.324613047949.issue21124@psf.upfronthosting.co.za> Message-ID: <1475562393.71.0.330766363811.issue21124@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch again :). The last idea you mentioned sounds somewhat interesting, please open a new issue for it if you'd like to pursue it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 02:44:43 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 06:44:43 +0000 Subject: [issue28229] lzma does not support pathlib In-Reply-To: <1475429097.02.0.755290053819.issue28229@psf.upfronthosting.co.za> Message-ID: <1475563483.19.0.877260995223.issue28229@psf.upfronthosting.co.za> Berker Peksag added the comment: Attaching a new patch that addresses Serhiy's comments. Thanks! ---------- Added file: http://bugs.python.org/file44950/issue28229_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 03:01:14 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 07:01:14 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <20161004070110.82076.16272.C7118022@psf.io> Roundup Robot added the comment: New changeset c9b7272e2553 by Benjamin Peterson in branch '3.5': ensure gc tracking is off when invoking weakref callbacks (closes #26617) https://hg.python.org/cpython/rev/c9b7272e2553 New changeset 520cb70ecb90 by Benjamin Peterson in branch '3.6': merge 3.5 (#26617) https://hg.python.org/cpython/rev/520cb70ecb90 New changeset c1d0df056c19 by Benjamin Peterson in branch 'default': merge 3.6 (#26617) https://hg.python.org/cpython/rev/c1d0df056c19 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 03:06:56 2016 From: report at bugs.python.org (Samson Lee) Date: Tue, 04 Oct 2016 07:06:56 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target Message-ID: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> New submission from Samson Lee: The bug is os.fwalk() crashes with unhandled exception when there is an error accessing symbolic link targets. To reproduce the bug, create a symbolic link that targets a file that you do not have permission to access: $ touch handsoff $ sudo chown root:root handsoff $ sudo chmod 700 handsoff $ ln -s handsoff blah Now, os.fwalk() fails: >>> for root, dirs, files, fd in os.fwalk('.'): ... print(root, dirs, files) ... Traceback (most recent call last): File "test_fwalk_permission_error.py", line 3, in for root, dirs, files, fd in os.fwalk('.'): File "/usr/lib64/python3.5/os.py", line 520, in fwalk yield from _fwalk(topfd, top, topdown, onerror, follow_symlinks) File "/usr/lib64/python3.5/os.py", line 537, in _fwalk if st.S_ISDIR(stat(name, dir_fd=topfd).st_mode): PermissionError: [Errno 13] Permission denied: 'blah' The cause of the problem is in this part of os.py: for name in names: try: # Here, we don't use AT_SYMLINK_NOFOLLOW to be consistent with # walk() which reports symlinks to directories as directories. # We do however check for symlinks before recursing into # a subdirectory. if st.S_ISDIR(stat(name, dir_fd=topfd).st_mode): dirs.append(name) else: nondirs.append(name) except FileNotFoundError: try: # Add dangling symlinks, ignore disappeared files if st.S_ISLNK(stat(name, dir_fd=topfd, follow_symlinks=False) .st_mode): nondirs.append(name) except FileNotFoundError: continue To fix it, simply replace FileNotFoundError with more general OSError. Cheers ---------- components: Library (Lib) messages: 278016 nosy: Samson Lee priority: normal severity: normal status: open title: os.fwalk() unhandled exception when error occurs accessing symbolic link target versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 03:08:56 2016 From: report at bugs.python.org (Samson Lee) Date: Tue, 04 Oct 2016 07:08:56 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1475564936.08.0.367553612345.issue28353@psf.upfronthosting.co.za> Samson Lee added the comment: Similar to http://bugs.python.org/issue25860 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 03:45:40 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 07:45:40 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1475567140.46.0.592477896162.issue28353@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can't reproduce the issue. $ mkdir testdir $ touch testdir/handsoff $ sudo chown root:root testdir/handsoff $ sudo chmod 700 testdir/handsoff $ ln -s handsoff testdir/blah $ python3.5 >>> import os >>> list(os.walk('testdir')) [('testdir', [], ['handsoff', 'blah'])] >>> list(os.fwalk('testdir')) [('testdir', [], ['handsoff', 'blah'], 3)] Ubuntu 16.04, Linux 4.4, tested on ext4 and tmpfs filesystems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 03:58:22 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 07:58:22 +0000 Subject: [issue28229] lzma does not support pathlib In-Reply-To: <1475429097.02.0.755290053819.issue28229@psf.upfronthosting.co.za> Message-ID: <1475567902.5.0.673295129086.issue28229@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- assignee: -> berker.peksag nosy: +serhiy.storchaka stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 04:55:53 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 08:55:53 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571353.57.0.396442250154.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- nosy: +jaysinh.shukla _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:00:39 2016 From: report at bugs.python.org (Sergey B Kirpichev) Date: Tue, 04 Oct 2016 09:00:39 +0000 Subject: [issue28354] DeprecationWarning not reported for invalid escape sequences Message-ID: <1475571639.5.0.779232953767.issue28354@psf.upfronthosting.co.za> New submission from Sergey B Kirpichev: We know from release notes, that "A backslash-character pair that is not a valid escape sequence now generates a DeprecationWarning". Sometimes it's true: $ python -W error Python 3.6.0b1+ (default, Oct 4 2016, 08:47:51) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> "xxx" != "hello \world" DeprecationWarning: invalid escape sequence '\w' But shouldn't DeprecationWarning be in the following case as well? $ cat a.py def f(s): return s != "hello \world" $ cat b.py import a print(a.f("xxx")) $ python b.py True $ python -W error b.py True ---------- components: Interpreter Core messages: 278020 nosy: Sergey.Kirpichev priority: normal severity: normal status: open title: DeprecationWarning not reported for invalid escape sequences versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:00:41 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:00:41 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571641.87.0.0771519060925.issue28315@psf.upfronthosting.co.za> Jaysinh shukla added the comment: According to this email, conversation with Terry, https://mail.python.org/mailman/private/core-mentorship/2016-October/003662.html adding patch for `Doc/library/ctypes.rst` ---------- hgrepos: +357 Added file: http://bugs.python.org/file44951/Doc_library_ctypes_rst_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:01:53 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:01:53 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571713.42.0.805845324647.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- hgrepos: +358 Added file: http://bugs.python.org/file44952/Doc_library_ctypes_rst_version_2_7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:02:01 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:02:01 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571721.34.0.00285177682645.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- hgrepos: -358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:02:05 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:02:05 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571725.29.0.151494737904.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- hgrepos: -357 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:02:22 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:02:22 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571741.99.0.729503071738.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44953/Doc_library_ctypes_rst_version_3_5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:03:03 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:03:03 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571783.64.0.539485877314.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44954/Doc_library_ctypes_rst_version_3_6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:03:35 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:03:35 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571815.8.0.850920982585.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44955/other_rst_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:03:54 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:03:54 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571834.76.0.367035642584.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44956/other_rst_version_2_7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:04:01 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:04:01 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571841.51.0.587610688153.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44957/other_rst_version_3_5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:04:09 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:04:09 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571849.91.0.651544039126.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44958/other_rst_version_3_6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:06:16 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:06:16 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571976.65.0.883814342608.issue28315@psf.upfronthosting.co.za> Jaysinh shukla added the comment: @Treyy: I have uploaded patches according to your comment at Core mentorship here (https://mail.python.org/mailman/private/core-mentorship/2016-October/003662.html) `Since I applied the patch, I can say in in this particular case, re-open, preferably with one or more patches. I intended to include all changes needed, at least for .rst files, and grepped with IDLE's re-based grep, but missed most of what you listed. I probably started in the wrong directory. But exclude 1. the .rej files, which are not tracked, and which you should delete. 2. the old 'What's New' files, where 'in ?' is likely correct. 3. the includes/text/py files, for reasons given in the issue. 4. the other .py files, like test_generators.py, at least initially, until it is determined why they are not failing if incorrect. Left are *.rst. At least some of the code should be run to verify that the proposed changes are correct. I would not mind a separate patch for ctypes.rst, which has half the hits. If you only reopen and do not do a patch, please copy these comments into the issue.` Please change the status of issue to `open` from `close`. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:06:49 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 09:06:49 +0000 Subject: [issue28354] DeprecationWarning not reported for invalid escape sequences In-Reply-To: <1475571639.5.0.779232953767.issue28354@psf.upfronthosting.co.za> Message-ID: <1475572009.74.0.0178437181115.issue28354@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue28128. A warning should be emitted when you compile the code, but it shouldn't be emitted when you import compiled module. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Improve the warning message for invalid escape sequences _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:07:52 2016 From: report at bugs.python.org (Samson Lee) Date: Tue, 04 Oct 2016 09:07:52 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1475572072.64.0.304610261405.issue28353@psf.upfronthosting.co.za> Samson Lee added the comment: Sorry, the target file needs to be in a directory you don't have permission to access: $ mkdir handsoff $ sudo chown root:root handsoff $ sudo chmod 700 handsoff $ ln -s handsoff/anything blah ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 06:07:00 2016 From: report at bugs.python.org (Michael Foord) Date: Tue, 04 Oct 2016 10:07:00 +0000 Subject: [issue28318] Python unittest.mock.mock_calls stores references to arguments instead of their values In-Reply-To: <1475258078.84.0.445986439292.issue28318@psf.upfronthosting.co.za> Message-ID: <1475575620.27.0.300023780402.issue28318@psf.upfronthosting.co.za> Michael Foord added the comment: This is a deliberate design decision of mock. Storing references works better for the more general case, with the trade-off being that it doesn't work so well for mutable arguments. See the note in the docs with a workaround: https://docs.python.org/3/library/unittest.mock-examples.html#coping-with-mutable-arguments ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 06:08:19 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 04 Oct 2016 10:08:19 +0000 Subject: [issue28328] statistics.geometric_mean has no tests. Defer to 3.7? In-Reply-To: <1475523413.56.0.682041089672.issue28328@psf.upfronthosting.co.za> Message-ID: <20161004100810.GE22471@ando.pearwood.info> Steven D'Aprano added the comment: > Steve, I really think we should postpone to 3.7. [...] If these fixes have to be in by the next beta (10th Oct), I fear that you are right. I can build up to changeset 103135:8b74e5528f35, but not beyond. I will be able to rectify that, but realistically it won't be before beta2. I expect that harmonic_mean is okay to stay in though? I feel frustrated at how close to complete geometric_mean is, disappointed that I can't work on it at the moment, and embarrassed that I'm letting the team down. Sorry for the extra work I've put you through. I can do the removals -- probably tonight. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 06:56:05 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 10:56:05 +0000 Subject: [issue15393] JSONDecoder.raw_decode breaks on leading whitespace In-Reply-To: <1342692596.02.0.962530841473.issue15393@psf.upfronthosting.co.za> Message-ID: <1475578565.71.0.88307733961.issue15393@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 07:07:20 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 11:07:20 +0000 Subject: [issue11664] Add patch method to unittest.TestCase In-Reply-To: <1300999439.71.0.376555102459.issue11664@psf.upfronthosting.co.za> Message-ID: <1475579240.53.0.139786024409.issue11664@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 07:09:46 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 04 Oct 2016 11:09:46 +0000 Subject: [issue21085] Cygwin does not provide siginfo_t.si_band In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <1475579386.89.0.349931602388.issue21085@psf.upfronthosting.co.za> Erik Bray added the comment: Thanks for the merge--targeting 3.7 for now and thinking about backporting later sounds fine to me. I'm also in the process of getting a Cygwin buildbot for Python up and running, but it's been slow going. That said, having a Cygwin buildbot is also high priority for my own (non-Python-specific) work. So once I have that up I will happily maintain a buildbot for Python on Cygwin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 07:27:52 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 04 Oct 2016 11:27:52 +0000 Subject: [issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict In-Reply-To: <1473351940.28.0.277088210884.issue28023@psf.upfronthosting.co.za> Message-ID: <1475580472.78.0.774941310994.issue28023@psf.upfronthosting.co.za> INADA Naoki added the comment: I've fixed dict support of python-gdb.py. But I found py-bt and py-bt-full are broken. They doesn't show builtin method. I think it's because FASTCALL. But I'm not sure. I just skip the test for py-bt in attached patch. ---------- assignee: -> inada.naoki components: +Demos and Tools keywords: +patch priority: normal -> high Added file: http://bugs.python.org/file44959/dict_gdb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 07:36:05 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 04 Oct 2016 11:36:05 +0000 Subject: [issue13756] Python3.2.2 make fail on cygwin In-Reply-To: <1326199459.04.0.575648132034.issue13756@psf.upfronthosting.co.za> Message-ID: <1475580965.21.0.121352093733.issue13756@psf.upfronthosting.co.za> Erik Bray added the comment: FWIW, even with this patch and --without-threads Python does *not* build successfully on Cygwin64 (which is all I'm really interested in personally), though it does succeed on 32-bit Cygwin. This has two related reasons: 1) The build of Python's bundled libffi does not work on 64-bit Cygwin for at least a few reasons that I won't go into here. There doesn't seem to be a ticket yet for that so I'll open one. 2) Using --with-system-ffi doesn't work for reasons I talked about in #2445, and also discussed a bit in #1706863 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 07:38:24 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 11:38:24 +0000 Subject: [issue28329] Add support for customizing scheduler's timefunc and delayfunc using subclassing In-Reply-To: <1475508400.02.0.394772928057.issue28329@psf.upfronthosting.co.za> Message-ID: <1475581103.99.0.298190529257.issue28329@psf.upfronthosting.co.za> Jaysinh shukla added the comment: Adding documentation patch on given `overridable_time_delay_v2.patch` for `default`. ---------- nosy: +jaysinh.shukla Added file: http://bugs.python.org/file44960/doc_patch_version_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 07:55:30 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 04 Oct 2016 11:55:30 +0000 Subject: [issue14438] _cursesmodule build fails on cygwin In-Reply-To: <1333018032.15.0.799270204557.issue14438@psf.upfronthosting.co.za> Message-ID: <1475582130.95.0.432184901557.issue14438@psf.upfronthosting.co.za> Erik Bray added the comment: I think it would still be worth including this patch in Python. It wouldn't be the only condition in py_curses.h for platform-specific oddities with ncurses. This patch is still needed for the _curses module to build on Cygwin. ---------- nosy: +erik.bray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 07:57:43 2016 From: report at bugs.python.org (Tobias Dammers) Date: Tue, 04 Oct 2016 11:57:43 +0000 Subject: [issue28355] wsgiref simple_server PATH_INFO treats slashes and %2F the same Message-ID: <1475582263.54.0.955385942496.issue28355@psf.upfronthosting.co.za> New submission from Tobias Dammers: The WSGI reference implementation does not provide any means for application code to distinguish between the following request lines: GET /foo/bar HTTP/1.1 GET /foo%2Fbar HTTP/1.1 Now, the relevant RFC-1945 (https://tools.ietf.org/html/rfc1945#section-3.2) does not explicitly state how these should be handled by application code, but it does clearly distinguish encoded from unencoded forward-slashes in the BNF, which suggests that percent-encoded slashes should be considered part of a path segment, while unencoded slashes should be considere segment separators, and thus that the first URL is supposed to be interpreted as ['foo', 'bar'], but the second one as ['foo/bar']. However, the 'PATH_INFO' WSGI environ variable contains the same string, '/foo/bar', in both cases, making it impossible for application code to handle the difference. I believe the underlying issue is that percent-decoding (and decoding URLs into UTF-8) happens before interpreting the 'PATH_INFO', which is unavoidable because of the design decision to present PATH_INFO as a unicode string - if it were kept as a bytestring, then interpreting it would remain the sole responsibility of the application code; if it were a fully parsed list of unicode path segments, then the splitting could be implemented correctly. Unfortunately, I cannot see a pleasant way of fixing this without breaking a whole lot of stuff, but maybe someone else does. It's also very possible that I interpret the RFC incorrectly, in which case please enlighten me. ---------- messages: 278032 nosy: tdammers priority: normal severity: normal status: open title: wsgiref simple_server PATH_INFO treats slashes and %2F the same type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 08:01:48 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 12:01:48 +0000 Subject: [issue24065] Outdated *_RESTRICTED flags in structmember.h In-Reply-To: <1430156419.01.0.516849484938.issue24065@psf.upfronthosting.co.za> Message-ID: <1475582508.19.0.708518939864.issue24065@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 08:05:23 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 12:05:23 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475582723.51.0.057101389086.issue2897@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 08:06:01 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 12:06:01 +0000 Subject: [issue28351] statistics.geometric_mean can enter infinite loop for Decimal inputs In-Reply-To: <1475523187.92.0.24883134157.issue28351@psf.upfronthosting.co.za> Message-ID: <1475582761.83.0.0781206182464.issue28351@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 08:26:48 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Tue, 04 Oct 2016 12:26:48 +0000 Subject: [issue14438] _cursesmodule build fails on cygwin In-Reply-To: <1333018032.15.0.799270204557.issue14438@psf.upfronthosting.co.za> Message-ID: <1475584008.38.0.241529576501.issue14438@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: I don't agree with #14438 patch to apply branch. this is quickfix for just Cygwin. I think that curses library should be chosen using configure script. Erik, How about patch for #14598 or #28190? I prefer #28190 because better header is chosen using configure script. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 09:05:43 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 04 Oct 2016 13:05:43 +0000 Subject: [issue14438] _cursesmodule build fails on cygwin In-Reply-To: <1333018032.15.0.799270204557.issue14438@psf.upfronthosting.co.za> Message-ID: <1475586343.57.0.0880706358354.issue14438@psf.upfronthosting.co.za> Erik Bray added the comment: I see what you're saying--thanks for pointing out those other tickets. I'll give #28190 a try first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 09:42:32 2016 From: report at bugs.python.org (stephan) Date: Tue, 04 Oct 2016 13:42:32 +0000 Subject: [issue28356] os.rename different in python 2.7.12 and python 3.5.2 Message-ID: <1475588552.47.0.916118565333.issue28356@psf.upfronthosting.co.za> New submission from stephan: Hi, I am just migrating my code from python 2.7.12 to 3.5.2 on Windows and stumbled on the following difference: In python 2.7.12: os.rename(filepath1, filepath2) works even if filepath1 and filepath2 are on different drives (or one on a local drive, the other on a network share). In python 3.5.2 I get for the same operation: "OSError: [WinError 17] The system cannot move the file to a different disk drive" My question: - is this a bug? - if not, where is this difference mentioned in the docs? I did find nothing, but I think it should be mentioned, otherwise I assume it's a bug. ---------- messages: 278035 nosy: stephan priority: normal severity: normal status: open title: os.rename different in python 2.7.12 and python 3.5.2 type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 09:50:31 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Oct 2016 13:50:31 +0000 Subject: [issue28356] Windows: os.rename different in python 2.7.12 and python 3.5.2 In-Reply-To: <1475588552.47.0.916118565333.issue28356@psf.upfronthosting.co.za> Message-ID: <1475589031.37.0.948781659319.issue28356@psf.upfronthosting.co.za> STINNER Victor added the comment: On Python 3 on Windows, os.rename() is implemented as MoveFileExW() with flags=0. The doc says: "When moving a file, the destination can be on a different file system or volume. If the destination is on another drive, you must set the MOVEFILE_COPY_ALLOWED flag in dwFlags." https://msdn.microsoft.com/en-us/library/windows/desktop/aa365240%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 I guess that the portable fix is to try rename() or fall back on copy(src, dst) + delete(src). -- On Python 2 on Windows, os.rename() is implemented as MoveFileW(). It seems like this function behaves as MoveFileEx() called with MOVEFILE_COPY_ALLOWED: "A new file may be on a different file system or drive." https://msdn.microsoft.com/en-us/library/windows/desktop/aa365239(v=vs.85).aspx -- Should we add a flag to os.rename() to allow copy, to have a portable API? ---------- components: +Windows nosy: +haypo, paul.moore, steve.dower, tim.golden, zach.ware title: os.rename different in python 2.7.12 and python 3.5.2 -> Windows: os.rename different in python 2.7.12 and python 3.5.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 09:51:24 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 13:51:24 +0000 Subject: [issue21085] Cygwin does not provide siginfo_t.si_band In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <1475589084.85.0.218164168556.issue21085@psf.upfronthosting.co.za> Zachary Ware added the comment: When you're ready to get your bot set up, ping me and I'll get you set up on the master side. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 09:52:44 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Oct 2016 13:52:44 +0000 Subject: [issue28356] Windows: os.rename different in python 2.7.12 and python 3.5.2 In-Reply-To: <1475588552.47.0.916118565333.issue28356@psf.upfronthosting.co.za> Message-ID: <1475589164.81.0.62364142178.issue28356@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah, on Linux rename() also fails if src and dst are on two different filesystems: OSError: [Errno 18] Invalid cross-device link. By the way, the Python document doesn't say anything about operation on two different filesystems :-/ https://docs.python.org/dev/library/os.html#os.rename ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 09:56:16 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 13:56:16 +0000 Subject: [issue13756] Python3.2.2 make fail on cygwin In-Reply-To: <1326199459.04.0.575648132034.issue13756@psf.upfronthosting.co.za> Message-ID: <1475589376.71.0.492075818827.issue13756@psf.upfronthosting.co.za> Zachary Ware added the comment: Hmm, Cygwin64 is what I built on (successfully). _ctypes does not build, but that's due to not having any libffi available at all: the bundled copy is no longer included in 3.7, and I didn't install a system copy. I view ctypes support as a fairly low-priority item; we have much bigger issues to worry about first :). If trying to build _ctypes actually crashes your build, I think '--without-system-ffi' might be enough to get it to error out cleanly. ---------- versions: +Python 3.7 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 10:00:10 2016 From: report at bugs.python.org (Eryk Sun) Date: Tue, 04 Oct 2016 14:00:10 +0000 Subject: [issue28356] Windows: os.rename different in python 2.7.12 and python 3.5.2 In-Reply-To: <1475588552.47.0.916118565333.issue28356@psf.upfronthosting.co.za> Message-ID: <1475589610.41.0.469929040237.issue28356@psf.upfronthosting.co.za> Eryk Sun added the comment: 3.3 added os.replace, which on Windows entailed a switch from calling MoveFile to MoveFileEx in order to specify the MOVEFILE_REPLACE_EXISTING flag. However, not passing the MOVEFILE_COPY_ALLOWED broke compatibility with os.rename on Windows for versions prior to 3.3. I don't know whether or not this was discussed as an intentional breaking change in order to align the behavior with POSIX rename(). The change seems reasonable to me, plus at this point I don't think much can be done other than to add a note to the docs that the behavior changed in 3.3. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 10:15:02 2016 From: report at bugs.python.org (stephan) Date: Tue, 04 Oct 2016 14:15:02 +0000 Subject: [issue28356] Windows: os.rename different in python 2.7.12 and python 3.5.2 In-Reply-To: <1475588552.47.0.916118565333.issue28356@psf.upfronthosting.co.za> Message-ID: <1475590502.09.0.130277046503.issue28356@psf.upfronthosting.co.za> stephan added the comment: Hi, I tryed os.replace() as replacement for os.rename() too, but as you said it does not work if the files are on different drives. For now I switched to shutil.move() but I suppose its not as performant/optimal as an "move" or "rename" directly supported by the OS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 10:31:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 14:31:53 +0000 Subject: [issue28350] Interning string constants with null character In-Reply-To: <1475522616.74.0.369918481264.issue28350@psf.upfronthosting.co.za> Message-ID: <1475591513.56.0.103520422636.issue28350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Victor. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 10:35:29 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Oct 2016 14:35:29 +0000 Subject: [issue28350] Interning string constants with null character In-Reply-To: <1475522616.74.0.369918481264.issue28350@psf.upfronthosting.co.za> Message-ID: <1475591729.5.0.811279583004.issue28350@psf.upfronthosting.co.za> STINNER Victor added the comment: I have no opinion on interning non-ASCII strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 10:45:16 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 14:45:16 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1475592316.83.0.671275305567.issue28353@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, there is a difference between os.walk() and os.fwalk() in some cases. I don't know whether it was introduced deliberately or by accident. os.fwalk() was added in issue13734, FileNotFoundError is used since issue14773. ---------- nosy: +hynek, loewis, neologix type: -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 10:56:56 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Tue, 04 Oct 2016 14:56:56 +0000 Subject: [issue14438] _cursesmodule build fails on cygwin In-Reply-To: <1333018032.15.0.799270204557.issue14438@psf.upfronthosting.co.za> Message-ID: <1475593016.53.0.998835528659.issue14438@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: My patch at issue28190 solves a different problem. IMO the correct way to go for this issue is issue25720. By the way, this problem affects more than Cygwin. (issue14598) ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 10:59:35 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 04 Oct 2016 14:59:35 +0000 Subject: [issue13756] Python3.2.2 make fail on cygwin In-Reply-To: <1326199459.04.0.575648132034.issue13756@psf.upfronthosting.co.za> Message-ID: <1475593175.62.0.0580277908819.issue13756@psf.upfronthosting.co.za> Erik Bray added the comment: Okay, that would explain it then. I was building from an older branch (pre-3.7) that still has the bundled libffi. FWIW with the fix from #2445, --with-system-ffi works (as does some trivial use of _ctypes though I haven't run all the tests). So if the bundled libffi is gone then I guess that's a moot point. Thanks for getting a bunch of these fixes merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 11:25:19 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 15:25:19 +0000 Subject: [issue28350] Interning string constants with null character In-Reply-To: <1475522616.74.0.369918481264.issue28350@psf.upfronthosting.co.za> Message-ID: <20161004152515.85581.60700.361E2671@psf.io> Roundup Robot added the comment: New changeset 522adc2e082a by Serhiy Storchaka in branch '2.7': Issue #28350: String constants with null character no longer interned. https://hg.python.org/cpython/rev/522adc2e082a New changeset d7ab3241aef2 by Serhiy Storchaka in branch '3.5': Issue #28350: String constants with null character no longer interned. https://hg.python.org/cpython/rev/d7ab3241aef2 New changeset 8585b4de4fc0 by Serhiy Storchaka in branch '3.6': Issue #28350: String constants with null character no longer interned. https://hg.python.org/cpython/rev/8585b4de4fc0 New changeset 563d523036c6 by Serhiy Storchaka in branch 'default': Issue #28350: String constants with null character no longer interned. https://hg.python.org/cpython/rev/563d523036c6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 11:25:32 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Oct 2016 15:25:32 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475594732.73.0.00376784750513.issue28315@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 11:26:35 2016 From: report at bugs.python.org (Eryk Sun) Date: Tue, 04 Oct 2016 15:26:35 +0000 Subject: [issue28356] Windows: os.rename different in python 2.7.12 and python 3.5.2 In-Reply-To: <1475588552.47.0.916118565333.issue28356@psf.upfronthosting.co.za> Message-ID: <1475594795.23.0.632168801619.issue28356@psf.upfronthosting.co.za> Eryk Sun added the comment: In scanning over issue 8828, I see no discussion of the consequences of not using MOVEFILE_COPY_ALLOWED in Antoine's patch, so it appears that this behavior change was unintentional. > For now I switched to shutil.move() but I suppose its not > as performant/optimal as an "move" or "rename" directly > supported by the OS. Correct, the copy employed by shutil.move for a cross-volume move is not as optimized as what MoveFile uses (basically CopyFile), but unless you're moving a file that's very large it shouldn't matter, and even then without testing I don't know if it's a significant difference relative to the throughput of the disk(s) involved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 11:27:43 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 15:27:43 +0000 Subject: [issue28350] Interning string constants with null character In-Reply-To: <1475522616.74.0.369918481264.issue28350@psf.upfronthosting.co.za> Message-ID: <1475594863.44.0.886339733981.issue28350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added tests and refactored all_name_chars(). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 11:32:50 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Tue, 04 Oct 2016 15:32:50 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1475595170.13.0.668686575831.issue25720@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: is_pad is added in ncurses 5.7-20090906 [1]. At least Mac OS X still ships ancient ncurses 5.7-20081102 [2], so an check in configure.ac is necessary. I'm trying it out. [1] http://invisible-island.net/ncurses/NEWS.html#t20090906 [2] http://opensource.apple.com//source/ncurses/ncurses-46/ncurses/NEWS ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 11:46:04 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Tue, 04 Oct 2016 15:46:04 +0000 Subject: [issue28190] Detect curses headers correctly for cross-compiling In-Reply-To: <1474132808.23.0.788365161086.issue28190@psf.upfronthosting.co.za> Message-ID: <1475595964.51.0.491545323214.issue28190@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: Now, Cygwin platform is able to build core interpreter on default branch. But the curses module has been failed to build. Therefore I tried to build curses module on Cygwin (Vista x86) using this patch. And it has been succeeded. The patch effect at build time removes one compiler option "-I/usr/include/ncursesw". Maybe that modification position is setup.py:1352. I couldn't confirm why it has became success. ---------- nosy: +masamoto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 11:53:04 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Tue, 04 Oct 2016 15:53:04 +0000 Subject: [issue28190] Detect curses headers correctly for cross-compiling In-Reply-To: <1474132808.23.0.788365161086.issue28190@psf.upfronthosting.co.za> Message-ID: <1475596384.27.0.950488051965.issue28190@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Hmm it's surprising for me that an irrelevant patch fixes issues on Cygwin. Does test_curses pass? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 11:53:48 2016 From: report at bugs.python.org (Orion Poplawski) Date: Tue, 04 Oct 2016 15:53:48 +0000 Subject: [issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel >= 3.10 In-Reply-To: <1396430238.51.0.283909097168.issue21131@psf.upfronthosting.co.za> Message-ID: <1475596428.45.0.960653851684.issue21131@psf.upfronthosting.co.za> Orion Poplawski added the comment: We're running into this building python 3.4.3 on EL6 ppc64. The os kernel is 4.7.2-201.fc24.ppc64, but the EL6 chroot kernel-headers are 2.6.32-642.4.2.el6. Any progress here? ---------- nosy: +opoplawski _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 11:55:42 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 15:55:42 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1475596542.16.0.0569077599427.issue25720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Mark, do you have relation to this? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:05:06 2016 From: report at bugs.python.org (grovarsunil) Date: Tue, 04 Oct 2016 16:05:06 +0000 Subject: [issue28357] *1-800-790-9186* Dell printer helpdesk phone number usa. Dell printer issue support remotely by third party Message-ID: <1475597106.86.0.519962343897.issue28357@psf.upfronthosting.co.za> New submission from grovarsunil: Are you looking online technical support for printer problems. Is your printer unable to print or scan. call us 1-800-790-9186 and get instant technical support remotely for Dell printer issues. DISCLAIMER: - WE are an independent organization working as online third party technical support company for business and personal computer software,antivirus,printers and email support. Call +1800 790 9186 Dell Printer customer support number Dell Printer phone number +1800 790 9186 Dell Printer +1-800-790-9186 tech support phone number Dell Printer help +1800 790 9186 USA technical support phone number +1800 790 9186 Dell Printer customer Support Telephone Number, Dell PRINTER technical support phone number Dell printer +1800-790-9186 Customer Support Number, Dell printer Technical Helpline Number USA, Dell printer support phone number united states +1800-790-9186 Dell printer +1800-790-9186 Customer Support , Dell printer technical Support phone number USA, Dell printer support phone number united states +1800-790-9186 Dell printer +1800-790-9186 Customer Support Number Dell printer technical Support phone number USA, Dell printer support phone number united states +1800-790-9186 +1800-790-9186@@@ Dell printer tech support number , .Dell printer technical support phone number Dell printer Toll Free - 1800-790-9186 Dell printer Technical Support Number, Dell printer help desk phone number Just Call, +1800-790-9186 for all type help related Dell printer Issue support telephone number,Dell printer support phone number,Dell printer support phone number,Dell printer help phone number, Dell printer technical support number.Dell printer support number, Dell printer phone number, Dell printer tech support number, Dell printer customer support number, Dell printer customer support phone number, Dell printer customer service phone number, Dell printer customer service phone number, Dell printer support phone number Dell printer help number-Dell printer Helpline Number; Dell printer help phone number-Dell printer Helpline Number, Dell printer Tech Support Toll free Number, Dell printer Support Telephone Number, Dell printer Tech Support Telephone number, Dell printer Tech Support contact number, Dell printer support contact number, Dell printer technical support contact number, Dell printer help desk phone number.Dell printer support phone number. Dial +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Dial +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Dial +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Now call +1800 790 9186 Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer Dial +1800 790 9186 Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer Now call +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Now call Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer Now call +1800 790 9186 Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer +1800 790 9186 Dell Printer technical support number Dell PRINTER technical support phone number usa +1800 790 9186 Dell Printer technical support number Dell PRINTER technical support phone number usa +1800 790 9186 Dell PRINTER technical support Dell PRINTER technical support number Dell Printer technical support number Dell PRINTER technical support phone number +1800 790 9186 Dell PRINTER technical support Dell PRINTER technical support number Dell PRINTER antivirus technical support number Dell PRINTER technical support phone number +1800 790 9186 Dell PRINTER technical support Dell PRINTER technical support number Dell Printer technical support number Dell PRINTER technical support phone number Dell PRINTER technical support phone number usa Dell PRINTER antivirus technical support phone number NOW**/FIRST Tech CALL. Dell Printer customer support phone numberDial +1800 790 9186 Dial +1800 790 9186 Dell Printer customer support phone number. Dell Printer phone number .Dell Printer support phone numbers FIRST Dial +1800 790 9186 Dell Printer customer support phone number. Dell Printer phone number .Dell Printer support phone numbers FIRST Dial +1800 790 9186 Dell Printer customer support phone number. Dell Printer phone number .Dell Printer support phone number Dial +1800 790 9186 Dell Printer customer support phone number. Dell Printer phone number .Dell Printer support phone number +1800 790 9186 Dell Printer support phone number, Dell Printer phone number .Dell Printer support phone number Dell Printer tech support number here. FREE Dell Printer Tech Support | Dell PRINTER HelpLine Number Describe 1- +1800 790 9186 FREE Dell Printer Tech Support | Dell PRINTER HelpLine Number here. Dell Printer customer support number usa 1- +1800 790 9186 FREE usa Dell Printer customer support number, Dell PRINTER antivirus support phone number, Dell PRINTER tech support phone number, F- SECURE customer support phone number, Dell PRINTER helpline number, Dell PRINTER customer number, Dell Printer customer support number, Dell PRINTER contact telephone number, contact number for Dell PRINTER , Dell PRINTER software contact number, Dell PRINTER toll free number, Dell PRINTER telephone number , Dell PRINTER number, Dell PRINTER toll free number usa, Dell PRINTER customer support, Dell PRINTER software customer support support, Dell Printer support phone number, Dell PRINTER support phone########### Dell PRINTER tech support, Dell PRINTER customer support, Dell PRINTER phone support, Dell PRINTER support number Dell PRINTER technical support, Dell PRINTER antivirus customer support phone numberDial +1800 790 9186 Dell PRINTER antivirus tech support phone number, contact Dell PRINTER support, Dell PRINTER antivirus technical support phone number Dell PRINTER phone number tech support, Dell PRINTER support ticket, Dell PRINTER customer support number, F- SECURE tech support number Dell PRINTER technical support number, Dell PRINTER support center, Dell PRINTER telephone support, call Dell PRINTER support Dell PRINTER antivirus customer support number, Dell Printer tech support number, support for Dell PRINTER Dell PRINTER phone number, Dell PRINTER customer support phone number, Dell PRINTER contact phone number, Dell Printer phone number, F- Dial +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Dial +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Dial +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Now call +1800 790 9186 Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer Dial +1800 790 9186 Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer Now call +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Now call Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer Now call +1800 790 9186 Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer +1800 790 9186 Dell Printer technical support number Dell PRINTER technical support phone number usa +1800 790 9186 Dell Printer technical support number Dell PRINTER technical support phone number usa +1800 790 9186 Dell PRINTER technical support Dell PRINTER technical support number Dell Printer technical support number Dell PRINTER technical support phone number +1800 790 9186 Dell PRINTER technical support Dell PRINTER technical support number Dell PRINTER antivirus technical support number Dell PRINTER technical support phone number +1800 790 9186 Dell PRINTER technical support Dell PRINTER technical support number Dell Printer technical support number Dell PRINTER technical support phone number Dell PRINTER technical support phone number usa Dell PRINTER antivirus technical support phone number NOW**/FIRST Tech CALL. Dell Printer customer support phone number Dial +1800 790 9186 Dial +1800 790 9186 Dell Printer customer support phone number. Dell Printer phone number .Dell Printer support phone numbers FIRST Dial +1800 790 9186 Dell Printer customer support phone number. Dell Printer phone number .Dell Printer support phone numbers FIRST Dial +1800 790 9186 Dell Printer customer support phone number. Dell Printer phone number .Dell Printer support phone number Dial +1800 790 9186 Dell Printer customer support phone number. Dell Printer phone number .Dell Printer support phone number +1800 790 9186 Dell Printer support phone number, Dell Printer phone number .Dell Printer support phone number Describe Dell Printer tech support number here. FREE Dell Printer Tech Support | Dell PRINTER HelpLine Number Describe 1- +1800 790 9186 FREE Dell Printer Tech Support | Dell PRINTER HelpLine Number here. Dell Printer customer support number usa 1- +1800 790 9186 FREE usa Dell Printer customer support number, Dell PRINTER antivirus support phone number, Dell PRINTER tech support phone number, F- SECURE customer support phone number, Dell PRINTER helpline number, Dell PRINTER customer number, Dell Printer customer support number, Dell PRINTER contact telephone number, contact number for Dell PRINTER , Dell PRINTER software contact number, Dell PRINTER toll free number, Dell PRINTER telephone number , Dell PRINTER number, Dell PRINTER toll free number usa, Dell PRINTER customer support, Dell PRINTER software customer support support, Dell Printer support phone number, Dell PRINTER support phone Dell PRINTER tech support, Dell PRINTER customer support, Dell PRINTER phone support, Dell PRINTER support number Dell PRINTER technical support, Dell PRINTER antivirus customer support phone number Dial +1800 790 9186 Dell PRINTER support antivirus tech support phone number, contact Dell PRINTER support, Dell PRINTER antivirus technical support phone number Dell PRINTER phone number tech support, Dell PRINTER support ticket, Dell PRINTER customer support number,- SECURE tech support number Dell PRINTER technical support number, Dell PRINTER support center, Dell PRINTER telephone support, call Dell PRINTER support Dell PRINTER antivirus customer support number, Dell Printer tech support number, support for Dell PRINTER Dell PRINTER phone number, Dell PRINTER customer support phone number, Dell PRINTER contact phone number, Dell Printer phone number, Dial +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Dial +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Dial +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Now call +1800 790 9186 Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer Dial +1800 790 9186 Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer Now call +1800 790 9186 Dell Printer contact number, Dell Printer antivirus tech support phone number, Dell Printer Now call Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer Now call +1800 790 9186 Dell Printer contact number, Dell Printerantivirus tech support phone number, Dell Printer +1800 790 9186 Dell Printer technical support number Dell PRINTER technical support phone number usa +1800 790 9186 Dell Printer technical support number Dell PRINTER technical support phone number usa +1800 790 9186 Dell PRINTER technical help ---------- components: Build messages: 278055 nosy: grovarsunil priority: normal severity: normal status: open title: *1-800-790-9186* Dell printer helpdesk phone number usa. Dell printer issue support remotely by third party versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:10:42 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 16:10:42 +0000 Subject: [issue28357] Spam In-Reply-To: <1475597106.86.0.519962343897.issue28357@psf.upfronthosting.co.za> Message-ID: <1475597442.32.0.46731361031.issue28357@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- title: *1-800-790-9186* Dell printer helpdesk phone number usa. Dell printer issue support remotely by third party -> Spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:11:02 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 16:11:02 +0000 Subject: [issue28357] Spam In-Reply-To: <1475597106.86.0.519962343897.issue28357@psf.upfronthosting.co.za> Message-ID: <1475597462.21.0.131273695476.issue28357@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- components: -Build nosy: -grovarsunil resolution: -> not a bug stage: -> resolved status: open -> closed versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:11:16 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 16:11:16 +0000 Subject: [issue28357] Spam Message-ID: <1475597476.12.0.0579404580739.issue28357@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- Removed message: http://bugs.python.org/msg278055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:14:43 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 04 Oct 2016 16:14:43 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1475597683.58.0.151280980945.issue27181@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I'm sorry to say that due to technical difficulties, geometric mean is not going to be in a fit state for beta 2 of 3.6, and so is going to be removed and delayed until 3.7. ---------- priority: release blocker -> versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:17:54 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 16:17:54 +0000 Subject: [issue13756] Python3.2.2 make fail on cygwin In-Reply-To: <1326199459.04.0.575648132034.issue13756@psf.upfronthosting.co.za> Message-ID: <1475597874.74.0.566908272243.issue13756@psf.upfronthosting.co.za> Zachary Ware added the comment: No problem. Feel free to nosy me on any Cygwin issues that you feel have consensus on the solution and a commit-ready patch implementing it. I can't guarantee when I'll have time to look at them, but I have finally gotten around to installing Cygwin and will get to them eventually :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:18:30 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 16:18:30 +0000 Subject: [issue5830] heapq item comparison problematic with sched's events In-Reply-To: <1240580106.04.0.721938894312.issue5830@psf.upfronthosting.co.za> Message-ID: <1475597910.81.0.553994510434.issue5830@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Needed tests for this feature. Otherwise sched.Event can be "enhanced" by removing ordering methods (issue28330). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:25:29 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 16:25:29 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <20161004162526.85673.73299.4C7094D6@psf.io> Roundup Robot added the comment: New changeset 9dce0e41bedd by Steven D'Aprano in branch 'default': Issue #27181 remove geometric_mean and defer for 3.7. https://hg.python.org/cpython/rev/9dce0e41bedd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:31:06 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 04 Oct 2016 16:31:06 +0000 Subject: [issue28351] statistics.geometric_mean can enter infinite loop for Decimal inputs In-Reply-To: <1475523187.92.0.24883134157.issue28351@psf.upfronthosting.co.za> Message-ID: <1475598666.36.0.117531361765.issue28351@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:32:00 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 04 Oct 2016 16:32:00 +0000 Subject: [issue28328] statistics.geometric_mean has no tests. Defer to 3.7? In-Reply-To: <1475325234.65.0.257375698668.issue28328@psf.upfronthosting.co.za> Message-ID: <1475598720.95.0.359271672743.issue28328@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:32:34 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 04 Oct 2016 16:32:34 +0000 Subject: [issue28111] geometric_mean can raise OverflowError for large input length In-Reply-To: <1473733233.31.0.576673883283.issue28111@psf.upfronthosting.co.za> Message-ID: <1475598754.05.0.935330374318.issue28111@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:33:07 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 04 Oct 2016 16:33:07 +0000 Subject: [issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs In-Reply-To: <1475324315.92.0.282609876939.issue28327@psf.upfronthosting.co.za> Message-ID: <1475598787.58.0.046650885383.issue28327@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:33:27 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 04 Oct 2016 16:33:27 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1475598807.6.0.343007841375.issue27761@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 12:47:48 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Tue, 04 Oct 2016 16:47:48 +0000 Subject: [issue28190] Detect curses headers correctly for cross-compiling In-Reply-To: <1474132808.23.0.788365161086.issue28190@psf.upfronthosting.co.za> Message-ID: <1475599668.7.0.672267307871.issue28190@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: test_curses has been skipped almost. the skip reason has been written "cygwin's curses mostly just hangs" in test case class. I removed the skip condition, and ran test. Tests was almost passed. The only, unget_wch was failed by edge case '\U0010FFFF', because the wchar_t size on windows platfrom is two bytes. I'll upload test log together. ---------- Added file: http://bugs.python.org/file44961/cygwin-test_curses.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:00:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 17:00:53 +0000 Subject: [issue28321] Plistlib: Half of the double width characters are missing when writing binary plist In-Reply-To: <1475276484.39.0.492967421117.issue28321@psf.upfronthosting.co.za> Message-ID: <1475600453.93.0.396103429967.issue28321@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:09:31 2016 From: report at bugs.python.org (Aristotel) Date: Tue, 04 Oct 2016 17:09:31 +0000 Subject: [issue28259] Ctypes bug windows In-Reply-To: <1474647946.24.0.533944480109.issue28259@psf.upfronthosting.co.za> Message-ID: <1475600971.69.0.486682730932.issue28259@psf.upfronthosting.co.za> Aristotel added the comment: Unfortunately in my case "minimal" example is extremely long. Do you really need it& ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:09:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 17:09:41 +0000 Subject: [issue28321] Plistlib: Half of the double width characters are missing when writing binary plist In-Reply-To: <1475276484.39.0.492967421117.issue28321@psf.upfronthosting.co.za> Message-ID: <20161004170936.79323.94011.066DC199@psf.io> Roundup Robot added the comment: New changeset 381ef0f08f89 by Serhiy Storchaka in branch '3.5': Issue #28321: Fixed writing non-BMP characters with binary format in plistlib. https://hg.python.org/cpython/rev/381ef0f08f89 New changeset 3a7234d04fe9 by Serhiy Storchaka in branch '3.6': Issue #28321: Fixed writing non-BMP characters with binary format in plistlib. https://hg.python.org/cpython/rev/3a7234d04fe9 New changeset b6c85e7e558a by Serhiy Storchaka in branch 'default': Issue #28321: Fixed writing non-BMP characters with binary format in plistlib. https://hg.python.org/cpython/rev/b6c85e7e558a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:10:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 17:10:19 +0000 Subject: [issue28321] Plistlib: Half of the double width characters are missing when writing binary plist In-Reply-To: <1475276484.39.0.492967421117.issue28321@psf.upfronthosting.co.za> Message-ID: <1475601019.85.0.832665093115.issue28321@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:11:48 2016 From: report at bugs.python.org (goon) Date: Tue, 04 Oct 2016 17:11:48 +0000 Subject: [issue28358] cakekup073@gmail.com Message-ID: <1475601108.21.0.157184134464.issue28358@psf.upfronthosting.co.za> New submission from goon: calli norton support 1-888-879-0163 phone number norton antivirus support customer dot support phone number usa calli norton support 1-888-879-0163 phone number norton antivirus support customer dot support phone number usa calli norton support 1-888-879-0163 phone number norton antivirus support customer dot support phone number usa Techsc 1-888-879-0163 norton Antivirus Technical Support Number customer service phone number customer support phone number customer care number1 8888790163 toll free number telephone number contact number norton antivirus Tech Support Number1-888-879-0163norton 360 technical support phone number usa 1.888.879.0163 norton 360 technical support phone number norton free call norton helpline phone number norton antivirus Tech Support Number1-888-879-0163norton 360 technical support phone number usa 1.888.879.0163 norton 360 technical support phone number norton free call norton helpline phone number@~@~1-888-879-0163++ norton Support Number norton antivirus customer service phone number norton helpline phone number@~@~1-888-879-0163++ norton Support Number norton antivirus customer service phone number norton helpline phone number@~@~1-888-879-0163++ norton Support Number norton antivirus customer service phone number norton Support Phone Number!!@~1-888-879-0163++ norton Tech Support Number usa norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton Support Number norton antivirus customer service phone number norton Security contact Number +1 888.879.0163**norton antivirus support phone numberusa1 888.879.0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1 888.879.0163contact norton antivirus customer service phone number AUS-1 888.879.0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service phone number for norton antivirus technical support phone number for norton security norton customer service telephone number norton customer support norton grentry non payment norton helpline support number norton internet security customer service norton internet security technical support norton oem customer service norton pc cillin technical support norton phone support norton removal tool download norton subscription renewal norton support contact norton support hotline norton support phone number norton tech support phone number norton technical support norton technical support chat norton technical support phone number norton technical support phone number usa norton telephone number norton titanium antivirus norton titanium internet security norton titanium maximum norton titanium maximum security norton titanium problems norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-1879contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service norton titanium removal tool norton titanium reviews norton titanium support norton virus removal service uninstall norton smart surfing for mac usa customer care number for norton antivirus norton phone number customer service norton phone numbers customer support norton phone support number norton security contact phone number norton security phone number customer service norton security support phone number norton support contact number norton support email address norton support phone number norton support telephone number norton support telephone number usa norton support telephone number norton tech support number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-1879contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer servicenorton antivirus customer care phone number norton antivirus customer service billing norton antivirus customer service email address norton antivirus customer service live chat norton antivirus customer service telephone number norton antivirus customer support usa phone number norton antivirus help desk support phone number free in usa norton antivirus phone number customer service us norton antivirus phone number support norton antivirus support phone number norton antivirus tech support phone number free in usa norton antivirus tech support phone number norton antivirus technical support customer service norton antivirus technical support number norton antivirus telephone number norton antivirus toll free customer care number norton antivirus toll free number in usa norton antivirus contact phone number in usa norton antivirus customer service number norton antivirus customer service phone number norton antivirus customer service telephone number norton antivirus customer support number norton antivirus customer support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-1879contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service norton antivirus customer support phone number norton antivirus help desk phone number in usa norton antivirus phone number norton tech support phone number norton tech support phone number free norton technical support phone number norton technical support cutomer phone number norton technical support phone number norton technical support number free in usa norton technical support number toll free number norton technical support phone number norton technologies phone number norton telephone support number norton antivirus customer support phone number norton antivirus customer service phone number norton customer support phone number norton phone number customer service norton technical support telephone number contact norton antivirus customer service phone number customer service number for norton antivirus phone number for norton antivirus phone number for norton antivirus customer service phone number for norton antivirus support phone number for norton customer service phone number for norton customer service phone number for norton customer support norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-1879contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service phone number for norton tech support phone number norton antivirus customer service norton antivirus customer service number norton antivirus customer service phone norton antivirus customer service phone number norton antivirus customer service phone number us norton antivirus customer service telephone number norton antivirus customer support norton antivirus customer support number norton antivirus phone number customer service us norton antivirus phone number support norton antivirus phone support norton antivirus phone support number norton antivirus support phone number norton antivirus tech support phone number norton antivirus technical support norton antivirus technical support number norton antivirus technical support phone number norton customer service phone number norton customer support phone number norton helpline phone number norton internet security customer service norton internet security customer service phone number norton internet security help phone number norton internet security phone number customer service norton phone number customer service norton phone number customer support norton security customer service phone number K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number ~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number norton helpline phone number@~1888-879-0163 norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+1888-879-0163 norton Antivirus Technical Support USA-1888-879-1879contact norton antivirus customer service phone numberusa1 888.879.0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1 888.879.0163contact norton antivirus customer service phone number AUS-1 888.879.0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service phone number for norton antivirus technical support phone number for norton security norton customer service telephone number norton customer support norton grentry non payment norton helpline support number norton internet security customer service norton internet security technical support norton oem customer service norton pc cillin technical support norton phone support norton removal tool download norton subscription renewal norton support contact norton support hotline norton support phone number norton tech support phone number norton technical support norton technical support chat norton technical support phone number norton technical support phone number usa norton telephone number norton titanium antivirus norton titanium internet security norton titanium maximum norton titanium maximum security norton titanium problems norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-1879contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service norton titanium removal tool norton titanium reviews norton titanium support norton virus removal service uninstall norton smart surfing for mac usa customer care number for norton antivirus norton phone number customer service norton phone numbers customer support norton phone support number norton security contact phone number norton security phone number customer service norton security support phone number norton support contact number norton support email address norton support phone number norton support telephone number norton support telephone number usa norton support telephone number norton tech support number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-1879contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer servicenorton antivirus customer care phone number norton antivirus customer service billing norton antivirus customer service email address norton antivirus customer service live chat norton antivirus customer service telephone number norton antivirus customer support usa phone number norton antivirus help desk support phone number free in usa norton antivirus phone number customer service us norton antivirus phone number support norton antivirus support phone number norton antivirus tech support phone number free in usa norton antivirus tech support phone number norton antivirus technical support customer service norton antivirus technical support number norton antivirus telephone number norton antivirus toll free customer care number norton antivirus toll free number in usa norton antivirus contact phone number in usa norton antivirus customer service number norton antivirus customer service phone number norton antivirus customer service telephone number norton antivirus customer support number norton antivirus customer support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-1879contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service norton antivirus customer support phone number norton antivirus help desk phone number in usa norton antivirus phone number norton tech support phone number norton tech support phone number free norton technical support phone number norton technical support cutomer phone number norton technical support phone number norton technical support number free in usa norton technical support number toll free number norton technical support phone number norton technologies phone number norton telephone support number norton antivirus customer support phone number norton antivirus customer service phone number norton customer support phone number norton phone number customer service norton technical support telephone number contact norton antivirus customer service phone number customer service number for norton antivirus phone number for norton antivirus phone number for norton antivirus customer service phone number for norton antivirus support phone number for norton customer service phone number for norton customer service phone number for norton customer support norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-1879contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service phone number for norton tech support phone number norton antivirus customer service norton antivirus customer service number norton antivirus customer service phone norton antivirus customer service phone number norton antivirus customer service phone number us norton antivirus customer service telephone number norton antivirus customer support norton antivirus customer support number norton antivirus phone number customer service us norton antivirus phone number support norton antivirus phone support norton antivirus phone support number norton antivirus support phone number norton antivirus tech support phone number norton antivirus technical support norton antivirus technical support number norton antivirus technical support phone number norton customer service phone number norton customer support phone number norton helpline phone number norton internet security customer service norton internet security customer service phone number norton internet security help phone number norton internet security phone number customer service norton phone number customer service norton phone number customer support norton security customer service phone number K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number ~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number norton helpline phone number@~1888-879-0163 norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+1888-879-0163 norton Antivirus Technical Support USA-1888-879-1879contact norton antivirus customer service phone number Page URL: ---------- components: Argument Clinic messages: 278063 nosy: goon369, larry priority: normal severity: normal status: open title: cakekup073 at gmail.com type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:14:10 2016 From: report at bugs.python.org (goon) Date: Tue, 04 Oct 2016 17:14:10 +0000 Subject: [issue28359] Norton.Helpline +1-888-879-.0163 Norton Technical Support telePhone number Norton phone Number Message-ID: <1475601250.88.0.732728688895.issue28359@psf.upfronthosting.co.za> New submission from goon: - USAA-1-888-879-0163++ Norton 360 support phone number Norton tech support phone number Norton 360 Tech Support Number Norton antivirus~:((++1888879.01.63+))@Norton antivirus Phone at number@Norton antivirus at Dell@brother at Norton antivirus at Norton antivirus@@technical at support@number at USA !!Help W:::norton:::::::::::norton:::::::::::::::::@1888 879 0163::::::::::::SUPPORT:::::::::::::::::::::~~! norton Antivirus tech support phone number;;;;;; -!@!~~chilluu@@pLumber+18888790163 norton antivirus internet security tech support phone number 8888790163@@@@##### https://answers.launchpad.net norton internet security tech support phone number - USAi-1-888-879-0163++ Norton 360 support phone number Norton tech support phone number Norton 360 Tech Support Number calli norton support 1-888-879-0163 phone number norton antivirus support customer dot support phone number usa Techsc 1-888-879-0163 norton Antivirus Technical Support Number customer service phone number customer support phone number customer care number1 8888790163 toll free number telephone number contact number norton antivirus Tech Support Number1-888-879-0163norton 360 technical support phone number usa 1.888.879.0163 norton 360 technical support phone number norton free call norton helpline phone number norton antivirus Tech Support Number1-888-879-0163norton 360 technical support phone number usa 1.888.879.0163 norton 360 technical support phone number norton free call norton helpline phone number@~@~1-888-879-0163++ norton Support Number norton antivirus customer service phone number norton helpline phone number@~@~1-888-879-0163++ norton Support Number norton antivirus customer service phone number norton helpline phone number@~@~1-888-879-0163++ norton Support Number norton antivirus customer service phone number norton Support Phone Number!!@~1-888-879-0163++ norton Tech Support Number usa norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton Support Number norton antivirus customer service phone number norton Security contact Number +1 888.879.0163**norton antivirus support phone numberusa1 888.879.0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1 888.879.0163contact norton antivirus customer service phone number AUS-1 888.879.0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service phone number for norton antivirus technical support phone number for norton security norton customer service telephone number norton customer support norton grentry non payment norton helpline support number norton internet security customer service norton internet security technical support norton oem customer service norton pc cillin technical support norton phone support norton removal tool download norton subscription renewal norton support contact norton support hotline norton support phone number norton tech support phone number norton technical support norton technical support chat norton technical support phone number norton technical support phone number usa norton telephone number norton titanium antivirus norton titanium internet security norton titanium maximum norton titanium maximum security norton titanium problems norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-0163contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service norton titanium removal tool norton titanium reviews norton titanium support norton virus removal service uninstall norton smart surfing for mac usa customer care number for norton antivirus norton phone number customer service norton phone numbers customer support norton phone support number norton security contact phone number norton security phone number customer service norton security support phone number norton support contact number norton support email address norton support phone number norton support telephone number norton support telephone number usa norton support telephone number norton tech support number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-0163contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer servicenorton antivirus customer care phone number norton antivirus customer service billing norton antivirus customer service email address norton antivirus customer service live chat norton antivirus customer service telephone number norton antivirus customer support usa phone number norton antivirus help desk support phone number free in usa norton antivirus phone number customer service us norton antivirus phone number support norton antivirus support phone number norton antivirus tech support phone number free in usa norton antivirus tech support phone number norton antivirus technical support customer service norton antivirus technical support number norton antivirus telephone number norton antivirus toll free customer care number norton antivirus toll free number in usa norton antivirus contact phone number in usa norton antivirus customer service number norton antivirus customer service phone number norton antivirus customer service telephone number norton antivirus customer support number norton antivirus customer support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-0163contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service norton antivirus customer support phone number norton antivirus help desk phone number in usa norton antivirus phone number norton tech support phone number norton tech support phone number free norton technical support phone number norton technical support cutomer phone number norton technical support phone number norton technical support number free in usa norton technical support number toll free number norton technical support phone number norton technologies phone number norton telephone support number norton antivirus customer support phone number norton antivirus customer service phone number norton customer support phone number norton phone number customer service norton technical support telephone number contact norton antivirus customer service phone number customer service number for norton antivirus phone number for norton antivirus phone number for norton antivirus customer service phone number for norton antivirus support phone number for norton customer service phone number for norton customer service phone number for norton customer support norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-0163contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service phone number for norton tech support phone number norton antivirus customer service norton antivirus customer service number norton antivirus customer service phone norton antivirus customer service phone number norton antivirus customer service phone number us norton antivirus customer service telephone number norton antivirus customer support norton antivirus customer support number norton antivirus phone number customer service us norton antivirus phone number support norton antivirus phone support norton antivirus phone support number norton antivirus support phone number norton antivirus tech support phone number norton antivirus technical support norton antivirus technical support number norton antivirus technical support phone number norton customer service phone number norton customer support phone number norton helpline phone number norton internet security customer service norton internet security customer service phone number norton internet security help phone number norton internet security phone number customer service norton phone number customer service norton phone number customer support norton security customer service phone number K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number ~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number norton helpline phone number@~1888-879-0163 norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+1888-879-0163 norton Antivirus Technical Support USA-1888-879-0163contact norton antivirus customer service phone numberusa1 888.879.0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1 888.879.0163contact norton antivirus customer service phone number AUS-1 888.879.0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service phone number for norton antivirus technical support phone number for norton security norton customer service telephone number norton customer support norton grentry non payment norton helpline support number norton internet security customer service norton internet security technical support norton oem customer service norton pc cillin technical support norton phone support norton removal tool download norton subscription renewal norton support contact norton support hotline norton support phone number norton tech support phone number norton technical support norton technical support chat norton technical support phone number norton technical support phone number usa norton telephone number norton titanium antivirus norton titanium internet security norton titanium maximum norton titanium maximum security norton titanium problems norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-0163contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service norton titanium removal tool norton titanium reviews norton titanium support norton virus removal service uninstall norton smart surfing for mac usa customer care number for norton antivirus norton phone number customer service norton phone numbers customer support norton phone support number norton security contact phone number norton security phone number customer service norton security support phone number norton support contact number norton support email address norton support phone number norton support telephone number norton support telephone number usa norton support telephone number norton tech support number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-0163contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer servicenorton antivirus customer care phone number norton antivirus customer service billing norton antivirus customer service email address norton antivirus customer service live chat norton antivirus customer service telephone number norton antivirus customer support usa phone number norton antivirus help desk support phone number free in usa norton antivirus phone number customer service us norton antivirus phone number support norton antivirus support phone number norton antivirus tech support phone number free in usa norton antivirus tech support phone number norton antivirus technical support customer service norton antivirus technical support number norton antivirus telephone number norton antivirus toll free customer care number norton antivirus toll free number in usa norton antivirus contact phone number in usa norton antivirus customer service number norton antivirus customer service phone number norton antivirus customer service telephone number norton antivirus customer support number norton antivirus customer support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-0163contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service norton antivirus customer support phone number norton antivirus help desk phone number in usa norton antivirus phone number norton tech support phone number norton tech support phone number free norton technical support phone number norton technical support cutomer phone number norton technical support phone number norton technical support number free in usa norton technical support number toll free number norton technical support phone number norton technologies phone number norton telephone support number norton antivirus customer support phone number norton antivirus customer service phone number norton customer support phone number norton phone number customer service norton technical support telephone number contact norton antivirus customer service phone number customer service number for norton antivirus phone number for norton antivirus phone number for norton antivirus customer service phone number for norton antivirus support phone number for norton customer service phone number for norton customer service phone number for norton customer support norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton Support Phone Number!!@~1-888-879-0163++ norton support phone number norton helpline phone number@~@~1-888-879-0163++ norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+@~1-888-879-0163++ norton Antivirus Technical Support USA-1888-879-0163contact norton antivirus customer service phone number AUS-1-888-879-0163 phone number for norton customer service UK-@~1-888-879-0163++ phone number for norton antivirus technical support 1-888-879-0163 phone number for norton antivirus customer service phone number for norton tech support phone number norton antivirus customer service norton antivirus customer service number norton antivirus customer service phone norton antivirus customer service phone number norton antivirus customer service phone number us norton antivirus customer service telephone number norton antivirus customer support norton antivirus customer support number norton antivirus phone number customer service us norton antivirus phone number support norton antivirus phone support norton antivirus phone support number norton antivirus support phone number norton antivirus tech support phone number norton antivirus technical support norton antivirus technical support number norton antivirus technical support phone number norton customer service phone number norton customer support phone number norton helpline phone number norton internet security customer service norton internet security customer service phone number norton internet security help phone number norton internet security phone number customer service norton phone number customer service norton phone number customer support norton security customer service phone number K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number ~K*Y*norton helpline phone number@~1-888-879-0163++ norton antivirus Support Number phone norton antivirus customer care phone number norton helpline phone number@~1888-879-0163 norton tech Support Number norton antivirus customer service phone number norton Security contact Number +1888-8790163**norton antivirus support phone number usa+1-888-879-0163) Technical support number CANADA+1888-879-0163 norton Antivirus Technical Support USA-1888-879-0163contact norton antivirus customer service phone number ---------- components: asyncio messages: 278064 nosy: goon369, gvanrossum, yselivanov priority: normal severity: normal status: open title: Norton.Helpline +1-888-879-.0163 Norton Technical Support telePhone number Norton phone Number type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:15:44 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 17:15:44 +0000 Subject: [issue28359] Norton.Helpline +1-888-879-.0163 Norton Technical Support telePhone number Norton phone Number In-Reply-To: <1475601250.88.0.732728688895.issue28359@psf.upfronthosting.co.za> Message-ID: <1475601344.25.0.66924710806.issue28359@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: -asyncio nosy: -goon369, gvanrossum, yselivanov type: crash -> versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:15:59 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 17:15:59 +0000 Subject: [issue28359] Spam In-Reply-To: <1475601250.88.0.732728688895.issue28359@psf.upfronthosting.co.za> Message-ID: <1475601359.32.0.575719759107.issue28359@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> not a bug status: open -> closed title: Norton.Helpline +1-888-879-.0163 Norton Technical Support telePhone number Norton phone Number -> Spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:16:21 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 17:16:21 +0000 Subject: [issue28359] Spam Message-ID: <1475601381.47.0.691271003561.issue28359@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- Removed message: http://bugs.python.org/msg278064 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:17:31 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 17:17:31 +0000 Subject: [issue28358] Spam In-Reply-To: <1475601108.21.0.157184134464.issue28358@psf.upfronthosting.co.za> Message-ID: <1475601451.6.0.952804759159.issue28358@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: -Argument Clinic nosy: -goon369, larry resolution: -> not a bug status: open -> closed title: cakekup073 at gmail.com -> Spam type: behavior -> versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:18:43 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 17:18:43 +0000 Subject: [issue28358] Spam Message-ID: <1475601523.49.0.261564060272.issue28358@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- Removed message: http://bugs.python.org/msg278063 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:18:48 2016 From: report at bugs.python.org (goon) Date: Tue, 04 Oct 2016 17:18:48 +0000 Subject: [issue28360] **<<<<<<<1^888`879~O163>>>>>>>> Norton antivirus customer support phone number Message-ID: <1475601528.59.0.803082698155.issue28360@psf.upfronthosting.co.za> New submission from goon: USA..1 888-879-0163++ Norton 360 support phone number om Norton tech support phone number Norton 360 Tech Support Number USA..1 888-879-0163++ Norton 360 support phone number om Norton tech support phone number Norton 360 Tech Support Number USAtralia>>>> USA-1 888-879-0163++ Norton 360 support phone number Norton tech support phone number Norton 360 Tech Support Number USA >>>> USA-1 888-879-0163++ Norton 360 support phone number USA-1 888-879-0163USA/canada Norton 360 Tech Support Number @@!1-888-879-0163;!!Norton 360 Support Number Norton Live Support and Help? 18(88-879-0163 @@ Norton tech support phone number Norton Live Support and Help? 18(88-879-0163 @@ Norton tech support phone number Norton Live Support and Help? 18(88-879-0163 Norton 360 support phone number USA USA Canada>>>> USA-1 888-879-0163++ Norton 360 support phone number USA-1 888-879-0163USA/canada Norton 360 Tech Support Number @@!1-888-879-0163;!!Norton 360 Support Number WikiGenes- @+++1888-879-0163++880Norton 360 support phone number18888790163USA/canada Norton antivirus technical support phone number 1.888-879-0163 hdfc toll free customer care number(((!1.888-879-0163)) Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton toll free customer care number 1.888-879-0163 Norton toll free customer care number 1.888-879-0163 Norton toll free customer care number 1.888-879-0163 Norton toll free customer care number 1.888-879-0163>>>>> Norton technical support phone number ((1.888-879-0163)) Norton technical support number 1.888-879-0163 Norton technical support number 1.888-879-0163 symantec technical support number 1.888-879-0163 Norton antivirus technical support number 1.888-879-0163 Norton support phone number 1.888-879-0163 Norton locations Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton customer service Norton antivirus customer care__Norton Support phone number 1.888-879-0163 Norton customer support phone number 1.888-879-0163 Norton customer support phone number 1.888-879-0163 Norton antivirus customer support phone number 1.888-879-0163Norton antivirus customer service phone number 1.888-879-0163 Norton antivirus technical support phone number 1.888-879-0163 Norton antivirus tech support phone number 1.888-879-0163 Norton antivirus phone number 1.888-879-0163 Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton security center phone number 1.888-879-0163 Norton support telephone number 1.888-879-0163 Norton 360 technical support phone number 1.888-879-0163 symantec technical support phone number 1.888-879-0163 Norton tech support phone number 1.888-879-0163 Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number apple technical support phone number 1.888-879-0163 USA microsoft technical support phone number 1.888-879-0163 USA gmail technical support phone number 1.888-879-0163 USA kaspersky technical support phone number 1.888-879-0163 USA lenovo technical support phone number 1.888-879-0163 USA epson technical support phone number 1.888-879-0163 USA Norton technical support phone number 1.888-879-0163 Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton AntiVirus Customer Service Phone Number #1: 888-879-0163 Norton Phone number 1-888-879-0163 Norton 360 phone number Norton 360 support phone number Free~* C at ll 1.888-879-0163 Norton 360 technical support phone number USA 1.888-879-0163 Norton 360 technical support phone number Norton free call ~* C at ll 1.888-879-0163 Norton 360 technical support phone number USA 1.888-879-0163 Norton 360 technical support phone number Norton free call Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number PHONE support USA @1.888-879-0163 Norton antivirus technical support phone number Norton locations Norton online support Norton Support phone number 1.888-879-0163 Norton customer care Norton tech support phone number 1.888-879-0163 Norton tech support phone number 1.888-879-0163 Norton antivirus tech support phone number 1.888-879-0163 Norton locations Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton Support phone number 1.888-879-0163 service Norton com Norton login Norton technical support phone number 1.888-879-0163 Norton customer service Norton Support phone number 1.888-879-0163 Norton support telephone number 1.888-879-0163 Norton support phone number 1.888-879-0163 Norton antivirus support phone number 1.888-879-0163 Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton antivirus tech support phone number 1.888-879-0163 Norton antivirus customer service phone number 1.888-879-0163 Norton 360 technical support phone number 1.888-879-0163 symantec technical support phone number 1.888-879-0163 Norton technical support phone number 1.888-879-0163 Norton customer service telephone number 1.888-879-0163 Norton antivirus phone number 1.888-879-0163 Norton antivirus customer service phone number 1.888-879-0163 Norton antivirus customer service Support Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton antivirus phone number 1.888-879-0163 Norton phone number 1.888-879-0163 cancel subscription Norton technical support phone number 1.888-879-0163 Norton 888 phone number 1.888-879-0163 snapdeal toll free customer care number 1.888-879-0163 sbi toll free customer care number 1.888-879-0163 airtel toll free customer care number 1.888-879-0163 Norton customer service number 1.888-879-0163 Norton call center Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton customer service email address Norton customer care no Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number call Norton support chat with Norton support Norton customer support Norton antivirus customer service number 1.888-879-0163 Norton Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton call center Norton hq Norton office locations Norton support site Norton telephone number 1.888-879-0163 for customer support Norton customer service contact number 1.888-879-0163 Norton customer care Norton toll free number 1.888-879-0163 Norton security contact number 1.888-879-0163 contact Vipre Norton headquarters Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton customer service chat Norton customer service telephone number 1.888-879-0163 Norton Support phone number 1.888-879-0163 Norton customer support Norton customer service refund Norton login Norton locations Norton customer service number 1.888-879-0163 USA Norton locations Norton customer service email address Norton support site Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton technical support phone number 1.888-879-0163 Norton technical support live chat Norton technical support email address Norton technical support number 1.888-879-0163 Norton technical support number 1.888-879-0163 Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number symantec technical support number 1.888-879-0163 Norton antivirus technical support number 1.888-879-0163 Norton customer support phone number 1.888-879-0163 Norton customer support number 1.888-879-0163 Norton customer support number 1.888-879-0163 Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton antivirus customer support number 1.888-879-0163 Norton locations Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton Support phone number 1.888-879-0163 Norton corporate phone number 1.888-879-0163 Norton 360 Tech Support Number @@!1-888-879-0163!! Norton 360 Support Number Norton customer service Support Norton technical support phone number 1.888-879-0163 Norton tech support phone number 1.888-879-0163 Norton tech support number 1.888-879-0163 Norton tech support number 1.888-879-0163 FREE ---------- components: Argument Clinic messages: 278065 nosy: goon369, larry priority: normal severity: normal status: open title: **<<<<<<<1^888`879~O163>>>>>>>> Norton antivirus customer support phone number versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:19:15 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 17:19:15 +0000 Subject: [issue28360] Spam In-Reply-To: <1475601528.59.0.803082698155.issue28360@psf.upfronthosting.co.za> Message-ID: <1475601555.96.0.0530330932803.issue28360@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: -Argument Clinic nosy: -goon369, larry resolution: -> not a bug status: open -> closed title: **<<<<<<<1^888`879~O163>>>>>>>> Norton antivirus customer support phone number -> Spam versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:19:29 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 17:19:29 +0000 Subject: [issue28360] Spam Message-ID: <1475601569.24.0.724239501635.issue28360@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- Removed message: http://bugs.python.org/msg278065 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:23:16 2016 From: report at bugs.python.org (Michael Felt) Date: Tue, 04 Oct 2016 17:23:16 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1475304242.97.0.22792218719.issue26439@psf.upfronthosting.co.za> Message-ID: <1d4d7f58-5ec0-3230-1549-0a3093951d49@gmail.com> Michael Felt added the comment: On 01-Oct-16 08:44, Martin Panter wrote: > Martin Panter added the comment: > > Hi Michael, I have done some cleanup and modifications to your patch. The result is in aix-library.161001.patch, which has all the changes, i.e. it is not based on another patch. Thanks. > More significant changes I made: > > * Change getExecLibPath_aix() and find_parts() to return a list object, rather than building a colon-separated string only to be pulled apart again > * Escape dots in get_legacy() regular expressions, so that they no longer match [shr_64xo], [shrxo], etc. > * Make get_dumpH() return the a list of (object, objectinfo) tuples, where objectinfo is a list of lines; avoids building multiline strings and then splitting them apart again > * Rewrite get_exactMatch() and get_version() without nested inline ?for? loops; use RE capture group > * Reuse util._last_version() instead of copying the _num_version() function > * Use lower case B for liB in get_member(). This means e.g. libcrypto.so is now preferred over libcrypto.so.1.0.0. That was a typo - to be sure I was still finding the versioned ones (the previous ones had had a bug that they no longer found the "standard" one. I forgot to remove (rather save file before the diff command) - you see everything! > > I did test it a bit on Linux with faked dump -H output, but I may have made mistakes that I did not pick up. Will apply the patch, build in 32 and 64 bit modes, and respond. > > Also, this still needs documentation, and I think some more tests for the test suite exercising various aspects of find_library() would be nice if possible. Working on that - have been posting some questions on python-list as I want to build an interface with an AIX performance library (libperfstat). Without this library one must run a command and then do some string manipulation, and sometimes call a second command once that has been found (e.g., uuid calls to get a MAC address, cloud-init to get boottime) - things that - with a library do not need a subprocess at all. But I shall also write up the AIX dlopen() process to explain how both .so and .a(member.so) works (as the argument to CDLL). > > Another thing: in the last few patches, you dropped the definition of RTLD_MEMBER from Modules/_ctypes/_ctypes.c. Is that intended, or just a temporary thing? Temporary thing - as I keep hoping for inclusion in Python2 and I recall you not wanting to add that into _ctypes on Python2. > > ---------- > versions: -Python 3.6 > Added file: http://bugs.python.org/file44902/aix-library.161001.patch > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:39:32 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 17:39:32 +0000 Subject: [issue28229] lzma does not support pathlib In-Reply-To: <1475429097.02.0.755290053819.issue28229@psf.upfronthosting.co.za> Message-ID: <20161004173929.75822.77357.9422BB9B@psf.io> Roundup Robot added the comment: New changeset b512780c6589 by Berker Peksag in branch '3.6': Issue #28229: lzma module now supports pathlib https://hg.python.org/cpython/rev/b512780c6589 New changeset de398937653b by Berker Peksag in branch 'default': Issue #28229: Merge from 3.6 https://hg.python.org/cpython/rev/de398937653b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:39:50 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 17:39:50 +0000 Subject: [issue28229] lzma does not support pathlib In-Reply-To: <1475429097.02.0.755290053819.issue28229@psf.upfronthosting.co.za> Message-ID: <1475602790.37.0.730702548306.issue28229@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:44:20 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 17:44:20 +0000 Subject: [issue28348] Doc typo in asyncio.Task In-Reply-To: <1475510350.17.0.416323283403.issue28348@psf.upfronthosting.co.za> Message-ID: <20161004174416.85846.38709.89A81B62@psf.io> Roundup Robot added the comment: New changeset 8c8692da071a by Berker Peksag in branch '3.5': Issue #28348: Fix typo in asyncio.Task() documentation https://hg.python.org/cpython/rev/8c8692da071a New changeset 99c37fa72b66 by Berker Peksag in branch '3.6': Issue #28348: Merge from 3.5 https://hg.python.org/cpython/rev/99c37fa72b66 New changeset 76591498aab7 by Berker Peksag in branch 'default': Issue #28348: Merge from 3.6 https://hg.python.org/cpython/rev/76591498aab7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:44:55 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 17:44:55 +0000 Subject: [issue28348] Doc typo in asyncio.Task In-Reply-To: <1475510350.17.0.416323283403.issue28348@psf.upfronthosting.co.za> Message-ID: <1475603095.01.0.355211810698.issue28348@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:52:33 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 17:52:33 +0000 Subject: [issue28255] TextCalendar.prweek/month/year outputs an extra whitespace character In-Reply-To: <1474620667.82.0.649697112253.issue28255@psf.upfronthosting.co.za> Message-ID: <1475603553.34.0.971412405905.issue28255@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It looks to me that only prmonth() should be changed. prweek() and pryear() either match the behavior of PYthon 2 or are the good approximation of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:54:03 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 17:54:03 +0000 Subject: [issue28222] test_distutils fails In-Reply-To: <1474432052.98.0.601076913744.issue28222@psf.upfronthosting.co.za> Message-ID: <1475603643.3.0.45420171271.issue28222@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:55:25 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 17:55:25 +0000 Subject: [issue27998] Remove support of bytes paths in os.scandir() In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475603725.24.0.753255772375.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm confused by the current title of this issue. Should the support of bytes paths in os.scandir() be removed or preserved? In latter case we can remove workaround code from os and glob. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:55:49 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 17:55:49 +0000 Subject: [issue28222] test_distutils fails In-Reply-To: <1474432052.98.0.601076913744.issue28222@psf.upfronthosting.co.za> Message-ID: <20161004175327.17526.23273.480C0C99@psf.io> Roundup Robot added the comment: New changeset fa09ba71babb by Berker Peksag in branch '3.5': Issue #28222: Don't fail if pygments is not available https://hg.python.org/cpython/rev/fa09ba71babb New changeset d5eefcfa3458 by Berker Peksag in branch '3.6': Issue #28222: Merge from 3.5 https://hg.python.org/cpython/rev/d5eefcfa3458 New changeset e0c1bc2e98ed by Berker Peksag in branch 'default': Issue #28222: Merge from 3.6 https://hg.python.org/cpython/rev/e0c1bc2e98ed ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 14:34:42 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 18:34:42 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1475606082.04.0.994564401725.issue3119@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It would be nice to support unlimitedly nested structures. C stack is more hard limit than Python stack. But the code of the pickle module (especially C implementation) is complicated and hardly optimized. I think it would be not easy to implement stackless version without significant loss of speed and readability. You can try, but I don't have much hope. ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 14:35:05 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 18:35:05 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1475606105.5.0.583582585858.issue3119@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- priority: normal -> low stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 14:39:29 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 18:39:29 +0000 Subject: [issue26491] Defer DECREFs until enum object is in a consistent state for re-entrancy In-Reply-To: <1457264726.34.0.955181545994.issue26491@psf.upfronthosting.co.za> Message-ID: <1475606369.59.0.207868777596.issue26491@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 14:40:59 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Oct 2016 18:40:59 +0000 Subject: [issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest) In-Reply-To: <1449078273.26.0.535537969115.issue25783@psf.upfronthosting.co.za> Message-ID: <1475606459.26.0.194073570283.issue25783@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 14:46:02 2016 From: report at bugs.python.org (Michael Felt) Date: Tue, 04 Oct 2016 18:46:02 +0000 Subject: [issue28361] BETA report: Python3.6 names pip pip3.6 (and why is the other name pip3) Message-ID: <1475606762.49.0.568305298556.issue28361@psf.upfronthosting.co.za> New submission from Michael Felt: a) pip is embedded in Python for some time. b) pip is called pip3.5 (with link to pip3) c) in Python3.6 pip is now called pip3.6 and linked to pip3 pip is pip - not pip3* because python is now called python3* pip is pip - currently version 8.1.2 - what does that have to do with pip3? IMHO - the name should just be pip p.s. in Python2.7 - pip is embedded, but not installed automatically. However, when you run the embedded install - pip is pip ---------- messages: 278075 nosy: Michael.Felt priority: normal severity: normal status: open title: BETA report: Python3.6 names pip pip3.6 (and why is the other name pip3) type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 14:52:26 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 18:52:26 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <20161004185223.20873.33815.2A741FC1@psf.io> Roundup Robot added the comment: New changeset de0fa478c22e by Steven D'Aprano in branch '3.6': Issue #27181 remove geometric_mean and defer for 3.7. https://hg.python.org/cpython/rev/de0fa478c22e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 14:55:38 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 04 Oct 2016 18:55:38 +0000 Subject: [issue27998] Remove support of bytes paths in os.scandir() In-Reply-To: <1475603725.24.0.753255772375.issue27998@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: It went back and forth. The current feeling is to *keep* that support, especially since their deprecation on Windows has been *undone* in 3.6. Feel free to update the title (though the initial comments may be harder to understand without the context of the original title). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 14:56:20 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Oct 2016 18:56:20 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1475607380.73.0.37409807949.issue27181@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Steven. Actually, we needed to remove geometric_mean from the 3.6 branch, not the default branch (which will become 3.7). I backported your removal patch to 3.6. Feel free to reapply geometric_mean to the default branch at your leisure. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 14:59:54 2016 From: report at bugs.python.org (spoo) Date: Tue, 04 Oct 2016 18:59:54 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1475607594.29.0.312879990662.issue26293@psf.upfronthosting.co.za> spoo added the comment: I confirmed this fixes the issue loading zips on an iPad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 15:04:45 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Oct 2016 19:04:45 +0000 Subject: [issue13829] exception error in _scproxy.so when called after fork In-Reply-To: <1326998522.6.0.790472668429.issue13829@psf.upfronthosting.co.za> Message-ID: <1475607885.84.0.0995210216019.issue13829@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: low -> normal stage: -> needs patch versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 15:06:27 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Oct 2016 19:06:27 +0000 Subject: [issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf In-Reply-To: <1475452134.75.0.942961822081.issue28342@psf.upfronthosting.co.za> Message-ID: <1475607987.9.0.0832259426705.issue28342@psf.upfronthosting.co.za> Ned Deily added the comment: OK, I'm closing this a duplicate and I've updated #13829 to include currently 3.x versions. ---------- components: +Macintosh nosy: +ronaldoussoren stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 15:11:43 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Oct 2016 19:11:43 +0000 Subject: [issue28361] BETA report: Python3.6 names pip pip3.6 (and why is the other name pip3) In-Reply-To: <1475606762.49.0.568305298556.issue28361@psf.upfronthosting.co.za> Message-ID: <1475608303.21.0.247746298219.issue28361@psf.upfronthosting.co.za> Zachary Ware added the comment: Pip is a third party project, so if you'd like to pursue this please open an issue on the pip issue tracker at https://github.com/pypa/pip/issues. Anyway, pip installs links named the way it does so that you can be (more) sure that you're invoking the correct pip. 'pip3.6' will invoke the pip installed with python3.6, 'pip3' will (or at least should) invoke the pip installed with whatever 'python3' points to, and 'pip' will point to whatever 'python' points to. When installed in a Python 3 venv, pip also installs a 'pip' link to 'pip3', just as there's also a 'python' link to 'python3'. In 2.7, pip is also installed as 'pip2.7' and 'pip2' along with 'pip'; again mirroring the version tags on the interpreter links. ---------- nosy: +zach.ware resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 15:15:28 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Oct 2016 19:15:28 +0000 Subject: [issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0 In-Reply-To: <1475449173.08.0.90782279022.issue28341@psf.upfronthosting.co.za> Message-ID: <1475608528.32.0.132560299018.issue28341@psf.upfronthosting.co.za> Ned Deily added the comment: It is a bit confusing but, in general these days, you should always install the current command line tools specific to the version of the Mac operating system you are running. That ensures that not only are the necessary build tools installed but also that the correct system header files are installed in /usr/include and elsewhere. To build cpython it is not necessary to download and install the full Xcode package, only the command line tools. As you discovered, by not installing the clt, the build falls back to using the headers from an Xcode-supplied SDK which may be for a newer system than the one you are building on and thus might require dealing with missing OS features. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 15:36:23 2016 From: report at bugs.python.org (Michael Felt) Date: Tue, 04 Oct 2016 19:36:23 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1475609783.29.0.177572781035.issue26439@psf.upfronthosting.co.za> Michael Felt added the comment: I have spent the last two hours trying to run the test - however, it fails with: root at x064:[/data/prj/python/python-3.6.0.177/Lib/ctypes]../../python util.py Traceback (most recent call last): File "util.py", line 102, in import ctypes._aix as aix File "/data/prj/python/python-3.6.0.177/Lib/ctypes/_aix.py", line 15, in from . import util File "/data/prj/python/python-3.6.0.177/Lib/ctypes/util.py", line 102, in import ctypes._aix as aix AttributeError: module 'ctypes' has no attribute '_aix' I have noticed several issues with the file that used to be named just ./build/_sysconfigdata.py but is now: ./build/lib.aix-5.3-3.6/_sysconfigdata_m_aix5_.py I am guessing something is wrong there - I am going to try copying only _aix.py to the Python2 branch and see if it works there -- and also dig deeper into what is going wrong with Python3.6* ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 15:57:07 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 19:57:07 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475611027.62.0.597109131073.issue10716@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for the update, Berker. Would you be able to remove the 'easy' keyword from this ticket? I'll keep myself in the nosy list as I'm interested to learn about this anyway :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 15:58:20 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 19:58:20 +0000 Subject: [issue17188] Document 'from None' in raise statement doc. In-Reply-To: <1360631999.8.0.76627095073.issue17188@psf.upfronthosting.co.za> Message-ID: <1475611100.5.0.643924797951.issue17188@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 16:06:56 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Oct 2016 20:06:56 +0000 Subject: [issue27998] Remove support of bytes paths in os.scandir() In-Reply-To: Message-ID: STINNER Victor added the comment: I suggest to modify posixmodule.c to support bytes on Windows at the C level. Since Windows uses utf8, there is no more real reason to drop bytes support only on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 16:13:58 2016 From: report at bugs.python.org (Michael Felt) Date: Tue, 04 Oct 2016 20:13:58 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1475612038.77.0.893838211426.issue26439@psf.upfronthosting.co.za> Michael Felt added the comment: Curious. When in 32-bit mode changing line 15 of _aix.py to +14 import re, os, sys +15 # from . import util The Lib/ctypes/util.py works. In 64-bit mode it does not: instead: root at x064:[/data/prj/python/python-3.6.0.177/Lib/ctypes]../../python util.py m :: None c :: libc.a(shr_64.o) Traceback (most recent call last): File "util.py", line 355, in test() File "util.py", line 330, in test print("bz2\t:: %s" % find_library("bz2")) File "util.py", line 104, in find_library return aix.find_library(name) File "/data/prj/python/python-3.6.0.177/Lib/ctypes/_aix.py", line 255, in find_library (base, member) = find_shared(libpaths, name) File "/data/prj/python/python-3.6.0.177/Lib/ctypes/_aix.py", line 247, in find_shared member = get_member(re.escape(name), members) File "/data/prj/python/python-3.6.0.177/Lib/ctypes/_aix.py", line 189, in get_member member = get_version(name, members) File "/data/prj/python/python-3.6.0.177/Lib/ctypes/_aix.py", line 170, in get_version return util._last_version(versions, '.') NameError: name 'util' is not defined +++++ When the comment is removed, i.e. from . import util both 32 and 64-bit report: root at x064:[/data/prj/python/python-3.6.0.177/Lib/ctypes]../../python util.py Traceback (most recent call last): File "util.py", line 102, in import ctypes._aix as aix File "/data/prj/python/python-3.6.0.177/Lib/ctypes/_aix.py", line 15, in from . import util File "/data/prj/python/python-3.6.0.177/Lib/ctypes/util.py", line 102, in import ctypes._aix as aix AttributeError: module 'ctypes' has no attribute '_aix' This last condition also occurs in Python2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 16:31:30 2016 From: report at bugs.python.org (Michael Felt) Date: Tue, 04 Oct 2016 20:31:30 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1475613090.13.0.0333369115529.issue26439@psf.upfronthosting.co.za> Michael Felt added the comment: Have a way to have both 64-bit and 32-bit modes working. root at x064:[/data/prj/python/python-3.6.0.177/Lib/ctypes]../../python `pwd`/util.py m :: None c :: libc.a(shr_64.o) bz2 :: libbz2.a(libbz2.so.1) crypt :: libcrypt.a(shr_64.o) crypto :: c :: root at x064:[/data/prj/python/python-3.6.0.177/Lib/ctypes]../../python `pwd`/util.py m :: None c :: libc.a(shr.o) bz2 :: libbz2.a(libbz2.so) crypt :: libcrypt.a(shr.o) crypto :: c :: Will post patch asap. Going to shorten some lines going well over 76-char lime-limit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 16:46:28 2016 From: report at bugs.python.org (Aaron Gallagher) Date: Tue, 04 Oct 2016 20:46:28 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1475613988.83.0.588150391801.issue3119@psf.upfronthosting.co.za> Aaron Gallagher added the comment: Definitely not interested in pickle at all anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 16:46:45 2016 From: report at bugs.python.org (Andre Roberge) Date: Tue, 04 Oct 2016 20:46:45 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475614005.15.0.642902739566.issue10716@psf.upfronthosting.co.za> Andre Roberge added the comment: When rhettinger created this issue, the goal was "Pydoc currently generated 1990's style html which mixes content and presentation, making it very difficult for users to customize the appearance of the output. ... Please convert it to simple, validated HTML with the formatting moved to a simple, validated default style sheet." Apparently, the statement of this issue is no longer correct. However, in order to do so, one apparently needs to have access to a private list mentioned in a comment (https://mail.python.org/mailman/private/core-mentorship/2016-August/003622.html) One thing that motivated to submit my tentative "solution" to this issue here almost two years ago (solution which, I thought, met the stated goal) was a discussion at Pycon as to how one could encourage new contributors. Is this the purpose of the core-mentorship list? Does one need to join the list if one wishes to contribute? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 16:46:59 2016 From: report at bugs.python.org (Aaron Gallagher) Date: Tue, 04 Oct 2016 20:46:59 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1475614019.2.0.356621076438.issue3119@psf.upfronthosting.co.za> Changes by Aaron Gallagher <_ at habnab.it>: ---------- nosy: -habnabit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 16:52:36 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 20:52:36 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475614356.93.0.0680467772929.issue10716@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi Andre, You can subscribe to the core mentorship mailing list here: https://mail.python.org/mailman/listinfo/core-mentorship Once you subscribed, you'll get access to the said discussion :) It is not required, but it's a great place to ask questions or get help from existing core developers. HTH ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 16:54:22 2016 From: report at bugs.python.org (Michael Felt) Date: Tue, 04 Oct 2016 20:54:22 +0000 Subject: [issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist In-Reply-To: <1475294235.93.0.688224641816.issue28276@psf.upfronthosting.co.za> Message-ID: <0f718d28-6d26-f942-200f-a65178661222@gmail.com> Michael Felt added the comment: On 01-Oct-16 05:57, Martin Panter wrote: > Martin Panter added the comment: > > Other tests in this file skip the test if libc_name is None. So I think it would make more sense to skip the test rather than fail in test_find(). I.e. > > if not found: > self.skipTest("Could not find c and m libraries") > > If you are confident that find_library() will always find libc on AIX, perhaps you can suggest an extra test (or add to an existing test), to first check for the AIX platform, and only then fail if find_library() returned None. Yes, I am confident - it is part of the core run-time environment: # lslpp -w | grep libc.a /usr/ccs/lib/libc.a bos.rte.libc File /usr/lib/libc.a bos.rte.libc Symlink /usr/lib/threads/libc.a bos.rte.libc Symlink And, bos.rte.libc cannot be uninstalled: SELECTED FILESETS: The following is a list of filesets that you asked to remove. They cannot be removed until all of their dependent filesets are also removed. See subsequent lists for details of dependents. bos.rte.libc 5.3.7.0 # Base Level Fileset NON-DEINSTALLABLE DEPENDENTS: The following filesets depend upon one or more of the selected filesets listed above. These dependents should be removed before the selected filesets. Deinstallability checks indicate that these dependents should not be removed from the system; therefore, the selected filesets cannot be removed. bos.mp64 5.3.7.0 # Base Operating System 64-bit... bos.rte 5.3.7.0 # Base Level Fileset devices.chrp.IBM.lhea.rte 5.3.7.0 # Host Ethernet Adapter (HEA) ... devices.chrp.base.rte 5.3.7.0 # RISC PC Base System Device S... devices.chrp.vdevice.rte 5.3.7.0 # Virtual I/O Bus Support devices.vdevice.IBM.v-scsi.rte 5.3.7.0 # Virtual SCSI Client Support ifor_ls.base.cli 5.3.7.0 # License Use Management Runti... I gave up counting the number of dependents that "officially" are dependents on bos.rte.libc after the count went above 200 - on a vanilla system install. I'll make a different test (skip if not aix) that find_library("c") must succeed. The load has already been tested - with libc_name already hard-coded. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- nosy: +aixtools at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 17:58:37 2016 From: report at bugs.python.org (Michael Felt) Date: Tue, 04 Oct 2016 21:58:37 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1475618317.52.0.2687314575.issue26439@psf.upfronthosting.co.za> Changes by Michael Felt : Added file: http://bugs.python.org/file44962/aix-modules.161004.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 18:02:18 2016 From: report at bugs.python.org (Michael Felt) Date: Tue, 04 Oct 2016 22:02:18 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1475618538.93.0.193574672691.issue26439@psf.upfronthosting.co.za> Michael Felt added the comment: Besides correcting a small error, also my attempt to follow the guidelines to not import *, but to actually specify all bits that are to be imported. This is a patch compered to Python-3.6b1 ---------- hgrepos: +359 Added file: http://bugs.python.org/file44963/aix-library.161004.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 19:13:29 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Oct 2016 23:13:29 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475622809.33.0.265465194558.issue28315@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Jaysinh, unless a patch for 3.5 does not cleanly apply to 3.6, or the patch must be different in 3.6*, no 3.6 patch is needed. Ditto for 3.7/default. Mariatta's patch merged forward without problem. *In this case, 'must be different' would be because there are different code examples. The same is true for 2.7 if the 3.x patch applies cleanly there (though this is less common there). Mariatta's patch also applied to 2.7, though as I reported, I found one more change for 2.7. So when you revise in response to comments, one of each patch is enough unless you know more are needed, in which case say so. If there are problems forward-merging the other_rst patch, please report first before preparing a 3.6 patch. If there were a problem with just one of the files, I would prpbably want a 3.6 patch just for the one file. I discovered a deeper problem. In spite of the doctest annotations, the doctests is not run on the ctypes doc and at least one of the tracebacks is wrong. >>> windll.kernel32.GetModuleHandleA() # doctest: +WINDOWS Traceback (most recent call last): File "", line 1, in ? ValueError: Procedure probably called with not enough arguments (4 bytes missing) >>> windll.kernel32.GetModuleHandleA(0, 0) # doctest: +WINDOWS Traceback (most recent call last): File "", line 1, in ? ValueError: Procedure probably called with too many arguments (4 bytes in excess) whereas, on Win10, 3.5 >>> from ctypes import * >>> windll.kernel32.GetModuleHandleA() 0 >>> windll.kernel32.GetModuleHandleA(0, 0) 480968704 However, when I ran make doctest, these did not show up, but they were not run. I will worry about this as a separate issue. >>> windll.kernel32.GetModuleHandleA() 477822976 >>> windll.kernel32.GetModuleHandleA(0, 0) 477822976 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 20:02:36 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Oct 2016 00:02:36 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1475625756.53.0.516287394508.issue20491@psf.upfronthosting.co.za> R. David Murray added the comment: It probably just got forgotten. If you want to help move it forward please do a review of the patch (see https://docs.python.org/devguide/tracker.html#reviewing-patches), including whether or not all outstanding review comments have been addressed, and post your recommendations here. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 20:02:55 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Oct 2016 00:02:55 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1475625775.16.0.573447154037.issue20491@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 20:08:14 2016 From: report at bugs.python.org (Roy Williams) Date: Wed, 05 Oct 2016 00:08:14 +0000 Subject: [issue28288] Expose environment variable for Py_Py3kWarningFlag In-Reply-To: <1474993446.86.0.709676160725.issue28288@psf.upfronthosting.co.za> Message-ID: <1475626094.11.0.757217188094.issue28288@psf.upfronthosting.co.za> Roy Williams added the comment: Thanks for the feedback Berker! This is my first CPython patch :D. Added in a note in pyporting. I actually did a much more detailed write up here https://gist.github.com/rowillia/c0feed97c1863b2d8e5a3ed73712df65, but it seems a bit verbose for this document. ---------- Added file: http://bugs.python.org/file44964/pythonenable3kwarningsflag.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 20:10:34 2016 From: report at bugs.python.org (George Fagin) Date: Wed, 05 Oct 2016 00:10:34 +0000 Subject: [issue28264] Turtle.onclick events blocked by Turtle.stamp In-Reply-To: <1474684600.08.0.523173866083.issue28264@psf.upfronthosting.co.za> Message-ID: <1475626234.83.0.534247866295.issue28264@psf.upfronthosting.co.za> George Fagin added the comment: Now you've got it. Clicking on the turtle results in an event message - at which point I spin the turtle and issue the message to make it clear that the message arrived. However, if you try doing that after a 'Turtle.stamp()' the message never comes. Issuing any of the other commands with the buttons will address the problem. This is why I think it's related to z-order: by doing something else the turtle gets focus again, and the OnClick event messages resume (until the next stamp). Thanks for taking time to look at this - I do appreciate it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 20:30:03 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Oct 2016 00:30:03 +0000 Subject: [issue28361] BETA report: Python3.6 names pip pip3.6 (and why is the other name pip3) In-Reply-To: <1475606762.49.0.568305298556.issue28361@psf.upfronthosting.co.za> Message-ID: <1475627403.91.0.0386396191949.issue28361@psf.upfronthosting.co.za> R. David Murray added the comment: There's really not much point in opening an issue in the pip tracker; this is working as designed, as Zach explained. On posix you "shouldn't" be using pip outside of a virtual environment anyway :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 20:33:29 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Oct 2016 00:33:29 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475627609.01.0.83155376109.issue10716@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 20:36:07 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Oct 2016 00:36:07 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475627767.95.0.670487200728.issue10716@psf.upfronthosting.co.za> R. David Murray added the comment: I've removed the easy tag. (Aside for those who can do the operation: to remove all tags from an issue one must select '-no selection-'; just ctrl-clicking the last tag to remove its highlight doesn't work...or at least that's what I remember, I didn't actually test it this time.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 20:36:08 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 00:36:08 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1475627768.74.0.156987209784.issue20491@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 23:32:16 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Oct 2016 03:32:16 +0000 Subject: [issue28329] Add support for customizing scheduler's timefunc and delayfunc using subclassing In-Reply-To: <1475508400.02.0.394772928057.issue28329@psf.upfronthosting.co.za> Message-ID: <1475638336.74.0.375466708568.issue28329@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, I'm going to decline this patch because 1) there is no evidence this is needed (i.e. hasn't ever been requested in the long life of this ancient module), 2) it adds API complexity (zen: there should be one-- and preferably only one --obvious way to do it), and 3) it feels more like feature creep than something that is truly useful (i.e. more a personal stylistic choice than a new capability). ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 00:20:52 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 04:20:52 +0000 Subject: [issue26869] unittest longMessage docs In-Reply-To: <1461743267.94.0.620093650485.issue26869@psf.upfronthosting.co.za> Message-ID: <1475641252.52.0.189478661118.issue26869@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, please review the updated documentation. Thanks. ---------- keywords: +patch Added file: http://bugs.python.org/file44965/issue26869.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 00:42:08 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 05 Oct 2016 04:42:08 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1475642528.74.0.592602310571.issue28201@psf.upfronthosting.co.za> INADA Naoki added the comment: Fixed conflict with current 3.6 branch, and added NEWS entry. ---------- Added file: http://bugs.python.org/file44966/dict-perturb-shift2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 00:50:20 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 04:50:20 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1475643020.13.0.939923978763.issue28353@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 01:41:35 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 05:41:35 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1475646095.38.0.173432717289.issue9850@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I'm just reading PEP-4 now for procedure of declaring a module deprecated. Should PEP-4 page be updated with the proposal / info for macpath deprecation? https://www.python.org/dev/peps/pep-0004/ Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 01:56:10 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 05:56:10 +0000 Subject: [issue28362] Deprecation warning doesn't stand out enough Message-ID: <1475646970.65.0.933224265007.issue28362@psf.upfronthosting.co.za> New submission from Mariatta Wijaya: In documentation for python 3.3, the deprecation warning is rendered in a red box which is more eye-catching. eg https://docs.python.org/3.3/library/imp.html?highlight=imp#module-imp But since python 3.4 onwards, seems like the red box disappears and the deprecation warning message no longer stands out. for example https://docs.python.org/3.4/library/imp.html?highlight=imp#module-imp I kinda prefer like the older style (with the red box). ---------- assignee: docs at python components: Documentation messages: 278103 nosy: Mariatta, docs at python priority: normal severity: normal status: open title: Deprecation warning doesn't stand out enough versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 02:29:25 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 05 Oct 2016 06:29:25 +0000 Subject: [issue28362] Deprecation warning doesn't stand out enough In-Reply-To: <1475646970.65.0.933224265007.issue28362@psf.upfronthosting.co.za> Message-ID: <1475648965.28.0.980201878311.issue28362@psf.upfronthosting.co.za> INADA Naoki added the comment: default.css was changed? https://docs.python.org/3.3/_static/default.css https://docs.python.org/3.4/_static/default.css ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 02:32:33 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 06:32:33 +0000 Subject: [issue28362] Deprecation warning doesn't stand out enough In-Reply-To: <1475646970.65.0.933224265007.issue28362@psf.upfronthosting.co.za> Message-ID: <1475649153.82.0.40044662292.issue28362@psf.upfronthosting.co.za> Berker Peksag added the comment: It was rendered in a red box, because we were using an old Sphinx CSS file (Doc/tools/static/basic.css) [1] We are using Sphinx defaults now and Python specific tweaks are located at Doc/tools/pydoctheme/static/pydoctheme.css. We usually prefer to use less disruptive visual elements (including using less gray note directives) in Python documentation. The exception to this is security warnings. See https://docs.python.org/3.5/library/xml.html and https://docs.python.org/3.5/library/ssl.html for example. I recommend to close this as "wont fix". [1] Removed in https://github.com/python/cpython/commit/7c366a72ac56814edaf3fb2718b08441aff31d3a ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 02:43:11 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 06:43:11 +0000 Subject: [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475649791.56.0.162942909495.issue28331@psf.upfronthosting.co.za> Berker Peksag added the comment: Does Sphinx use a dummy HTML file like you did in the patch? ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 02:50:42 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 05 Oct 2016 06:50:42 +0000 Subject: [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475650242.69.0.854774835236.issue28331@psf.upfronthosting.co.za> INADA Naoki added the comment: Yes. Actually speaking, this patch is almost copy from VersionChanged directive. See here: https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/other.py#L216-L221 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:01:26 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 07:01:26 +0000 Subject: [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475650886.24.0.512613101867.issue28331@psf.upfronthosting.co.za> Berker Peksag added the comment: I couldn't find any dummy HTML in the Sphinx codebase. Wouldn't something like work without a dummy HTML? from sphinx.locale import versionlabels, l_ versionlabels['cpythonimpldetail'] = l_('CPython implementation detail') Then use it in ImplementationDetail.run() method like https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/other.py#L204 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:03:17 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 07:03:17 +0000 Subject: [issue28329] Add support for customizing scheduler's timefunc and delayfunc using subclassing In-Reply-To: <1475508400.02.0.394772928057.issue28329@psf.upfronthosting.co.za> Message-ID: <1475650997.77.0.369069244876.issue28329@psf.upfronthosting.co.za> Jaysinh shukla added the comment: Hey Raymond, Since you rejected the issue, I would like to mention two points. 1. I believe Threading does have the similar interface. https://docs.python.org/3/library/threading.html where `Thread.target` and `Tread.run()` behaves same. 2. If possible, Can I propose a patch to remove that comment so that it doesn't create any confusions like this in future? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:11:58 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 07:11:58 +0000 Subject: [issue17188] Document 'from None' in raise statement doc. In-Reply-To: <1360631999.8.0.76627095073.issue17188@psf.upfronthosting.co.za> Message-ID: <1475651518.11.0.212315899784.issue17188@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: reuploaded thomir's patch issue17188_3.4.patch as is. I take no credit for this. ---------- Added file: http://bugs.python.org/file44967/issue17188_by_thomir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:14:34 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 05 Oct 2016 07:14:34 +0000 Subject: [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475651674.76.0.0638184058689.issue28331@psf.upfronthosting.co.za> INADA Naoki added the comment: Ah, I misunderstood your comment is about Sphinx's internal DOM. Sphinx has own pot and po files. In case of custom extension, `sphinx-build -b gettext` doesn't extract messages from Python code. That's why I used dummy html template. Another way is adding custom make target, which runs `sphinx-build -b gettext` and custom command to generate another pot from pyspecific extension. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:20:22 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Oct 2016 07:20:22 +0000 Subject: [issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel >= 3.10 In-Reply-To: <1396430238.51.0.283909097168.issue21131@psf.upfronthosting.co.za> Message-ID: <1475652022.71.0.104757700031.issue21131@psf.upfronthosting.co.za> STINNER Victor added the comment: > We're running into this building python 3.4.3 on EL6 ppc64. The os kernel is 4.7.2-201.fc24.ppc64, but the EL6 chroot kernel-headers are 2.6.32-642.4.2.el6. Any progress here? Sorry, but if I'm unable to reproduce the issue, I cannot make progress on analyzing the bug. I would need an remote access (SSH) to a computer where the bug can be reproduced. I also would like to know if the issue can be reproduced in C. faulthandler depends a lot how signals and threads are implemented. I'm not completely suprised to see bugs on some specific platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:34:03 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Oct 2016 07:34:03 +0000 Subject: [issue28356] Windows: os.rename different in python 2.7.12 and python 3.5.2 In-Reply-To: <1475594795.23.0.632168801619.issue28356@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > In scanning over issue 8828, I see no discussion of the consequences of not using MOVEFILE_COPY_ALLOWED in Antoine's patch, so it appears that this behavior change was unintentional. Depending on your point of view, it *can* be seen as an enhancement. See the documentation of MOVEFILE_COPY_ALLOWED: "If the file is successfully copied to a different volume and the original file is unable to be deleted, the function succeeds leaving the source file intact." This behaviour can be seen as a source of bug. It can be acceptable if if is expected. Since shutil.move() already implements the copy+delete fallback, I suggest to *not* change os.rename() but *document* the behaviour change: * os.rename() can fail if source and destination are on two different file systems * Use shutil.move() to support move to a different directory https://docs.python.org/dev/library/shutil.html#shutil.move already explains well the behaviour when two different filesystems are used: "... os.rename() is used. Otherwise, src is copied to dst using copy_function and then remove ..." I also suggest to mention in shutil.move() doc that the source can be left undeleted if delete fails for some reason when copy+delete is used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:39:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Oct 2016 07:39:21 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1475653161.41.0.107657603419.issue20491@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The code of the textwrap module was changed since publishing the last patch. Proposed patch resolves conflicts and addresses Eric's comments. Maybe add breaking Unicode spaces (OGHAM SPACE MARK, EN QUAD, etc) to _whitespace? I think in future we should implement the Unicode line breaking algorithm [1]. [1] http://www.unicode.org/reports/tr14/ ---------- Added file: http://bugs.python.org/file44968/honor-non-breaking-spaces2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:50:38 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 05 Oct 2016 07:50:38 +0000 Subject: [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475653838.72.0.0447088866808.issue28331@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: http://bugs.python.org/file44969/impl-detail2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 04:05:05 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Oct 2016 08:05:05 +0000 Subject: [issue24098] Multiple use after frees in obj2ast_* methods In-Reply-To: <1430489429.65.0.587999729774.issue24098@psf.upfronthosting.co.za> Message-ID: <1475654705.91.0.140840184992.issue24098@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 05:26:45 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 09:26:45 +0000 Subject: [issue28230] tarfile does not support pathlib Message-ID: <1475659605.94.0.894853111594.issue28230@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 05:27:19 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 09:27:19 +0000 Subject: [issue28231] zipfile does not support pathlib In-Reply-To: <1474445503.11.0.219964117103.issue28231@psf.upfronthosting.co.za> Message-ID: <1475659639.43.0.909684727113.issue28231@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: +Library (Lib) nosy: +berker.peksag versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 05:39:23 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 09:39:23 +0000 Subject: [issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X In-Reply-To: <1324267597.43.0.334578978638.issue13631@psf.upfronthosting.co.za> Message-ID: <1475660363.08.0.448519748895.issue13631@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 05:43:55 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 09:43:55 +0000 Subject: [issue17345] Portable and extended type specifiers for array module In-Reply-To: <1362385577.82.0.862277690656.issue17345@psf.upfronthosting.co.za> Message-ID: <1475660635.34.0.00211488240546.issue17345@psf.upfronthosting.co.za> Berker Peksag added the comment: This looks like a duplicate of issue 9066. ---------- nosy: +berker.peksag resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Standard type codes for array.array, same as struct _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 05:53:17 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 09:53:17 +0000 Subject: [issue12294] multiprocessing.Pool: Need a way to find out if work are finished. In-Reply-To: <1307627992.49.0.467043384727.issue12294@psf.upfronthosting.co.za> Message-ID: <1475661197.31.0.861165994316.issue12294@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: -easy nosy: +davin versions: +Python 3.7 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 06:06:39 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 10:06:39 +0000 Subject: [issue12706] timeout sentinel in ftplib and poplib documentation In-Reply-To: <1312705981.24.0.601234287082.issue12706@psf.upfronthosting.co.za> Message-ID: <1475661999.37.0.400284539476.issue12706@psf.upfronthosting.co.za> Berker Peksag added the comment: Documentation changes look good to me. However, I'd prefer using socket._GLOBAL_DEFAULT_TIMEOUT in the timeout parameter of FTP.connect(). ---------- keywords: +easy nosy: +berker.peksag versions: +Python 3.5, Python 3.6, Python 3.7 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 06:26:42 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 10:26:42 +0000 Subject: [issue12274] "Print window" menu on IDLE aborts whole application In-Reply-To: <1307427367.68.0.910605365077.issue12274@psf.upfronthosting.co.za> Message-ID: <1475663202.0.0.942885695159.issue12274@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 06:35:39 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 10:35:39 +0000 Subject: [issue21626] Add options width and compact to pickle cli In-Reply-To: <1401631835.62.0.606792689422.issue21626@psf.upfronthosting.co.za> Message-ID: <1475663739.54.0.789019259638.issue21626@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, but the pickle CLI is not part of the public API and I don't think these new options are going to be useful for general use. Closing this as 'rejected'. Please re-open if Serhiy (or others) would find this a reasonable improvement. ---------- nosy: +berker.peksag, serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 06:36:19 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 10:36:19 +0000 Subject: [issue28230] tarfile does not support pathlib Message-ID: <1475663779.0.0.320541320877.issue28230@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 06:49:35 2016 From: report at bugs.python.org (Samson Lee) Date: Wed, 05 Oct 2016 10:49:35 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1475664575.96.0.159442727225.issue28353@psf.upfronthosting.co.za> Samson Lee added the comment: This is definitely a bug because there is no way an unhandled exception like this is acceptable behaviour. The behaviour is that the fwalk iteration will stop and there is no way to recover / continue. Also fwalk takes an onerror callback function that won't be called with this error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 07:15:11 2016 From: report at bugs.python.org (Peter Lovett) Date: Wed, 05 Oct 2016 11:15:11 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475666111.85.0.566285858296.issue10716@psf.upfronthosting.co.za> Peter Lovett added the comment: I see that pydoc still useful, and have 6 points I'd like to work on with pydoc. Is this too much for one issue? Should I break bits out to another issue(s)? Although it would make sense to do it all in one go. ----------------------------------------------- Pydoc is a good way to get users (especially beginners) used to writing docstrings, and leads nicely into doctest and similar tools. Other languages, such as Perl and Java have similar tools that generate text or html documentation from code. Some have used pydoc classes for their own uses. It is not intended that pydoc would compete with Sphinx. Sphinx is not core. pydoc changes ----------------------------------------------- 1. Fix .\ (or ./) problem Currently, documenting a single module requires the prefix of .\ TODO: Change to check: If it's a directory, document all .py files in that directory. If it's a Python file, document that. If it's one of the special keywords, display that documentation. Otherwise, display an error. Currently: user at server:/mnt/c/course$ pydoc -w helloFunc.py no Python documentation found for 'helloFunc.py' user at server:/mnt/c/course$ pydoc -w ./helloFunc.py wrote helloFunc.html TODO: Update the help strings. 2. Fix command line run error message Currently, passing an argument (that is not a keyword and is not a filename that exists) displays an error message that isn't relevant to this context: C:\course> py -3 "C:\Program Files (x86)\Python35-32\Lib\pydoc.py" notthere.py No Python documentation found for 'notthere.py'. Use help() to get the interactive help utility. Use help(str) for help on the str class. This changed from Python2: C:\course> py -2 "C:\Python27\Lib\pydoc.py" notthere.py No Python documentation found for 'notthere.py'. TODO: Remove the last two lines of the help output from Py3 pydoc when run from the command line. 3. Add "-h" command-line argument. TODO: Add "-h This help summary" to the output of pydoc -h All the existing options are single letter, so make it just -h Continue the current behaviour of "no command arguments or switches" displays help. 4. TODO: Unknown command line option should give an error. Currently, pydoc with an unknown command line option doesn't give an error, but just displays the standard help: C:\course> py -3 "C:\Program Files (x86)\Python35-32\Lib\pydoc.py" -j pydoc - the Python documentation tool pydoc ... Show text documentation on something. may be the name of a Python keyword, topic, function, module, or package, or a dotte ... This can add confusion. It would be more useful to display a specific error, and refer users to more help, like ls does: user at server:~$ ls -j ls: invalid option -- 'j' Try 'ls --help' for more information. 5. TODO: Improve HTML output Oh yes. There's a few good contributions on this, but I think Fr?d?ric Jolliton's summary is the most succinct. 6. Additional command line argument To allow certain command line arguments. Sidenote: Both pod (http://perldoc.perl.org/pod2html.html) and javadoc (http://download.java.net/jdk7u2/docs/technotes/tools/solaris/javadoc.html) have many command line arguments. I'm not proposing for significant changes, but I think the below options would add significantly to the usability, and are modeled on pod and javadoc. It is not intended that pydoc would compete with Sphinx. TODO: + --help Same as -h for help + --css= Override the built-in stylesheet + --output or -d or --dir Output directory name + --verbose More verbose output ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 07:53:48 2016 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 05 Oct 2016 11:53:48 +0000 Subject: [issue12294] multiprocessing.Pool: Need a way to find out if work are finished. In-Reply-To: <1307627992.49.0.467043384727.issue12294@psf.upfronthosting.co.za> Message-ID: <1475668428.22.0.422209402374.issue12294@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- nosy: -petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:04:46 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:04:46 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669086.57.0.150350414239.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44970/all_rst_patch_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:05:54 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:05:54 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669154.64.0.922891746569.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44971/v_2_7_conflict_files.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:07:56 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:07:56 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669276.01.0.600098241634.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44951/Doc_library_ctypes_rst_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:08:02 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:08:02 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669282.63.0.308946801258.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44952/Doc_library_ctypes_rst_version_2_7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:08:07 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:08:07 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669287.69.0.550979665125.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44953/Doc_library_ctypes_rst_version_3_5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:08:12 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:08:12 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669292.38.0.0808962100984.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44954/Doc_library_ctypes_rst_version_3_6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:08:48 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:08:48 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669328.89.0.859791128786.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44955/other_rst_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:08:54 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:08:54 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669334.23.0.714435924913.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44956/other_rst_version_2_7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:09:01 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:09:01 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669341.88.0.655141699103.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44957/other_rst_version_3_5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:09:06 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:09:06 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669346.89.0.83219767484.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44958/other_rst_version_3_6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:17:19 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:17:19 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669839.41.0.097757884942.issue28315@psf.upfronthosting.co.za> Jaysinh shukla added the comment: Hello Terry, According to your instructions I had uploaded two patch files. The file named `all_rst_patch_default.diff` is applicable for version `default`, `3.5`, `3.6` and for most files of `2.7`. The file named `v_2_7_conflict_files.diff` is a correct patch of all rejected files. I have unlinked previous patch files. Please guide me if I had done mistake at any stage. Many Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:59:28 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Oct 2016 12:59:28 +0000 Subject: [issue28362] Deprecation warning doesn't stand out enough In-Reply-To: <1475646970.65.0.933224265007.issue28362@psf.upfronthosting.co.za> Message-ID: <1475672368.13.0.167233151155.issue28362@psf.upfronthosting.co.za> R. David Murray added the comment: Agreed. The removal of the red was a conscious choice. As I remember it, that choice got reflected into the Sphinx defaults, rather than the other way around :) ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 09:13:20 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 05 Oct 2016 13:13:20 +0000 Subject: [issue28259] Ctypes bug windows In-Reply-To: <1474647946.24.0.533944480109.issue28259@psf.upfronthosting.co.za> Message-ID: <1475673200.32.0.417710818684.issue28259@psf.upfronthosting.co.za> Steve Dower added the comment: Ultimately we need something to put in the test suite to make sure it's fixed and doesn't regress in the future. It's asking a lot of our volunteers to investigate a bug on very little information. ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 09:18:43 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Oct 2016 13:18:43 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475673523.59.0.299549636474.issue10716@psf.upfronthosting.co.za> R. David Murray added the comment: You sound like you think we want to get rid of pydoc, which is certainly not true :). As I understand it it is only the *html* output of pydoc that we are considering deprecating. Yes, you should open separate issues for your proposed changes. 1 and 2 should be separate issues, 3 and 4 should be combined into a proposal to convert pydoc to using argparse. 5 you can skip, and 6 I don't think will be accepted, although you are welcome to propose it along with some motivating use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 09:19:07 2016 From: report at bugs.python.org (Michael Felt) Date: Wed, 05 Oct 2016 13:19:07 +0000 Subject: [issue28363] -D_LARGE_FILES not exported to modules (for AIX) Message-ID: <1475673547.47.0.62626707078.issue28363@psf.upfronthosting.co.za> New submission from Michael Felt: I was asked to assist with some problems with a "pip install numpy" and - maybe I am barking up the wrong tree. However, in the thread https://github.com/numpy/numpy/issues/8118 in short, if "python" is responsible for providing the -D flags "extensions" receive during the pip build process - the -D_LARGE_FILES also needs to be provided for AIX. DETAILS... you can see the complete command "pip build|install" reports as creating an error at the URL above - here is the critical part. xlc_r -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/buildaix/includes -DNDEBUG -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 ... The key error is several of this form: "/usr/include/unistd.h", line 921.25: 1506-343 (S) Redeclaration of fclear64 differs from previous declaration on line 918 of "/usr/include/unistd.h". "/usr/include/unistd.h", line 921.25: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long". "/usr/include/unistd.h", line 921.25: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long". "/usr/include/unistd.h", line 922.25: 1506-343 (S) Redeclaration of fsync_range64 differs from previous declaration on line 919 of "/usr/include/unistd.h". "/usr/include/unistd.h", line 922.25: 1506-377 (I) The type "long long" of parameter 3 differs from the previous type "long". with the include file: Excerpt: +914 #ifdef _LARGE_FILES +915 #define fclear fclear64 +916 #define fsync_range fsync_range64 +917 #endif +918 extern off_t fclear(int, off_t); +919 extern int fsync_range(int, int, off_t, off_t); +920 #ifdef _LARGE_FILE_API +921 extern off64_t fclear64(int, off64_t); +922 extern int fsync_range64(int, int, off64_t, off64_t); +923 #endif After adding # export CFLAGS="-D_LARGE_FILES" pip install completes without any error messages (the command becomes): xlc_r -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/buildaix/includes -DNDEBUG -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 ... ---------- components: Extension Modules messages: 278124 nosy: Michael.Felt priority: normal severity: normal status: open title: -D_LARGE_FILES not exported to modules (for AIX) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 09:38:13 2016 From: report at bugs.python.org (Dima Tisnek) Date: Wed, 05 Oct 2016 13:38:13 +0000 Subject: [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1475674693.83.0.746497619501.issue24632@psf.upfronthosting.co.za> Dima Tisnek added the comment: +1, I too would like to see this documented ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 09:43:16 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Oct 2016 13:43:16 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475674996.4.0.866530397464.issue10716@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I disagree with deprecating HTML output. Pydoc has builtin HTTP server, it provides the documentation with hyperlinks. It would be nice if IDLE use this feature for displaying interactive help. I think we should enhance HTML output not just by making it looking better, but by adding more interactivity. For example add the ability to collapse classes, methods, etc, add more hyperlinks. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 10:07:19 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Oct 2016 14:07:19 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475676438.99.0.682059039292.issue10716@psf.upfronthosting.co.za> R. David Murray added the comment: That sounds like a reasonable argument to me. To clarify something in my last post: 5 should be skipped in terms of opening new issues because it is already covered by this issue. If Terry would like to see pydoc enhanced to support idle, then I think that would decide the issue. ---------- assignee: eric.araujo -> nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 10:33:50 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 14:33:50 +0000 Subject: [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1475678030.17.0.148945619936.issue24632@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 10:51:34 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Wed, 05 Oct 2016 14:51:34 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1475679094.55.0.0209833362288.issue25720@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: I tried to build curses module on Cygwin (Vista x86) using #25720 patch. And it has been succeeded. When test_curses ran without skip condition, it was same result as msg278060 (#28190). I found out build success reasons for cases of applying patch: #25720 -- implementation of WINDOW is opaque (*but* WINDOW_HAS_FLAGS is defined at Include/py_curses.h:61 ). However, curses module build went well to cover the _flags field from source code by is_pad. #14598 -- implementation of WINDOW is not opaque (WINDOWS_HAS_FLAGS is defined at configure script). Therefore, curses module build went well because WINDOW has the _flags field. #28190 -- implementation of WINDOW is opaque (WINDOW_HAS_FLAGS isn't defined: py_curses.h has been cleaned by patch). Hence, curses module build went well to remove the _flags field from source code at preprocessing. All case tests on Cygwin have failed at unget_wch. ---------- nosy: +masamoto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 10:53:26 2016 From: report at bugs.python.org (Mateusz Klatt) Date: Wed, 05 Oct 2016 14:53:26 +0000 Subject: [issue28364] Windows - Popen (subprocess.py) does not call _handle.Close() at all Message-ID: <1475679206.56.0.813487481998.issue28364@psf.upfronthosting.co.za> New submission from Mateusz Klatt: _subprocess.TerminateProcess(self._handle, 1) is not enough, on windows need to call self._handle.Close() after that self._handle.Close() should be also called in __del__ - for the process es that ware not killed bu user, but terminated by themselves. To reproduce... run popen in loop and observe file descriptors usage (SysInternals... handle -s -p ) ---------- components: Library (Lib) messages: 278129 nosy: Mateusz Klatt priority: normal severity: normal status: open title: Windows - Popen (subprocess.py) does not call _handle.Close() at all versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 11:18:31 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Oct 2016 15:18:31 +0000 Subject: [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1475680711.29.0.236377599263.issue24632@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, I never found a good place to document this, hence the relatively sparse references in the "using" docs. The most complete official docs for these features are actually in runpy: * https://docs.python.org/3/library/runpy.html#runpy.run_module * https://docs.python.org/3/library/runpy.html#runpy.run_path run_module is a thin wrapper around the same core code that actually implements the -m switch run_path is a Python level reimplementation of the __main__ execution logic There's also http://www.curiousefficiency.org/posts/2011/03/what-is-python-script.html on my blog and the explanation of the options that need to be supported in PEP 432: https://www.python.org/dev/peps/pep-0432/#preparing-the-main-module A lot of the confusion stems from the fact that directory & zipfile execution was added without a PEP back in 2.6 (it was just a normal tracker issue) and we forgot to add it to the What's New document. We hoped the inclusion of the zipapp module in Python 3.5 via PEP 441 might help resolve that lack of awareness, but it doesn't seem to have had much impact. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 11:25:52 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Oct 2016 15:25:52 +0000 Subject: [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1475681152.17.0.451212925956.issue24632@psf.upfronthosting.co.za> Nick Coghlan added the comment: In the same vein of "I never worked out a good offical home for it", a couple of the "Traps for the Unwary" I describe for Python's import system are closely related to __main__ module execution and the impact that has on sys.path and sys.modules: * http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-double-import-trap * http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#executing-the-main-module-twice ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 11:35:57 2016 From: report at bugs.python.org (A.J.) Date: Wed, 05 Oct 2016 15:35:57 +0000 Subject: [issue28365] 3.5.2 syntax issue Message-ID: <1475681757.64.0.722295974246.issue28365@psf.upfronthosting.co.za> New submission from A.J.: whenever I go to run a program no matter what I do it always says syntax error and highlights the 5 in the 3.5.2 version banner ---------- components: Windows messages: 278132 nosy: paul.moore, radialbeast, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: 3.5.2 syntax issue versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 11:39:18 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Oct 2016 15:39:18 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1475681958.06.0.432815781013.issue28240@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, cfbolz just modified timeit in PyPy to display average (mean) and standard deviation: https://bitbucket.org/pypy/pypy/commits/fb6bb835369e Moreover, PyPy timeit now displays the following warning: --- WARNING: timeit is a very unreliable tool. use perf or something else for real measurements --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 11:45:20 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Oct 2016 15:45:20 +0000 Subject: [issue28365] 3.5.2 syntax issue In-Reply-To: <1475681757.64.0.722295974246.issue28365@psf.upfronthosting.co.za> Message-ID: <1475682320.47.0.309644585072.issue28365@psf.upfronthosting.co.za> Zachary Ware added the comment: Hi A.J., What you're describing isn't really possible, so you're going to need to provide some more detail. Please copy and paste your Command Prompt session into a message here to show us what's going on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 11:47:40 2016 From: report at bugs.python.org (Tim Golden) Date: Wed, 05 Oct 2016 15:47:40 +0000 Subject: [issue28365] 3.5.2 syntax issue In-Reply-To: <1475682320.47.0.309644585072.issue28365@psf.upfronthosting.co.za> Message-ID: <7823b720-577d-8f32-d1a4-e2b0680cad5f@timgolden.me.uk> Tim Golden added the comment: This sometimes happens when someone copies from a book or a tutorial and includes as though code the banner header which is only meant to illustrate the context. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 11:56:10 2016 From: report at bugs.python.org (A.J.) Date: Wed, 05 Oct 2016 15:56:10 +0000 Subject: [issue28366] Syntax issue Message-ID: <1475682970.9.0.497885423929.issue28366@psf.upfronthosting.co.za> Changes by A.J. : ---------- files: image1.jpeg, image2.jpeg, unnamed, unnamed nosy: radialbeast priority: normal severity: normal status: open title: Syntax issue Added file: http://bugs.python.org/file44972/image1.jpeg Added file: http://bugs.python.org/file44973/unnamed Added file: http://bugs.python.org/file44974/image2.jpeg Added file: http://bugs.python.org/file44975/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 12:23:31 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 05 Oct 2016 16:23:31 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475684611.78.0.550164542674.issue2897@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a proposed doc patch for Python 3.5+. For 2.7 we should probably just add a versionchanged note explaining "restricted mode" has been deprecated in Python 2.3. ---------- Added file: http://bugs.python.org/file44976/issue2897-docs-3x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 13:04:09 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 05 Oct 2016 17:04:09 +0000 Subject: [issue28366] Syntax issue Message-ID: <1475687049.35.0.00988830109483.issue28366@psf.upfronthosting.co.za> New submission from Steven D'Aprano: Did you take a picture of the screen with your iPhone? Why didn't you take a screenshot? Or better still, since this is a text-based medium not a graphics error, copy and paste the text involved? That's easier for people to work with, including those who are blind or visually impaired. Your images are fuzzy, clipped, and almost impossible to make out what is going on. The closest I can determine is that you are running Python successfully, because I can see what looks like a call to: print('example of error') working successful: the string is printed, as expected, and no SyntaxError occurs. That's image1. image2 is even harder to make out, some of the text is so out of focus I cannot read it, but again it shows the same line of code successfully executed, but a mystery dialog box that says "syntax error". To start with, please explain how you are running Python. Are you running it in the basic Windows terminal? What command did you give to run Python? Or are you running IDLE? Did you run it from the Start Menu? What *exact* sequence of commands did you give to run Python? Try to answer using words, not pictures, and ESPECIALLY not out-of-focus photos taken with your phone. And don't start a new ticket, either respond to this one or #28365. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 13:05:16 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 05 Oct 2016 17:05:16 +0000 Subject: [issue28365] 3.5.2 syntax issue In-Reply-To: <1475681757.64.0.722295974246.issue28365@psf.upfronthosting.co.za> Message-ID: <1475687116.95.0.832766974756.issue28365@psf.upfronthosting.co.za> Steven D'Aprano added the comment: See #28366 ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 13:05:51 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 05 Oct 2016 17:05:51 +0000 Subject: [issue28366] Syntax issue In-Reply-To: <1475687049.35.0.00988830109483.issue28366@psf.upfronthosting.co.za> Message-ID: <1475687151.46.0.924735137278.issue28366@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 13:09:23 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Oct 2016 17:09:23 +0000 Subject: [issue28366] Syntax issue In-Reply-To: <1475687049.35.0.00988830109483.issue28366@psf.upfronthosting.co.za> Message-ID: <1475687363.18.0.0456531148168.issue28366@psf.upfronthosting.co.za> Zachary Ware added the comment: Let's consolidate this to #28365. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> 3.5.2 syntax issue _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 13:18:01 2016 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 05 Oct 2016 17:18:01 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1475687881.14.0.86553310672.issue25720@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Mark, do you have relation to this? Sorry, no. Whatever ncurses knowledge I may once have had has long since vanished. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 13:25:59 2016 From: report at bugs.python.org (Paul Moore) Date: Wed, 05 Oct 2016 17:25:59 +0000 Subject: [issue28365] 3.5.2 syntax issue In-Reply-To: <1475681757.64.0.722295974246.issue28365@psf.upfronthosting.co.za> Message-ID: <1475688359.34.0.628453055682.issue28365@psf.upfronthosting.co.za> Paul Moore added the comment: I can recreate this (based on the screenshots from #28366). To reproduce, open IDLE. You get the console banner and prompt. Save that file using File-Save. The close IDLE. Reopen it, do File-Open to open your saved console session, then use the "Run" menu to run it. (You need to close IDLE, so it "forgets" the .py file came from a console session.) That's incorrect usage, of course (not "of course" to the OP - that's the real point here) as the text of a console session isn't a valid Python file, and doesn't syntax check. The error is saying precisely that - what is in the file isn't valid Python. So in one sense, this is simply user error. But I wonder, is there something about how IDLE presents things that could be improved? Either in the documentation or in the UI? I'm not exactly sure what the point of "file-save" in a console window is, and certainly it would be better to save the transcript as text so it couldn't be inadvertently be read back in as a Python module. I'm not an IDLE user, though, so I don't really have the background to know the best solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 13:47:54 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 05 Oct 2016 17:47:54 +0000 Subject: [issue28365] 3.5.2 syntax issue In-Reply-To: <1475681757.64.0.722295974246.issue28365@psf.upfronthosting.co.za> Message-ID: <1475689674.0.0.356711260638.issue28365@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 13:51:21 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Oct 2016 17:51:21 +0000 Subject: [issue28365] idle forgets that saved console session is not a python file after restart In-Reply-To: <1475681757.64.0.722295974246.issue28365@psf.upfronthosting.co.za> Message-ID: <1475689881.39.0.14708919216.issue28365@psf.upfronthosting.co.za> R. David Murray added the comment: I'm retitling the issue. The new title doesn't necessary represent the "bug" that needs to be fixed, but it does seem to represent the *apparent* error. ---------- nosy: +r.david.murray title: 3.5.2 syntax issue -> idle forgets that saved console session is not a python file after restart _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 14:13:11 2016 From: report at bugs.python.org (Aristotel) Date: Wed, 05 Oct 2016 18:13:11 +0000 Subject: [issue28259] Ctypes bug windows In-Reply-To: <1474647946.24.0.533944480109.issue28259@psf.upfronthosting.co.za> Message-ID: <1475691191.89.0.781929197483.issue28259@psf.upfronthosting.co.za> Aristotel added the comment: I will write (as short as possible) example. Hope to finish it in ~ 1 week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 14:40:30 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 05 Oct 2016 18:40:30 +0000 Subject: [issue28364] Windows - Popen (subprocess.py) does not call _handle.Close() at all In-Reply-To: <1475679206.56.0.813487481998.issue28364@psf.upfronthosting.co.za> Message-ID: <1475692830.3.0.465728273544.issue28364@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 14:40:45 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Oct 2016 18:40:45 +0000 Subject: [issue28365] idle forgets that saved console session is not a python file after restart In-Reply-To: <1475681757.64.0.722295974246.issue28365@psf.upfronthosting.co.za> Message-ID: <1475692845.22.0.72785827712.issue28365@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- assignee: -> terry.reedy components: +IDLE -Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 14:52:24 2016 From: report at bugs.python.org (Michael Felt) Date: Wed, 05 Oct 2016 18:52:24 +0000 Subject: [issue28363] -D_LARGE_FILES not exported to modules (for AIX) In-Reply-To: <1475673547.47.0.62626707078.issue28363@psf.upfronthosting.co.za> Message-ID: <1475693544.56.0.189694643597.issue28363@psf.upfronthosting.co.za> Michael Felt added the comment: Now they notice the defines are coming from their project. closing... ---------- resolution: -> third party status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 15:22:47 2016 From: report at bugs.python.org (Andrey Smirnov) Date: Wed, 05 Oct 2016 19:22:47 +0000 Subject: [issue28367] Add more standard baud rate constants to "termios" Message-ID: <1475695367.16.0.283640170005.issue28367@psf.upfronthosting.co.za> New submission from Andrey Smirnov: Termios magic constants for the following baud rates: - B500000 - B576000 - B921600 - B1000000 - B1152000 - B1500000 - B2000000 - B2500000 - B3000000 - B3500000 - B4000000 in Linux are different between various architectures (i. e. PowerPC and Alpha are different from the rest of them). And because they are defined as per-processor symbols the only way to access them is if they are built-in as a part of CPython during its compilation. Attached is the patch implementing that ---------- components: Library (Lib) files: add-more-termios-baudrates.patch keywords: patch messages: 278145 nosy: Andrey Smirnov, twouters priority: normal severity: normal status: open title: Add more standard baud rate constants to "termios" type: enhancement Added file: http://bugs.python.org/file44977/add-more-termios-baudrates.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 15:51:06 2016 From: report at bugs.python.org (Eryk Sun) Date: Wed, 05 Oct 2016 19:51:06 +0000 Subject: [issue28364] Windows - Popen (subprocess.py) does not call _handle.Close() at all In-Reply-To: <1475679206.56.0.813487481998.issue28364@psf.upfronthosting.co.za> Message-ID: <1475697066.38.0.955171941714.issue28364@psf.upfronthosting.co.za> Eryk Sun added the comment: In 2.7, the _handle attribute is a _subprocess_handle object, which automatically calls CloseHandle when deallocated. For example: >>> p = subprocess.Popen('python -c "import time; time.sleep(120)"') CreateProcess returns both the process handle and the thread handle. Python doesn't use the thread handle, so it explicitly closes it by calling ht.Close(): Breakpoint 0 hit KERNELBASE!CloseHandle: 00007ffb`a32fdf70 4883ec28 sub rsp,28h 0:000> kc 5 Call Site KERNELBASE!CloseHandle python27!sp_handle_close python27!PyCFunction_Call python27!call_function python27!PyEval_EvalFrameEx 0:000> g (IMO, it should skip this step if creationflags contains CREATE_SUSPENDED. The thread handle makes it simpler to call ResumeThread.) On the other hand, the process handle is deallocated implicitly when it's no longer referenced: >>> type(p._handle) >>> hex(int(p._handle)) '0x164L' >>> p.terminate() >>> del p Breakpoint 0 hit KERNELBASE!CloseHandle: 00007ffb`a32fdf70 4883ec28 sub rsp,28h 0:000> kc 5 Call Site KERNELBASE!CloseHandle python27!sp_handle_dealloc python27!dict_dealloc python27!subtype_dealloc python27!PyDict_DelItem 0:000> r rcx rcx=0000000000000164 If the process handles aren't being closed in your case, then you're probably keeping a reference to the Popen instances. P.S. A Windows handle is not a "file descriptor". Kernel handles are user-mode references to kernel objects. They aren't "files" unless the object happens to be a File object. A process handle references a kernel Process object. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 16:08:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Oct 2016 20:08:24 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475698104.32.0.118367623045.issue27998@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka stage: needs patch -> patch review title: Remove support of bytes paths in os.scandir() -> Bytes paths now are supported in os.scandir() on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 16:19:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Oct 2016 20:19:18 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <20161005201855.17369.2647.246490E0@psf.io> Roundup Robot added the comment: New changeset 7c36e6fd0232 by Serhiy Storchaka in branch '3.6': Issue #27998: Removed workarounds for supporting bytes paths on Windows in https://hg.python.org/cpython/rev/7c36e6fd0232 New changeset bcee710c42fe by Serhiy Storchaka in branch 'default': Issue #27998: Removed workarounds for supporting bytes paths on Windows in https://hg.python.org/cpython/rev/bcee710c42fe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 16:53:35 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 20:53:35 +0000 Subject: [issue28368] Refuse monitoring processes if the child watcher has no loop attached Message-ID: <1475700815.84.0.114441761384.issue28368@psf.upfronthosting.co.za> New submission from Yury Selivanov: Proxy issue for https://github.com/python/asyncio/pull/391 ---------- assignee: yselivanov components: asyncio messages: 278148 nosy: gvanrossum, yselivanov priority: normal severity: normal stage: resolved status: open title: Refuse monitoring processes if the child watcher has no loop attached type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 16:53:45 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 20:53:45 +0000 Subject: [issue28368] Refuse monitoring processes if the child watcher has no loop attached In-Reply-To: <1475700815.84.0.114441761384.issue28368@psf.upfronthosting.co.za> Message-ID: <1475700825.19.0.359471445139.issue28368@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 17:02:35 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Oct 2016 21:02:35 +0000 Subject: [issue28368] Refuse monitoring processes if the child watcher has no loop attached In-Reply-To: <1475700815.84.0.114441761384.issue28368@psf.upfronthosting.co.za> Message-ID: <20161005210212.20553.615.49F23C82@psf.io> Roundup Robot added the comment: New changeset 2110dcef5892 by Yury Selivanov in branch '3.5': Issue #28368: Refuse monitoring processes if the child watcher has no loop attached. https://hg.python.org/cpython/rev/2110dcef5892 New changeset fb6b60955d62 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #28368) https://hg.python.org/cpython/rev/fb6b60955d62 New changeset 83cc47533e4e by Yury Selivanov in branch 'default': Merge 3.6 (issue #28368) https://hg.python.org/cpython/rev/83cc47533e4e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 17:06:15 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Oct 2016 21:06:15 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475701575.36.0.272219619848.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests are passed on Windows. Now we need to document that bytes paths are supported in os.scandir() on Windows since 3.6. ---------- assignee: serhiy.storchaka -> docs at python components: +Documentation -Extension Modules nosy: +docs at python stage: patch review -> needs patch versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 17:20:06 2016 From: report at bugs.python.org (Michael Felt) Date: Wed, 05 Oct 2016 21:20:06 +0000 Subject: [issue28361] BETA report: Python3.6 names pip pip3.6 (and why is the other name pip3) In-Reply-To: <1475608303.21.0.247746298219.issue28361@psf.upfronthosting.co.za> Message-ID: <1fdc5881-a734-6562-ca90-ee2dba37fa6c@gmail.com> Michael Felt added the comment: On 04-Oct-16 21:11, Zachary Ware wrote: > Zachary Ware added the comment: > > Pip is a third party project, so if you'd like to pursue this please open an issue on the pip issue tracker at https://github.com/pypa/pip/issues. I stand corrected. > Anyway, pip installs links named the way it does so that you can be (more) sure that you're invoking the correct pip. 'pip3.6' will invoke the pip installed with python3.6, 'pip3' will (or at least should) invoke the pip installed with whatever 'python3' points to, and 'pip' will point to whatever 'python' points to. When installed in a Python 3 venv, pip also installs a 'pip' link to 'pip3', just as there's also a 'python' link to 'python3'. In 2.7, pip is also installed as 'pip2.7' and 'pip2' along with 'pip'; again mirroring the version tags on the interpreter links. So, I guess I should rename my python-3.X packages python3-3.X so they can install side.by.side rather than only one or the other. Good point. > > ---------- > nosy: +zach.ware > resolution: -> third party > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- nosy: +aixtools at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 17:47:34 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 21:47:34 +0000 Subject: [issue28369] Raise RuntimeError when transport's FD is used with add_reader etc Message-ID: <1475704054.39.0.284138754743.issue28369@psf.upfronthosting.co.za> New submission from Yury Selivanov: Proxy issue for https://github.com/python/asyncio/pull/420 ---------- assignee: yselivanov components: asyncio messages: 278152 nosy: gvanrossum, yselivanov priority: normal severity: normal stage: resolved status: open title: Raise RuntimeError when transport's FD is used with add_reader etc type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 17:47:42 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 21:47:42 +0000 Subject: [issue28369] Raise RuntimeError when transport's FD is used with add_reader etc In-Reply-To: <1475704054.39.0.284138754743.issue28369@psf.upfronthosting.co.za> Message-ID: <1475704062.29.0.0384281076015.issue28369@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 17:50:27 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Oct 2016 21:50:27 +0000 Subject: [issue28369] Raise RuntimeError when transport's FD is used with add_reader etc In-Reply-To: <1475704054.39.0.284138754743.issue28369@psf.upfronthosting.co.za> Message-ID: <20161005215023.15189.48639.E19B69C8@psf.io> Roundup Robot added the comment: New changeset 2b502f624753 by Yury Selivanov in branch '3.5': Issue #28369: Raise an error when transport's FD is used with add_reader https://hg.python.org/cpython/rev/2b502f624753 New changeset f3c1d8869dd5 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #28369) https://hg.python.org/cpython/rev/f3c1d8869dd5 New changeset 745e0ff513c2 by Yury Selivanov in branch 'default': Merge 3.6 (issue #28369) https://hg.python.org/cpython/rev/745e0ff513c2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 17:59:50 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 21:59:50 +0000 Subject: [issue28370] Speedup asyncio.StreamReader.readexactly Message-ID: <1475704790.2.0.121613727751.issue28370@psf.upfronthosting.co.za> New submission from Yury Selivanov: Proxy for https://github.com/python/asyncio/pull/395 ---------- assignee: yselivanov components: asyncio messages: 278154 nosy: gvanrossum, yselivanov priority: normal severity: normal stage: resolved status: open title: Speedup asyncio.StreamReader.readexactly type: performance versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 17:59:58 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 21:59:58 +0000 Subject: [issue28370] Speedup asyncio.StreamReader.readexactly In-Reply-To: <1475704790.2.0.121613727751.issue28370@psf.upfronthosting.co.za> Message-ID: <1475704798.14.0.949914823303.issue28370@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 18:15:47 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Oct 2016 22:15:47 +0000 Subject: [issue28370] Speedup asyncio.StreamReader.readexactly In-Reply-To: <1475704790.2.0.121613727751.issue28370@psf.upfronthosting.co.za> Message-ID: <20161005220453.17616.66245.4D968708@psf.io> Roundup Robot added the comment: New changeset b3ef922e6f26 by Yury Selivanov in branch '3.5': Issue #28370: Speedup asyncio.StreamReader.readexactly https://hg.python.org/cpython/rev/b3ef922e6f26 New changeset b76553de3a29 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #28370) https://hg.python.org/cpython/rev/b76553de3a29 New changeset 5913c2b1d80a by Yury Selivanov in branch 'default': Merge 3.6 (issue #28370) https://hg.python.org/cpython/rev/5913c2b1d80a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 18:26:04 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 22:26:04 +0000 Subject: [issue28371] Deprecate passing asyncio.Handles to run_in_executor Message-ID: <1475706364.89.0.846891709474.issue28371@psf.upfronthosting.co.za> New submission from Yury Selivanov: Proxy issue for https://github.com/python/asyncio/issues/334 ---------- assignee: yselivanov components: asyncio messages: 278156 nosy: gvanrossum, yselivanov priority: normal severity: normal stage: resolved status: open title: Deprecate passing asyncio.Handles to run_in_executor type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 18:26:09 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 22:26:09 +0000 Subject: [issue28371] Deprecate passing asyncio.Handles to run_in_executor In-Reply-To: <1475706364.89.0.846891709474.issue28371@psf.upfronthosting.co.za> Message-ID: <1475706369.49.0.658331148308.issue28371@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 18:29:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Oct 2016 22:29:41 +0000 Subject: [issue28371] Deprecate passing asyncio.Handles to run_in_executor In-Reply-To: <1475706364.89.0.846891709474.issue28371@psf.upfronthosting.co.za> Message-ID: <20161005222938.79813.70718.D4F5F59D@psf.io> Roundup Robot added the comment: New changeset c8e71ddf1db5 by Yury Selivanov in branch '3.5': Issue #28371: Deprecate passing asyncio.Handles to run_in_executor. https://hg.python.org/cpython/rev/c8e71ddf1db5 New changeset c0d84c091db0 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #28371) https://hg.python.org/cpython/rev/c0d84c091db0 New changeset 893f65369fea by Yury Selivanov in branch 'default': Merge 3.6 (issue #28371) https://hg.python.org/cpython/rev/893f65369fea ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 19:29:06 2016 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 05 Oct 2016 23:29:06 +0000 Subject: [issue27286] str object got multiple values for keyword argument In-Reply-To: <1465551431.42.0.267871198404.issue27286@psf.upfronthosting.co.za> Message-ID: <1475710146.31.0.673122095605.issue27286@psf.upfronthosting.co.za> ?ukasz Langa added the comment: The magic number change in a minor release was a mistake. Let's not do that with 3.6.x releases. Since Python doesn't check if there's a corresponding .py file that can be used to rebuild the .pyc file, we shouldn't reject existing .pyc files on the basis that they *might* be broken. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 19:31:28 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 23:31:28 +0000 Subject: [issue28372] Fix asyncio to support formatting of non-python coroutines Message-ID: <1475710288.73.0.330973256467.issue28372@psf.upfronthosting.co.za> New submission from Yury Selivanov: Like the ones that were compiled with Cython. ---------- assignee: yselivanov components: asyncio messages: 278159 nosy: gvanrossum, yselivanov priority: normal severity: normal stage: resolved status: open title: Fix asyncio to support formatting of non-python coroutines type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 19:31:35 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 23:31:35 +0000 Subject: [issue28372] Fix asyncio to support formatting of non-python coroutines In-Reply-To: <1475710288.73.0.330973256467.issue28372@psf.upfronthosting.co.za> Message-ID: <1475710295.91.0.738159795663.issue28372@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 19:34:00 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Oct 2016 23:34:00 +0000 Subject: [issue28372] Fix asyncio to support formatting of non-python coroutines In-Reply-To: <1475710288.73.0.330973256467.issue28372@psf.upfronthosting.co.za> Message-ID: <20161005233357.95017.91062.238DCFD6@psf.io> Roundup Robot added the comment: New changeset 7bacd209ac4f by Yury Selivanov in branch '3.5': Issue #28372: Fix asyncio to support formatting of non-python coroutines https://hg.python.org/cpython/rev/7bacd209ac4f New changeset f7550d535878 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #28372) https://hg.python.org/cpython/rev/f7550d535878 New changeset 8bc3e9754b3d by Yury Selivanov in branch 'default': Merge 3.6 (issue #28372) https://hg.python.org/cpython/rev/8bc3e9754b3d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 19:40:47 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Oct 2016 23:40:47 +0000 Subject: [issue23749] asyncio missing wrap_socket (starttls) In-Reply-To: <1427119199.61.0.485462184824.issue23749@psf.upfronthosting.co.za> Message-ID: <20161005234044.1506.92736.C8188722@psf.io> Roundup Robot added the comment: New changeset 3771a6326725 by Yury Selivanov in branch '3.5': asyncio: Add "call_connection_made" arg to SSLProtocol.__init__ https://hg.python.org/cpython/rev/3771a6326725 New changeset 3e6739e5c2d0 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #23749) https://hg.python.org/cpython/rev/3e6739e5c2d0 New changeset f2204eaba685 by Yury Selivanov in branch 'default': Merge 3.6 (issue #23749) https://hg.python.org/cpython/rev/f2204eaba685 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 19:42:00 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 23:42:00 +0000 Subject: [issue23749] asyncio missing wrap_socket (starttls) In-Reply-To: <1427119199.61.0.485462184824.issue23749@psf.upfronthosting.co.za> Message-ID: <1475710920.4.0.399491925042.issue23749@psf.upfronthosting.co.za> Yury Selivanov added the comment: With the latest change it's possible to implement starttls as a separate package on PyPI, or even by copying/pasting a small snipped of code in your project. It's expected that we'll figure out the API design for starttls during 3.6, so that we can add it in 3.7. This issue should be kept open until we have a full public API for starttls in asyncio. ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 19:46:50 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 23:46:50 +0000 Subject: [issue27168] Comprehensions and await need more unittests In-Reply-To: <1464718014.77.0.520069298007.issue27168@psf.upfronthosting.co.za> Message-ID: <1475711210.98.0.0613967311485.issue27168@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing this one. We added a lot of tests as part of the PEP 530 implementation. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 19:48:17 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 23:48:17 +0000 Subject: [issue24697] Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines In-Reply-To: <1437664215.74.0.89761121939.issue24697@psf.upfronthosting.co.za> Message-ID: <1475711297.73.0.488690525682.issue24697@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing this one. Seems we can live just fine without these new exceptions. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 19:49:31 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Oct 2016 23:49:31 +0000 Subject: [issue25292] ssl socket gets into broken state when client exits during handshake In-Reply-To: <1443729972.18.0.386386409576.issue25292@psf.upfronthosting.co.za> Message-ID: <1475711371.59.0.144679447702.issue25292@psf.upfronthosting.co.za> Yury Selivanov added the comment: Christian, would you be able to look into this before b2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 23:03:31 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Oct 2016 03:03:31 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475723011.6.0.0907101234556.issue10716@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since David added me as nosy, I will address the IDLE issues raised above. But first, a question. Does 'deprecating HTML output' merely mean deprecating the old output in favor of new and better HTML output, or deprecating having any html output, which would also mean deprecating the html doc server? I am strongly against the latter. Currently, IDLE, in both pyshell and run.py, imports pydoc and sets "pydoc.pager = pydoc.plainpager". Bypassing pydoc.getpager this way is not documented, but seems perhaps necessary. Other than this, I believe 'help(xyz)' is treated by IDLE just like any other user code. Serhiy, msg278126 > "It would be nice if IDLE use this feature" There are actually two features: hmtl output, and the html server, which uses the default browser to display the output. Since a year ago, IDLE help displays the html IDLE doc produced by sphinx in a subclass of tkinter Text that feeds the page to a subclass of HTMLParser. The code is in help.py. Sphinx's html seems to follow Fr?d?ric's guidelines in msg246917. I suspect the CSS files are ignored. We might want to do something similar with pydocs html output. Raymond: is sphinx's pydoctheme anything like the css you are looking for? Could it be used as a starting point? There have been requests that 'long' help output (for modules and classes) be displayed separately from Shell itself so that it does not obscure history and be easier to refer to. If we do this, using html instead of plain text would be nice, especially if new features were added. Serhiy, cont. > "I think we should enhance HTML output not just by making it looking better, but by adding more interactivity. For example add the ability to collapse classes, methods, etc, add more hyperlinks." I mainly use pydoc server for tkinter. I would *love* have the repetitive 'inherited methods' section for each class collapsed by default. Ditto for when I use help interactively. To me, this is the single worst feature of pydoc output. David msg278127 > "If Terry would like to see pydoc enhanced to support idle, then I think that would decide the issue." I am not sure what you mean by 'the issue' and I can't currently think of anything IDLE-specific that pydoc should do, other than be consistent. However, producing modern, decent looking html output would make html use possible. Incorporating the current output, as displayed in the server, might be a net negative PR move. Side note: thinking about how to make a clickable link in a Text widget, I realized that that IDLE already does some syntax tagging for colors (keywords, builtins, def and class identifiers). The same tags could be bound to double-click or right-click to display help popups, such as ---------------------------------------------------------- The "if" statement is used for conditional execution: if_stmt ::= "if" expression ":" suite ( "elif" expression ":" suite )* ["else" ":" suite] It selects exactly one of the suites by evaluating the expressions one by one until one is found to be true (see section Boolean operations for the definition of true and false); then that suite is executed (and no other part of the "if" statement is executed or evaluated). If all expressions are false, the suite of the "else" clause, if present, is executed. Related help topics: TRUTHVALUE -------------------------------------------------------------------- with the grammar chunk highlighted and the related topics clickable. What IDLE would need here is consistency in the format of the help texts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 23:49:01 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 03:49:01 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1475725741.65.0.389910019371.issue24452@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Well... I created a patch based on Ned's code :) This now works in the default branch Python 3.7.0a0 (default:f2204eaba685+, Oct 5 2016, 20:43:44) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import webbrowser >>> webbrowser.get("chrome") >>> webbrowser.open_new("https://www.python.org") True Please review :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file44978/issue24452.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 00:17:36 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 04:17:36 +0000 Subject: [issue27825] Make the documentation for statistics' data argument clearer. In-Reply-To: <1471813007.76.0.49945343113.issue27825@psf.upfronthosting.co.za> Message-ID: <1475727456.74.0.631687424855.issue27825@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Updated the docs and updated the example codes as well. Please review :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file44979/issue27825.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 00:19:40 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Oct 2016 04:19:40 +0000 Subject: [issue21140] Idle: saving Shell or an OutputWindow should default to .txt In-Reply-To: <1396493259.83.0.13428125931.issue21140@psf.upfronthosting.co.za> Message-ID: <1475727580.68.0.470202174029.issue21140@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am closing #28365 in favor of this. As noted there, Shell is a subclass of OutputWindow is a subclass of EditorWindow, so Shell should inherit new behavior from OutputWindow instead of both from EW. Change to the patch: I think .py should not even be a selectable option as Shell cannot be edited down to code, and it would make no sense to do so. And anyone who did want to save as .py could select 'all types' and type '.py' explicitly. I was thinking that filetype should be set in OutputWindow, but that does not include text files in an editor window (with editwin.ispythonsource(self.filename) False). Another reason is that I want to change the editor class structure. Currently. the editor window used for all files is the confusingly named PyShellEditorWindow in pyshell.py, which adds breakpoints to EditorWindow. In long run, EditorWindow should be used for non-python editing. The current PyShellEditorWindow should become PythonEditor and have all the attributes and methods specific to python code. Then EditorWindow.filetypes would have .txt and *.* and .py would be added in PythonEditor. It would also, then, not be necessary to disable code stuff in OutputWindow (like the Run menu). (In fact, it might turn out that EditorWindow and OutputWindow would be the same, a base TextEditor ---------- assignee: -> terry.reedy stage: needs patch -> patch review versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 00:33:03 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 06 Oct 2016 04:33:03 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1475728383.54.0.840246764447.issue28201@psf.upfronthosting.co.za> INADA Naoki added the comment: While I think this patch is safe, I need LGTM from another committer because I'm new committer. Could Tim or Raymond review the patch before 3.6beta2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 01:04:54 2016 From: report at bugs.python.org (Tim Peters) Date: Thu, 06 Oct 2016 05:04:54 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1475730294.42.0.655705303629.issue28201@psf.upfronthosting.co.za> Tim Peters added the comment: LGTM! Ship it :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 01:13:58 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Oct 2016 05:13:58 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1475730838.79.0.963773450311.issue28201@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 01:14:40 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 06 Oct 2016 05:14:40 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1475730880.11.0.24744445618.issue28201@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: http://bugs.python.org/file44980/dict-perturb-shift3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 01:14:50 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 05:14:50 +0000 Subject: [issue27859] argparse - subparsers does not retain namespace In-Reply-To: <1472137330.56.0.683571624156.issue27859@psf.upfronthosting.co.za> Message-ID: <1475730890.38.0.339486171577.issue27859@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Seems like this can be closed. Thanks. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 01:20:30 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 06 Oct 2016 05:20:30 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1475731230.17.0.652893861568.issue28201@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: http://bugs.python.org/file44981/dict-perturb-shift4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 01:24:06 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 05:24:06 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1475731446.51.0.84834316483.issue24459@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi Joshua, Seems like your latest patch doesn't apply cleanly to the default branch. Can you rebase and upload a new patch? Thanks. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 02:17:03 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Oct 2016 06:17:03 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1475734623.98.0.695478881975.issue28201@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. But why you moved the declaration of perturb? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 02:23:27 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Oct 2016 06:23:27 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <20161006062321.94941.86076.4D5238A4@psf.io> Roundup Robot added the comment: New changeset cf2778fd7acb by INADA Naoki in branch '3.6': Issue #28201: Dict reduces possibility of 2nd conflict in hash table. https://hg.python.org/cpython/rev/cf2778fd7acb New changeset 80b01cd94a63 by INADA Naoki in branch 'default': Issue #28201: Dict reduces possibility of 2nd conflict in hash table. https://hg.python.org/cpython/rev/80b01cd94a63 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 02:34:23 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 06 Oct 2016 06:34:23 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1475735663.43.0.605231730683.issue28201@psf.upfronthosting.co.za> INADA Naoki added the comment: Thank you, Tim and Serhiy. My first commit has been pushed now! Serhiy: Since I prefer putting variable declaration near it's usage, and PEP 7 permits it since Python 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 02:38:04 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 06 Oct 2016 06:38:04 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1475735884.22.0.264671642532.issue28201@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 03:15:05 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Oct 2016 07:15:05 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1475738105.29.0.83885964244.issue28353@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch with tests. Needed to test it on Windows. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 03:15:33 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Oct 2016 07:15:33 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1475738133.85.0.474363763927.issue28353@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch Added file: http://bugs.python.org/file44982/fwalk_oserror.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 03:45:27 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 06 Oct 2016 07:45:27 +0000 Subject: [issue24870] Optimize ascii and latin1 decoder with surrogateescape and surrogatepass error handlers In-Reply-To: <1439608124.5.0.0773186444318.issue24870@psf.upfronthosting.co.za> Message-ID: <1475739927.62.0.160211563161.issue24870@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 04:43:48 2016 From: report at bugs.python.org (irdb) Date: Thu, 06 Oct 2016 08:43:48 +0000 Subject: [issue24454] Improve the usability of the match object named group API In-Reply-To: <1434340072.54.0.23336337946.issue24454@psf.upfronthosting.co.za> Message-ID: <1475743428.07.0.683926343657.issue24454@psf.upfronthosting.co.za> Changes by irdb : ---------- nosy: +irdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 05:13:03 2016 From: report at bugs.python.org (Arnon Yaari) Date: Thu, 06 Oct 2016 09:13:03 +0000 Subject: [issue28373] input() prints to original stdout even if sys.stdout is wrapped Message-ID: <1475745183.18.0.209614419228.issue28373@psf.upfronthosting.co.za> New submission from Arnon Yaari: When I wrap sys.stdout with a custom object that overrides the 'write' method, regular prints use the custom write method, but the input() function prints the prompt to the original stdout. This is broken on Python 3.5. Earlier versions work correctly. In the following example 'write' does nothing, so I expect no output, but the input() function outputs to stdout anyway: import sys class StreamWrapper(object): def __init__(self, wrapped): self.__wrapped = wrapped def __getattr__(self, name): # 'write' is overridden but for every other function, like 'flush', use the original wrapped stream return getattr(self.__wrapped, name) def write(self, text): pass orig_stdout = sys.stdout sys.stdout = StreamWrapper(orig_stdout) print('a') # this prints nothing input('b') # this should print nothing, but prints 'b' (in Python 3.5 and up only) Looks like this was broken in http://bugs.python.org/issue24402 . Adding the 'fileno' function from this issue fixes the problem, but it's just a workaround. This affects the colorama package: https://github.com/tartley/colorama/issues/103 ---------- messages: 278179 nosy: wiggin15 priority: normal severity: normal status: open title: input() prints to original stdout even if sys.stdout is wrapped versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 05:21:09 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 06 Oct 2016 09:21:09 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1475745669.91.0.327732697197.issue28199@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: http://bugs.python.org/file44983/dictresize3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 06:13:23 2016 From: report at bugs.python.org (Jan Welker) Date: Thu, 06 Oct 2016 10:13:23 +0000 Subject: [issue28374] SyntaxError: invalid token in python2.7/test/test_grammar.py Message-ID: <1475748803.26.0.293864566162.issue28374@psf.upfronthosting.co.za> New submission from Jan Welker: I compiled Python 2.7.12 from source and ran the tests unsuccessful. Compiling /usr/lib/python2.7/test/test_grammar.py ... File "/usr/lib/python2.7/test/test_grammar.py", line 80 self.assertEqual(1 if 1else 0, 1) ^ SyntaxError: invalid token It looks like a space (" ") is missing before the else. The same bug can be found in the next line 81. ---------- components: Tests messages: 278180 nosy: welker priority: normal severity: normal status: open title: SyntaxError: invalid token in python2.7/test/test_grammar.py versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 06:23:49 2016 From: report at bugs.python.org (=?utf-8?q?Adam_Barto=C5=A1?=) Date: Thu, 06 Oct 2016 10:23:49 +0000 Subject: [issue28373] input() prints to original stdout even if sys.stdout is wrapped In-Reply-To: <1475745183.18.0.209614419228.issue28373@psf.upfronthosting.co.za> Message-ID: <1475749429.85.0.0944926596287.issue28373@psf.upfronthosting.co.za> Adam Barto? added the comment: A related issue is that the REPL doesn't use sys.stdin for input, see #17620. Another related issue is #28333. I think that the situation around stdio in Python is complicated an inflexible (by stdio I mean all the interactions between REPL, input(), print(), sys.std* streams, sys.displayhook, sys.excepthook, C-level readline hooks). It would be nice to tidy up these interactions and document them at one place. Currently, input() tries to detect whether sys.stdin and sys.stdout are interactive and have the right filenos, and handles the cases different way. I propose input() to be a thin wrapper (stripping a newline, generating EOFError) around proposed sys.readlinehook(). By default, sys.readlinehook would be GNU readline on Unix and stdio_readline (which just uses sys.stdout and sys.stdin) on Windows. I think that would fix all the problems like this one and changing/wrapping sys.std* streams would just work. My proposal is at https://mail.python.org/pipermail/python-dev/2015-November/142246.html and there is discission at #17620. Recently, the related issue #1602 was fixed and there is hope there will be progress with #17620. ---------- nosy: +Drekin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 06:26:58 2016 From: report at bugs.python.org (=?utf-8?q?Adam_Barto=C5=A1?=) Date: Thu, 06 Oct 2016 10:26:58 +0000 Subject: [issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly In-Reply-To: <1375175592.24.0.539816782076.issue18597@psf.upfronthosting.co.za> Message-ID: <1475749618.01.0.104244478325.issue18597@psf.upfronthosting.co.za> Adam Barto? added the comment: Maybe this was fixed with the recent fix of #1602. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 06:29:17 2016 From: report at bugs.python.org (=?utf-8?q?Adam_Barto=C5=A1?=) Date: Thu, 06 Oct 2016 10:29:17 +0000 Subject: [issue28373] input() prints to original stdout even if sys.stdout is wrapped In-Reply-To: <1475745183.18.0.209614419228.issue28373@psf.upfronthosting.co.za> Message-ID: <1475749757.69.0.548853854815.issue28373@psf.upfronthosting.co.za> Adam Barto? added the comment: Other related issues are #1927 and #24829. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 06:54:46 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 06 Oct 2016 10:54:46 +0000 Subject: [issue26964] Incorrect documentation for `-u`-flag In-Reply-To: <1462467997.8.0.490878249706.issue26964@psf.upfronthosting.co.za> Message-ID: <1475751286.85.0.410911971223.issue26964@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review type: -> behavior versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 07:09:54 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 06 Oct 2016 11:09:54 +0000 Subject: [issue27232] os.fspath() should not use repr() on error In-Reply-To: <1465145885.45.0.563591962736.issue27232@psf.upfronthosting.co.za> Message-ID: <1475752194.49.0.734889874547.issue27232@psf.upfronthosting.co.za> Berker Peksag added the comment: This has already been fixed in ea7b6a7827a4: >>> import os >>> os.fspath(None) Traceback (most recent call last): File "", line 1, in TypeError: expected str, bytes or os.PathLike object, not NoneType ---------- nosy: +berker.peksag resolution: -> out of date status: open -> closed superseder: Show the address in the repr for class objects -> type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 07:17:16 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 06 Oct 2016 11:17:16 +0000 Subject: [issue27231] Support the fspath protocol in the posixpath module In-Reply-To: <1465144539.6.0.0510380371882.issue27231@psf.upfronthosting.co.za> Message-ID: <1475752636.71.0.0914516795104.issue27231@psf.upfronthosting.co.za> Berker Peksag added the comment: It looks like the fspath protocol support has already been implemented in b64f83d6ff24. ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 08:00:24 2016 From: report at bugs.python.org (Sebastian Rittau) Date: Thu, 06 Oct 2016 12:00:24 +0000 Subject: [issue28375] cgi.py spam in Apache server logs Message-ID: <1475755223.43.0.818852294498.issue28375@psf.upfronthosting.co.za> New submission from Sebastian Rittau: I am using cgi.py in WSGI applications, using Apache and mod_wsgi. Unfortunately cgi.py keeps spamming the error log with messages like the following: Exception ignored in: Traceback (most recent call last): File "/usr/lib/python3.5/cgi.py", line 566, in __del__ NameError: name 'AttributeError' is not defined This is mostly likely due to the warning about __del__ in , i.e. AttributeError will already have been cleaned at the time FieldStorage is collected. One workaround that seems to work for me is to cache AttributeError in the constructor of FieldStorage in self and use that attribute during __del__. ---------- messages: 278186 nosy: srittau priority: normal severity: normal status: open title: cgi.py spam in Apache server logs versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 08:00:29 2016 From: report at bugs.python.org (Oren Milman) Date: Thu, 06 Oct 2016 12:00:29 +0000 Subject: [issue28376] assertion failure in rangeobject.c Message-ID: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> New submission from Oren Milman: ------------ current state ------------ An assertion in Objects/rangeobject.c might fail: >>> type(iter(range(0))) >>> type(iter(range(0)))(1, 1, 0) Assertion failed: step != 0, file ..\Objects\rangeobject.c, line 895 This is caused by the lack of a check whether 'step' is zero, during the creation of a range_iterator object, in rangeiter_new. Note that during the creation of a range object, the function range_new does check that, by calling validate_step, which leads to the following behavior: >>> range(1, 1, 0) Traceback (most recent call last): File "", line 1, in ValueError: range() arg 3 must not be zero >>> ------------ proposed changes ------------ 1. In Objects/rangeobject.c in rangeiter_new: - in case 'step' is zero, raise a ValueError - in error messages, replace 'rangeiter' with 'range_iterator', as the latter is the name of the type in Python code 2. In Lib/test/test_range.py, add tests for calling the range_iterator type (i.e. creating a range_iterator object) ------------ diff ------------ The proposed patches diff file is attached. ------------ tests ------------ I ran 'python_d.exe -m test -j3' (on my 64-bit Windows 10) with and without the patches, and got quite the same output. (That also means my new tests in test_range passed.) The outputs of both runs are attached. ---------- components: Interpreter Core files: CPythonTestOutput.txt messages: 278187 nosy: Oren Milman priority: normal severity: normal status: open title: assertion failure in rangeobject.c type: crash versions: Python 3.7 Added file: http://bugs.python.org/file44984/CPythonTestOutput.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 08:00:51 2016 From: report at bugs.python.org (Oren Milman) Date: Thu, 06 Oct 2016 12:00:51 +0000 Subject: [issue28376] assertion failure in rangeobject.c In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475755251.39.0.556788438435.issue28376@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file44985/patchedCPythonTestOutput_ver1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 08:02:33 2016 From: report at bugs.python.org (Oren Milman) Date: Thu, 06 Oct 2016 12:02:33 +0000 Subject: [issue28376] assertion failure in rangeobject.c In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475755353.71.0.122498147207.issue28376@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- keywords: +patch Added file: http://bugs.python.org/file44986/issue28376_ver1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 08:31:26 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 06 Oct 2016 12:31:26 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475757086.45.0.550994237336.issue28376@psf.upfronthosting.co.za> Emanuel Barry added the comment: I'm not able to trigger an assertion error when running the latest trunk in debug mode. I get a "valid" range_iterator object though, and using __reduce__ gives me direct access to `range(0, 0, 0)` (which is completely worthless). Error or not, this should be fixed, and your patch LGTM. Thanks! (I changed the type to 'behaviour' since I can't reproduce the assertion, but it doesn't make much of a difference) ---------- nosy: +ebarry stage: -> patch review title: assertion failure in rangeobject.c -> rangeiter_new fails when creating a range of step 0 type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 08:46:20 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 06 Oct 2016 12:46:20 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475757980.42.0.324591999092.issue28376@psf.upfronthosting.co.za> INADA Naoki added the comment: patch is LGTM. But there is one hidden inconsistency: >>> r = range(2**100) >>> type(iter(r)) >>> type(iter(r))(1, 1, 0) Traceback (most recent call last): File "", line 1, in TypeError: cannot create 'longrange_iterator' instances Should we have same tp_new method for longrange_iterator? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 08:59:40 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 06 Oct 2016 12:59:40 +0000 Subject: [issue28374] SyntaxError: invalid token in python2.7/test/test_grammar.py In-Reply-To: <1475748803.26.0.293864566162.issue28374@psf.upfronthosting.co.za> Message-ID: <1475758780.72.0.793912277388.issue28374@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report! How did you run the test? I think there is something wrong with your installation (or you probably ran the test with the system Python.) $ ./python -m test.regrtest test_grammar [1/1] test_grammar 1 test OK. [48645 refs] $ hg summary parent: 104329:59260b38f7cd make 'where' Py_ssize_t ---------- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> pending type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 09:13:17 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Oct 2016 13:13:17 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1475759597.31.0.987237678507.issue10716@psf.upfronthosting.co.za> R. David Murray added the comment: My memory of the thread (I haven't gone back and checked) was that the thought was to drop html output altogether because the sphinx docs were more useful for anyone wanting to use html, and network connectivity was so universal in this day and age that having a local html server for offline uses was of minimal utility. So your vote that it be kept because it is useful to idle and can be made more useful by improving the html seems to me to decide the issue in favor of making the improvements (given someone willing to do the patch review and any additional needed coding). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 09:14:23 2016 From: report at bugs.python.org (Weihong Guan) Date: Thu, 06 Oct 2016 13:14:23 +0000 Subject: [issue28377] struct.unpack of Bool Message-ID: <1475759663.29.0.378814371853.issue28377@psf.upfronthosting.co.za> New submission from Weihong Guan: According to the doc: For the '?' format character, the return value is either True or False. When packing, the truth value of the argument object is used. Either 0 or 1 in the native or standard bool representation will be packed, and any non-zero value will be True when unpacking. But it behaves more like & 1 operation. so False for even value, and True for odd value. unpack fmt '?H' should reqiure buff of length 3, same as 'H?', not 4. ---------- components: ctypes files: Screen Shot 2016-10-06 at 20.59.43.png messages: 278192 nosy: Weihong Guan priority: normal severity: normal status: open title: struct.unpack of Bool type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file44987/Screen Shot 2016-10-06 at 20.59.43.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 09:53:44 2016 From: report at bugs.python.org (Eryk Sun) Date: Thu, 06 Oct 2016 13:53:44 +0000 Subject: [issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly In-Reply-To: <1375175592.24.0.539816782076.issue18597@psf.upfronthosting.co.za> Message-ID: <1475762024.29.0.711918840965.issue18597@psf.upfronthosting.co.za> Eryk Sun added the comment: Switching to ReadConsoleW in 3.6+ solves the problem with not seeing ERROR_OPERATION_ABORTED in Windows 8+, and with proper handling this potentially solves issues with Ctrl+C handling (when I last checked there were still bugs with this in the 3.6 beta). However, the problem still exists in 2.7 and 3.5, where the only possible solution is to switch to ReadConsoleA. Maybe once the new PyOS_StdioReadline code in 3.6 is stable, it can be backported to 3.5 using ReadConsoleA instead of ReadConsoleW. 2.7 will probably remain broken. ---------- versions: -Python 3.3, Python 3.4, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 09:59:30 2016 From: report at bugs.python.org (=?utf-8?q?Adam_Barto=C5=A1?=) Date: Thu, 06 Oct 2016 13:59:30 +0000 Subject: [issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly In-Reply-To: <1375175592.24.0.539816782076.issue18597@psf.upfronthosting.co.za> Message-ID: <1475762370.79.0.114011050523.issue18597@psf.upfronthosting.co.za> Adam Barto? added the comment: The main reason I have extended the support of win_unicode_console to Python 2.7 was that the related issues won't be fixed there, so using win_unicode_console may fix this as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 10:38:28 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Oct 2016 14:38:28 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475764708.34.0.465425361306.issue28376@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 10:40:34 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Oct 2016 14:40:34 +0000 Subject: [issue28377] struct.unpack of Bool In-Reply-To: <1475759663.29.0.378814371853.issue28377@psf.upfronthosting.co.za> Message-ID: <1475764834.76.0.999339284462.issue28377@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Maybe this is a duplicate of issue22012. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 11:01:13 2016 From: report at bugs.python.org (Grzegorz Sikorski) Date: Thu, 06 Oct 2016 15:01:13 +0000 Subject: [issue28378] urllib2 does not handle cookies with `,` Message-ID: <1475766073.34.0.905667468742.issue28378@psf.upfronthosting.co.za> New submission from Grzegorz Sikorski: I have a usecase when the server sends two cookies in separate `Set-Cookie` headers. One of the cookie includes a `,` (comma). It seems this is not handled properly, as the library always try to fold multiple headers with the same name into a single comma-separated string. While this is valid for other header fields, `Set-Cookie` should never be folded, as RFC 6265 says: ``` Origin servers SHOULD NOT fold multiple Set-Cookie header fields into a single header field. The usual mechanism for folding HTTP headers fields (i.e., as defined in [RFC2616]) might change the semantics of the Set-Cookie header field because the %x2C (",") character is used by Set-Cookie in a way that conflicts with such folding. ``` ---------- components: Library (Lib) messages: 278196 nosy: Grzegorz Sikorski priority: normal severity: normal status: open title: urllib2 does not handle cookies with `,` type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 11:12:04 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 06 Oct 2016 15:12:04 +0000 Subject: [issue28355] wsgiref simple_server PATH_INFO treats slashes and %2F the same In-Reply-To: <1475582263.54.0.955385942496.issue28355@psf.upfronthosting.co.za> Message-ID: <1475766724.98.0.388545057785.issue28355@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +pje _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 11:46:59 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 06 Oct 2016 15:46:59 +0000 Subject: [issue27859] argparse - subparsers does not retain namespace In-Reply-To: <1472137330.56.0.683571624156.issue27859@psf.upfronthosting.co.za> Message-ID: <1475768819.32.0.68302922343.issue27859@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> argparse set_defaults on subcommands should override top level set_defaults _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 13:08:22 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Oct 2016 17:08:22 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475773702.67.0.603441429885.issue28376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good point Naoki. I think we can remove tp_new method from range_iterator in 3.7. Seems it is never used. The patch LGTM for 3.5-3.6, but the test should be marked as CPython implementation detail (@support.cpython_only). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 13:15:51 2016 From: report at bugs.python.org (A.J.) Date: Thu, 06 Oct 2016 17:15:51 +0000 Subject: [issue28365] idle forgets that saved console session is not a python file after restart In-Reply-To: <1475681757.64.0.722295974246.issue28365@psf.upfronthosting.co.za> Message-ID: <1475774151.09.0.54769746814.issue28365@psf.upfronthosting.co.za> A.J. added the comment: There is no other way to explain it without fail every time no matter what code I write there is always syntax error highlighted on the five in the version banner. ---------- Added file: http://bugs.python.org/file44988/2016-10-06 (4).png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 14:06:39 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Oct 2016 18:06:39 +0000 Subject: [issue27759] selectors incorrectly retain invalid file descriptors In-Reply-To: <1471134409.41.0.274513488512.issue27759@psf.upfronthosting.co.za> Message-ID: <20161006180636.82206.61832.293F414C@psf.io> Roundup Robot added the comment: New changeset 8cc1fca83fb8 by Yury Selivanov in branch '3.4': Issue #27759: Fix selectors incorrectly retain invalid file descriptors. https://hg.python.org/cpython/rev/8cc1fca83fb8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 14:07:07 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Oct 2016 18:07:07 +0000 Subject: [issue27386] Asyncio server hang when clients connect and immediately disconnect In-Reply-To: <1466888194.59.0.640833210662.issue27386@psf.upfronthosting.co.za> Message-ID: <1475777227.3.0.465222500331.issue27386@psf.upfronthosting.co.za> Yury Selivanov added the comment: Alright, I've backported the fix to 3.4. Closing this. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 14:10:40 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Oct 2016 18:10:40 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1466957117.0.0.423625085233.issue27392@psf.upfronthosting.co.za> Message-ID: <1475777440.91.0.906870993018.issue27392@psf.upfronthosting.co.za> Yury Selivanov added the comment: AFAICT this issue was resolved in https://github.com/python/asyncio/pull/378. Closing this one. Thanks, Jim! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 14:15:04 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 06 Oct 2016 18:15:04 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour Message-ID: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> New submission from Xiang Zhang: Currently PyUnicode_CopyCharacters doesn't check arguments thoroughly. This could lead to undefined behaviour or crash in debug mode. For example, from_start > len(from), how_many < 0. Another case is that when how_many > len(from), it will choose len(from) but this can still fail since from_start can > 0. The doc of it is also not perfect, it does not necessarily return 0 on success. ---------- components: Interpreter Core files: PyUnicode_CopyCharacters.patch keywords: patch messages: 278202 nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: PyUnicode_CopyCharacters could lead to undefined behaviour type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file44989/PyUnicode_CopyCharacters.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 14:27:04 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 06 Oct 2016 18:27:04 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1475778424.12.0.488418503968.issue28379@psf.upfronthosting.co.za> Changes by Xiang Zhang : Removed file: http://bugs.python.org/file44989/PyUnicode_CopyCharacters.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 14:27:17 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 06 Oct 2016 18:27:17 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1475778437.67.0.993889896344.issue28379@psf.upfronthosting.co.za> Changes by Xiang Zhang : Added file: http://bugs.python.org/file44990/PyUnicode_CopyCharacters.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 14:50:04 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Oct 2016 18:50:04 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: <1473157014.91.0.531687158456.issue27972@psf.upfronthosting.co.za> Message-ID: <1475779804.7.0.87639022714.issue27972@psf.upfronthosting.co.za> Yury Selivanov added the comment: This is an interesting mind twister. The key problem is that `self.runner_task` is blocked on *itself*: so Task._fut_waiter is set to the Task. Therefore when the task is being cancelled, `Task.cancel` simply recurses. One way to solve this is to prohibit tasks to await on themselves. Right now the following code "kind of" works: async def f(): loop.call_later(1, lambda: t.set_result(42)) return await t loop = asyncio.get_event_loop() t = loop.create_task(f()) print(loop.run_until_complete(t)) albeit it logs errors about invalid Future state. My proposal is to raise a ValueError if Task is asked to await on itself. Guido, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 15:07:15 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Oct 2016 19:07:15 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1475780835.13.0.794220270001.issue26081@psf.upfronthosting.co.za> Yury Selivanov added the comment: The most recent patch segfaults... Will try to debug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 15:08:42 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Oct 2016 19:08:42 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1475780922.93.0.698140304234.issue28379@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added comments on Rietveld. I don't know whether tests for this function are needed. It is public, but is not a part of stable API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 15:14:48 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Oct 2016 19:14:48 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1475781288.44.0.279264983941.issue26081@psf.upfronthosting.co.za> Yury Selivanov added the comment: INADA, would you be able to take a look? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 15:34:45 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 19:34:45 +0000 Subject: [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <1475782485.1.0.551106209117.issue18789@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 15:36:18 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 19:36:18 +0000 Subject: [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <1475782578.11.0.044791713067.issue18789@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I'll work on this :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 16:13:19 2016 From: report at bugs.python.org (Yannick Brehon) Date: Thu, 06 Oct 2016 20:13:19 +0000 Subject: [issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called Message-ID: <1475784799.56.0.716869368954.issue28380@psf.upfronthosting.co.za> New submission from Yannick Brehon: If one defines a mock for a function, using autospec=True, then the mock will correctly support assert_called_once_with(), among others, but not assert_called_once, assert_called, and assert_not_called. The attached file contains a fix for the issue. ---------- components: Library (Lib) files: fix_autospecced_mock_functions.patch keywords: patch messages: 278208 nosy: Yannick Brehon priority: normal severity: normal status: open title: Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file44991/fix_autospecced_mock_functions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 16:16:29 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Oct 2016 20:16:29 +0000 Subject: [issue21140] Idle: saving Shell or an OutputWindow should default to .txt In-Reply-To: <1396493259.83.0.13428125931.issue21140@psf.upfronthosting.co.za> Message-ID: <1475784989.83.0.155824691118.issue21140@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A more drastic change would be to refuse to save OutputWindow and Shell as .py(w,o) files. #28365 is about a beginner who apparently save a short Shell session as .py, quit IDLE, loaded the saved session in an editor, and tried to run it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 16:24:56 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Oct 2016 20:24:56 +0000 Subject: [issue28365] IDLE: don't offer to save text files as .py In-Reply-To: <1475681757.64.0.722295974246.issue28365@psf.upfronthosting.co.za> Message-ID: <1475785496.26.0.488180215351.issue28365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am closing this as a duplicate of existing #21140, to make .txt instead of .py the extension for files known not to be code files. I There is an existing simple patch. I will modify it to not even offer .py as a secondary choice. The reason Paul had to close IDLE to open the file in an(other) editor window is that Python allows only one editor window per file, and Shell is a subclass of OutputWindow, which is a subclass of EditorWindow. (The latter inheritance is backwards; OutputWindow should be the base TextEditor and 'CodeEditor' a subclass thereof.) When Shell is saved, the file name appears on the recent files list, and attempts to open it make the exiting editor the active window. Angie, as Paul explained, your screenshot shows a text file, mislabeled as a .py python file, in the editor. When you run non-code text as code, you get a SyntaxError. The text file appears to be a saved interactive shell session. "Python 3" by itself is a SyntaxError and will continue to be an error no matter what follows. It is possible that your Python installation, or the IDLE part of it, is badly broken, and needs to be repaired or re-installed. But I think it much much more likely that you have made a mistake. If you want to discuss this further, please post to python-list (or its news.gmane.org mirror). Include a link to this issue, give a detailed description of what you did (keystrokes and mouse clicks), and ask any questions. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Idle: saving Shell or an OutputWindow should default to .txt title: idle forgets that saved console session is not a python file after restart -> IDLE: don't offer to save text files as .py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 16:31:24 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Oct 2016 20:31:24 +0000 Subject: [issue28365] IDLE: don't offer to save text files as .py In-Reply-To: <1475681757.64.0.722295974246.issue28365@psf.upfronthosting.co.za> Message-ID: <1475785884.77.0.961635324961.issue28365@psf.upfronthosting.co.za> Terry J. Reedy added the comment: PS. A.J., you will likely be a happier user if you make a subdirectory under c:/Users/angie and put your files there instead of in the installation directory under the hidden AppDate ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 17:10:16 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 06 Oct 2016 21:10:16 +0000 Subject: [issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called In-Reply-To: <1475784799.56.0.716869368954.issue28380@psf.upfronthosting.co.za> Message-ID: <1475788216.45.0.752383211765.issue28380@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 17:18:28 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 06 Oct 2016 21:18:28 +0000 Subject: [issue28381] Add a "starcaller" function Message-ID: <1475788708.75.0.957253302294.issue28381@psf.upfronthosting.co.za> New submission from Josh Rosenberg: Not sure if this is the right venue to propose this, but I'd like to propose adding a starcaller method to the standard library, either functools or operator (not sure if the proposal is more like partial or more like methodcaller). Basically, right now, when you want to take an existing function and call it repeatedly with preconstructed tuples using functional tools (e.g. sorted or groupby's key argument, multiprocessing.Pool's various map-like methods), you need to either have a special starmethod (e.g. Pool.map vs. Pool.starmap), or if Python doesn't provide one, you need use Python-defined functions (and for stuff like Pool, you can't even use lambda due to pickling issues, so you need to define the utility somewhere else). This means that you can't reuse builtins for stuff like the old "find runs of consecutive numbers" example from the itertools docs ( https://docs.python.org/2.6/library/itertools.html#examples ). In terms of behavior: starfunc = starcaller(func) would be behave roughly the same as the following (less efficient) Python 2 code: starfunc = functools.partial(apply, func) (and perhaps starcaller(func, kwonly=True) would behave like functools.partial(apply, func, ()) to extend it to dicts). This would make it possible to write the old consecutive numbers example: for k, g in groupby(enumerate(data), lambda (i,x):i-x): (which is no longer legal since Py3 banned sequence unpacking in arguments like that) as: for k, g in groupby(enumerate(data), starcaller(operator.sub)): It would also mean that instead of constantly needing to write new "star methods", you can just reuse existing functions with new batteries. For example, multiprocessing.Pool has a map and starmap function, but imap and imap_unordered have no starimap or starimap_unordered equivalents, which means using them at all requires you to def a function at trivial wrapper at global scope (possibly a long way away from the point of use) just to use an existing function ( def whydidineedthis(args): return existingfunction(*args) ). With starcaller, there is no need to add starimap and friends, because the same result is easily achieved with: with multiprocessing.Pool() as pool: for res in pool.imap(starcaller(existingfunction), ...): Is this a reasonable proposal? I could get an implementation ready fairly quickly, I'd just need to feedback on the name, which module it should be put in (functools or operator seem equally plausible) and whether the idea of using a keyword argument to the constructor makes more sense (kwonly=True) vs. expecting users to do functools.partial(starcaller(existingfunc), ()), vs. a separate class like doublestarcaller. ---------- components: Library (Lib) messages: 278212 nosy: josh.r priority: normal severity: normal status: open title: Add a "starcaller" function versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 17:32:29 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Oct 2016 21:32:29 +0000 Subject: [issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called In-Reply-To: <1475784799.56.0.716869368954.issue28380@psf.upfronthosting.co.za> Message-ID: <20161006213226.85654.51894.89EAFE6F@psf.io> Roundup Robot added the comment: New changeset 4e39b4e57673 by Gregory P. Smith in branch '3.6': Fixes issue28380: unittest.mock Mock autospec functions now properly support https://hg.python.org/cpython/rev/4e39b4e57673 New changeset fca5c4a63251 by Gregory P. Smith in branch 'default': Issue #28380: unittest.mock Mock autospec functions now properly support https://hg.python.org/cpython/rev/fca5c4a63251 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 17:35:57 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 06 Oct 2016 21:35:57 +0000 Subject: [issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called In-Reply-To: <1475784799.56.0.716869368954.issue28380@psf.upfronthosting.co.za> Message-ID: <1475789757.32.0.202479489414.issue28380@psf.upfronthosting.co.za> Gregory P. Smith added the comment: thanks! I didn't apply the fix to 3.5 (or earlier - those are closed) as it could arguably be seen as adding a new API and there are valid workarounds by asserting on the list of calls directly. ---------- resolution: -> fixed stage: -> commit review status: open -> closed versions: -Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 17:47:53 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 06 Oct 2016 21:47:53 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: <1475779804.7.0.87639022714.issue27972@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: It's pretty perverse. But how would you detect this case? Does it require changes to CPython or only to asyncio? Does it require a spec change anywhere? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 17:50:02 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Oct 2016 21:50:02 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: <1473157014.91.0.531687158456.issue27972@psf.upfronthosting.co.za> Message-ID: <1475790602.92.0.971100062986.issue27972@psf.upfronthosting.co.za> Yury Selivanov added the comment: > It's pretty perverse. But how would you detect this case? In Task._step, we can check if the future the task is about to await on is "self". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 17:53:45 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 06 Oct 2016 21:53:45 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: <1475790602.92.0.971100062986.issue27972@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Is that enough? What if the recursion involves several tasks waiting for each other in a cycle? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 17:58:37 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Oct 2016 21:58:37 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: <1473157014.91.0.531687158456.issue27972@psf.upfronthosting.co.za> Message-ID: <1475791117.77.0.436190769274.issue27972@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Is that enough? What if the recursion involves several tasks waiting for each other in a cycle? I'm not sure... Maybe it's OK when two tasks await on each other, I think the current Task implementation should be able to handle that. The problem with the Task awaiting itself is that the current implementation just crashes with a RecursionError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 18:13:25 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 06 Oct 2016 22:13:25 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: <1475791117.77.0.436190769274.issue27972@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Maybe it could be fixed rather than making this a checked failure? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 18:26:24 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 22:26:24 +0000 Subject: [issue28381] Add a "starcaller" function In-Reply-To: <1475788708.75.0.957253302294.issue28381@psf.upfronthosting.co.za> Message-ID: <1475792784.62.0.411915542525.issue28381@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi Josh, I think python ideas mailing list might have been a better venue for this. https://mail.python.org/mailman/listinfo/python-ideas ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 18:32:53 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 06 Oct 2016 22:32:53 +0000 Subject: [issue28381] Add a "starcaller" function In-Reply-To: <1475788708.75.0.957253302294.issue28381@psf.upfronthosting.co.za> Message-ID: <1475793173.86.0.17205165741.issue28381@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 18:47:01 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 22:47:01 +0000 Subject: [issue28206] signal.Signals not documented In-Reply-To: <1474297204.47.0.613989661481.issue28206@psf.upfronthosting.co.za> Message-ID: <1475794021.79.0.446265207883.issue28206@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 19:20:37 2016 From: report at bugs.python.org (Alexis) Date: Thu, 06 Oct 2016 23:20:37 +0000 Subject: [issue28382] Possible deadlock after many multiprocessing.Process are launch Message-ID: <1475796037.28.0.0216232278478.issue28382@psf.upfronthosting.co.za> New submission from Alexis: I am launching a process inside a pool worker, using the multiprocessing module. After a while, a deadlock append when I am trying to join the process. Here is a simple version of the code: import sys, time, multiprocessing from multiprocessing.pool import ThreadPool def main(): # Launch 8 workers pool = ThreadPool(8) it = pool.imap(run, range(500)) while True: try: it.next() except StopIteration: break def run(value): # Each worker launch its own Process process = multiprocessing.Process(target=run_and_might_segfault, args=(value,)) process.start() while process.is_alive(): sys.stdout.write('.') sys.stdout.flush() time.sleep(0.1) # Will never join after a while, because of a mystery deadlock process.join() def run_and_might_segfault(value): print(value) if __name__ == '__main__': main() And here is a possible output: ~ python m.py ..0 1 ........8 .9 .......10 ......11 ........12 13 ........14 ........16 ........................................................................................ As you can see, process.is_alive() is alway true after few iterations, the process will never join. If I CTRL-C the script a get this stacktrace: Traceback (most recent call last): File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/pool.py", line 680, in next item = self._items.popleft() IndexError: pop from an empty deque During handling of the above exception, another exception occurred: Traceback (most recent call last): File "m.py", line 30, in main() File "m.py", line 9, in main it.next() File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5 /lib/python3.5/multiprocessing/pool.py", line 684, in next self._cond.wait(timeout) File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5 /lib/python3.5/threading.py", line 293, in wait waiter.acquire() KeyboardInterrupt Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5 /lib/python3.5/multiprocessing/popen_fork.py", line 29, in poll pid, sts = os.waitpid(self.pid, flag) KeyboardInterrupt Using python 3.5.1 on macos, also tried with 3.5.2 with same issue. Same result on Debian. I tried using python 2.7, and it is working well. May be a python 3.5 issue only? Here is the link of the stackoverflow question: http://stackoverflow.com/questions/39884898/large-amount-of-multiprocessing-process-causing-deadlock ---------- components: Library (Lib) messages: 278221 nosy: Hadhoke priority: normal severity: normal status: open title: Possible deadlock after many multiprocessing.Process are launch type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 20:07:31 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Oct 2016 00:07:31 +0000 Subject: [issue28381] Add a "starcaller" function In-Reply-To: <1475788708.75.0.957253302294.issue28381@psf.upfronthosting.co.za> Message-ID: <1475798851.5.0.0115795568887.issue28381@psf.upfronthosting.co.za> Steven D'Aprano added the comment: This was discussed on Python-Ideas back in July: https://mail.python.org/pipermail/python-ideas/2016-July/041153.html I don't recall any opposition, although Nick suggested that possibly a better idea was to resurrect the `apply` built-in into functools: https://mail.python.org/pipermail/python-ideas/2016-July/041159.html ---------- nosy: +ncoghlan, steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 23:10:39 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 07 Oct 2016 03:10:39 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1475809839.09.0.656350649465.issue28199@psf.upfronthosting.co.za> Raymond Hettinger added the comment: For the simple case with no dummy entries, I was expecting a fast path that just realloced the keys/values/hashes arrays and then updated the index table with reinsertion logic that only touches the indices. Use realloc() is nice because it makes it possible that the keys/values/hashes don't have to be recopied and if they did, it would use a fast memcpy to move them to the newly resized array. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 23:17:43 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 07 Oct 2016 03:17:43 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1475810263.73.0.434634714967.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: FutureIter_throw is wrong, maybe. Removing FutureIter_send and FutureIter_throw from FutureIter_methods solves the segv and test passed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 23:33:02 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 07 Oct 2016 03:33:02 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1475811182.59.0.223072248042.issue28199@psf.upfronthosting.co.za> INADA Naoki added the comment: Since entries array is embedded in PyDictKeysObject, we can't realloc entries. And while values are split array, dictresize() convert split table into combine table. Split table may have enough size of ma_values at first in typical case. And in not typical case, split table may not be used. So I think realloc ma_values is premature optimization, unless profiler says make_keys_shared() is slow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 23:33:09 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 07 Oct 2016 03:33:09 +0000 Subject: [issue21443] asyncio logging documentation clarifications In-Reply-To: <1399321197.68.0.955361534546.issue21443@psf.upfronthosting.co.za> Message-ID: <1475811189.75.0.166543249211.issue21443@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, I added the paragraph explaining how to change the log level for asyncio. Please check it out. Thanks :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file44992/issue21443.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 23:54:52 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 07 Oct 2016 03:54:52 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1475812492.07.0.373090482264.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: fixed ---------- Added file: http://bugs.python.org/file44993/fastfuture2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 23:57:43 2016 From: report at bugs.python.org (Parvesh jain) Date: Fri, 07 Oct 2016 03:57:43 +0000 Subject: [issue26171] heap overflow in zipimporter module In-Reply-To: <1453348353.03.0.314168195173.issue26171@psf.upfronthosting.co.za> Message-ID: <1475812663.87.0.682366979286.issue26171@psf.upfronthosting.co.za> Parvesh jain added the comment: I think patches put up in http://bugs.python.org/msg258736 is at least not sufficient enough for Python 2.7. POC script(crash.py) provided with the issue calls get_data with data_size = -1. I am using Python 2.7.8 . I patched the same with the solution provided in https://hg.python.org/cpython/rev/985fc64c60d6 . I was still able to reproduce the issue and it failed with Traceback (most recent call last): File "crash.py", line 25, in print(importer.get_data(FILE)) IOError: zipimport: can't read data Segmentation fault (core dumped) but I couldn't reproduce the same with latest 2.7.12:- jchang at qasus-ubun12x64-001:~/Downloads/Python-2.7.12$ python2.7 -V Python 2.7.12 jchang at qasus-ubun12x64-001:~/Downloads/Python-2.7.12$ python2.7 crash.py Traceback (most recent call last): File "crash.py", line 25, in print(importer.get_data(FILE)) zipimport.ZipImportError: negative data size As we can see issue does happen in 2.7.12 because of following extra check :- if (data_size < 0) { PyErr_Format(ZipImportError, "negative data size"); return NULL; } which was merged in https://hg.python.org/cpython/rev/2edbdb79cd6d. I was thinking of backporting the same to Python 2.7.8 as well to completely address this issue. Could you guys confirm if my understanding is correct on this ? Thanks ---------- nosy: +Parvesh jain _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 00:37:23 2016 From: report at bugs.python.org (Kevin Norris) Date: Fri, 07 Oct 2016 04:37:23 +0000 Subject: [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal Message-ID: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> New submission from Kevin Norris: The documentation for __hash__ contains this text: "The only required property is that objects which compare equal have the same hash value; it is advised to somehow mix together (e.g. using exclusive or) the hash values for the components of the object that also play a part in comparison of objects." The recommendation of "using exclusive or" is likely to result in programmers naively doing this: def __hash__(self): return hash(self.thing1) ^ hash(self.thing2) ^ hash(self.thing3) In the event that (say) self.thing1 and self.thing2 have almost or exactly the same hash (with "almost" referring to bitwise differences rather than integral distance), this wipes out most or all of the entropy from both values and greatly increases the likelihood of hash collisions. Indeed, Python's own tuple type does not do this (while it does use XOR, it also does some other math to ensure the bits are as mixed up as is practical).[1] Because the correct algorithm is both nontrivial to implement and already exists in the tuple type's __hash__, I propose that the documentation be updated to recommend something like the following: def __hash__(self): return hash((self.thing1, self.thing2, self.thing3)) One possible wording: "The only required property is that objects which compare equal have the same hash value; it is advised to mix together the hash values of the components of the object that also play a part in comparison of objects by packing them into a tuple and hashing the tuple: [code example]" [1]: https://hg.python.org/cpython/file/fca5c4a63251/Objects/tupleobject.c#l348 ---------- assignee: docs at python components: Documentation messages: 278229 nosy: Kevin.Norris, docs at python priority: normal severity: normal status: open title: __hash__ documentation recommends naive XOR to combine but this is suboptimal type: performance versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 00:48:39 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 07 Oct 2016 04:48:39 +0000 Subject: [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <1475815719.26.0.919631451406.issue18789@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, here is the patch. I followed Raymond's suggestion to use 'vulnerable' or 'safe' instead of the original 'True' or 'False'. Please check it out. Thanks :) ---------- keywords: +patch Added file: http://bugs.python.org/file44994/issue18789.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 01:52:21 2016 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Oct 2016 05:52:21 +0000 Subject: [issue18967] Find a less conflict prone approach to Misc/NEWS In-Reply-To: <1378605881.29.0.990351353386.issue18967@psf.upfronthosting.co.za> Message-ID: <1475819541.22.0.578482898034.issue18967@psf.upfronthosting.co.za> Nick Coghlan added the comment: I came across OpenStack's tool for this problem today: http://docs.openstack.org/developer/reno/design.html I think it's significantly more complex than we need for CPython, but also still interesting as a point of reference. It's already mentioned in PEP 512, but I'll also add a reference here to https://pypi.python.org/pypi/towncrier, Amber Brown's release note manager that allows Twisted style release notes management to be used with other projects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 04:51:46 2016 From: report at bugs.python.org (Oren Milman) Date: Fri, 07 Oct 2016 08:51:46 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475830306.19.0.719401370054.issue28376@psf.upfronthosting.co.za> Oren Milman added the comment: The diff files for 3.5 and 3.6 are attached (I only added @test.support.cpython_only, as you suggested). The diff file for 3.7 is also attached. It contains: - removing rangeiter_new - tests to verify one cannot create instances of range_iterator or longrange_iterator (in CPython) - added 'Iterator.register(longrange_iterator)' in Lib/_collections_abc.py The output of 'python_d.exe -m test -j3' for each version is also attached (they were all successful). P.S. If we remove the ability to create instances of range_iterator in 3.7, shouldn't we raise a DeprecationWarning in rangeiter_new in 3.5 and 3.6? ---------- Added file: http://bugs.python.org/file44995/issue28376_CPython35_ver2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 04:53:11 2016 From: report at bugs.python.org (Oren Milman) Date: Fri, 07 Oct 2016 08:53:11 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475830391.67.0.428545559696.issue28376@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file44996/issue28376_CPython36_ver2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 04:53:29 2016 From: report at bugs.python.org (Oren Milman) Date: Fri, 07 Oct 2016 08:53:29 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475830409.23.0.682569919157.issue28376@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file44997/issue28376_CPython37_ver2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 04:54:09 2016 From: report at bugs.python.org (Oren Milman) Date: Fri, 07 Oct 2016 08:54:09 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475830449.12.0.0440886525397.issue28376@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file44998/patchedCPython35TestOutput_ver2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 04:54:36 2016 From: report at bugs.python.org (Oren Milman) Date: Fri, 07 Oct 2016 08:54:36 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475830476.5.0.298780567745.issue28376@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file44999/patchedCPython36TestOutput_ver2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 04:55:13 2016 From: report at bugs.python.org (Oren Milman) Date: Fri, 07 Oct 2016 08:55:13 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475830513.21.0.878152488577.issue28376@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file45000/patchedCPython37TestOutput_ver2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 05:04:52 2016 From: report at bugs.python.org (Thomas Levine) Date: Fri, 07 Oct 2016 09:04:52 +0000 Subject: [issue20120] Percent-signs (%) in .pypirc should not be interpolated In-Reply-To: <1388825675.42.0.435893533792.issue20120@psf.upfronthosting.co.za> Message-ID: <1475831092.44.0.0525625832001.issue20120@psf.upfronthosting.co.za> Thomas Levine added the comment: I just upgraded from 3.5.1 to 3.5.2 and found that I couldn't authenticate to PyPI anymore. And then I remembered that this had been fixed, so removed the extra percent sign, and my uploads worked. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 07:49:58 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 11:49:58 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475840998.91.0.0718579600849.issue28376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Raising a DeprecationWarning in 3.6 doesn't hurt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 07:50:44 2016 From: report at bugs.python.org (Min RK) Date: Fri, 07 Oct 2016 11:50:44 +0000 Subject: [issue28384] hmac cannot be used with shake algorithms Message-ID: <1475841044.31.0.0614510494585.issue28384@psf.upfronthosting.co.za> New submission from Min RK: HMAC digest methods call inner.digest() with no arguments, but new-in-3.6 shake algorithms require a length argument. possible solutions: 1. add optional length argument to HMAC.[hex]digest, and pass through to inner hash object 2. set hmac.digest_size, and use that to pass through to inner hash object if inner hash object has digest_size == 0 3. give shake hashers a default value for `length` in digest methods (logically 32 for shake_256, 16 for shake_128, I think) test: import hmac, hashlib h = hmac.HMAC(b'secret', digestmod=hashlib.shake_256) h.hexdigest() # raises on self.inner.digest() requires length argument ---------- messages: 278235 nosy: minrk priority: normal severity: normal status: open title: hmac cannot be used with shake algorithms versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 08:21:59 2016 From: report at bugs.python.org (Meador Inge) Date: Fri, 07 Oct 2016 12:21:59 +0000 Subject: [issue28377] struct.unpack of Bool In-Reply-To: <1475759663.29.0.378814371853.issue28377@psf.upfronthosting.co.za> Message-ID: <1475842919.38.0.552749310819.issue28377@psf.upfronthosting.co.za> Meador Inge added the comment: Looks like a dup to me. ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 08:22:26 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 12:22:26 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475842946.05.0.569287349528.issue28376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: rangeiter_new() was added in r55167. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 08:23:42 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 12:23:42 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475843022.73.0.0592110417039.issue28376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And merged in a6eb6acfe04a. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 09:06:45 2016 From: report at bugs.python.org (Grzegorz Sikorski) Date: Fri, 07 Oct 2016 13:06:45 +0000 Subject: [issue28378] urllib2 does not handle cookies with `,` In-Reply-To: <1475766073.34.0.905667468742.issue28378@psf.upfronthosting.co.za> Message-ID: <1475845605.84.0.638698860452.issue28378@psf.upfronthosting.co.za> Grzegorz Sikorski added the comment: It looks urllib2 works with this scenario, but upper level request fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 09:14:03 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 07 Oct 2016 13:14:03 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1475846043.2.0.883911916558.issue28379@psf.upfronthosting.co.za> Xiang Zhang added the comment: v2 applies Serhiy's suggestions. ---------- Added file: http://bugs.python.org/file45001/PyUnicode_CopyCharacters_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 09:15:22 2016 From: report at bugs.python.org (Thomas Kluyver) Date: Fri, 07 Oct 2016 13:15:22 +0000 Subject: [issue28384] hmac cannot be used with shake algorithms In-Reply-To: <1475841044.31.0.0614510494585.issue28384@psf.upfronthosting.co.za> Message-ID: <1475846122.55.0.720587413463.issue28384@psf.upfronthosting.co.za> Changes by Thomas Kluyver : ---------- nosy: +takluyver _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 09:36:19 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Fri, 07 Oct 2016 13:36:19 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1475847379.64.0.34289042969.issue25720@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: I updated the patch that add configuration check for is_pad. the is_pad is wrapped into py_is_pad at Modules/_cursesmodule.c:932 by either of three ways. Case one -- is_pad is found: Define the macro that is simple wrapping. Case two -- is_pad is not found, however WINDOW has _flags field: Define the macro using _flags field. Case three -- is_pad is not found, and WINDOW doesn't have _flags field: Define the macro that is always preprocessed to FALSE. I succeeded to build curses module on Cygwin (Vista x86) using this patch. This patch doesn't include that undo fixes for specific platforms. ---------- versions: +Python 3.7 Added file: http://bugs.python.org/file45002/curses-is_pad.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 09:39:46 2016 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 07 Oct 2016 13:39:46 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1475847586.5.0.667024227418.issue25720@psf.upfronthosting.co.za> Ismail Donmez added the comment: @masamoto thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 10:07:17 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 07 Oct 2016 14:07:17 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1475849237.82.0.21039360704.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: fastfuture3-wip.patch is work in progress implementation of implementing __repr__ and __del__ in C. I post it to avoid duplicated works. Known TODOs: * Support overriding Future._repr_info() * Fix __del__ is not called (Research how tp_del, tp_finalize, and tp_deallocate works) I hope I have enough time to finish in next week, but I'm not sure. ---------- Added file: http://bugs.python.org/file45003/fastfuture3-wip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 10:28:40 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 07 Oct 2016 14:28:40 +0000 Subject: [issue28385] Non-informative exception while formatting strings. Message-ID: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> New submission from ???? ?????????: $ python3 -c "'{0:s}'.format(b'qwe')" Traceback (most recent call last): File "", line 1, in TypeError: non-empty format string passed to object.__format__ Spent many hours to detect bug in my code. ---------- components: Library (Lib) messages: 278244 nosy: mmarkk priority: normal severity: normal status: open title: Non-informative exception while formatting strings. versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 10:29:09 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 14:29:09 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1475850549.75.0.677869893004.issue25720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added a comment on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 10:35:47 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 07 Oct 2016 14:35:47 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: Message-ID: Guido van Rossum added the comment: I've meditated on this and I've changed my mind. A task that awaits itself is so obviously not following the task protocol that it should be shot on sight. No exceptions. (Only the task itself should ever set the result or exception, and *only* by returning or raising. So the only way a task waiting for itself could be unblocked is through cancellation, and there are better ways to wait forever until cancelled.) IOW @1st1 I think it's okay to detect this and raise an exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 11:04:43 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 15:04:43 +0000 Subject: [issue26906] format(object.__reduce__) fails intermittently In-Reply-To: <1462194444.45.0.679859267338.issue26906@psf.upfronthosting.co.za> Message-ID: <1475852683.96.0.730234637614.issue26906@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yet one demonstration of this bug: $ ./python -IS >>> import operator >>> operator.length_hint(iter("abc")) 0 >>> import collections.abc >>> operator.length_hint(iter("abc")) 3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 11:24:11 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Fri, 07 Oct 2016 15:24:11 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1475853851.45.0.0341872015537.issue25720@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Thanks masamoto! There's another minor issue about this patch: if there's no curses.h (ncurses built with --without-curses-h), the detection always fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 11:44:20 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Oct 2016 15:44:20 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1475855060.2.0.379490801446.issue28385@psf.upfronthosting.co.za> R. David Murray added the comment: Bytes don't support formatting codes, so they are passed through to object, which doesn't support any formatting codes, and produces the error message you see. Since all other built in types reject invalid codes with a message that mentions their type, I think bytes should too. This would change the message to: ValueError: Unknown format code 's' for object of type 'bytes' Would that have lessened your confusion sufficiently? ---------- nosy: +eric.smith, r.david.murray stage: -> needs patch title: Non-informative exception while formatting strings. -> Bytes objects should reject all formatting codes with an error message type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 11:56:19 2016 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 07 Oct 2016 15:56:19 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1475855779.9.0.288189865499.issue28385@psf.upfronthosting.co.za> Eric V. Smith added the comment: Yes, I think we should implement this for object.__format__. Marking as easy. ---------- components: +Interpreter Core -Library (Lib) keywords: +easy (C) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 12:00:31 2016 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 07 Oct 2016 16:00:31 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1475856031.88.0.813021660428.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: Sorry for not responding earlier. It's unlikely I'll have time for this before beta 2, although I can probably get to it after that and before beta 3. Don't let me stop someone else from improving on the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 12:29:00 2016 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 07 Oct 2016 16:29:00 +0000 Subject: [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal In-Reply-To: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> Message-ID: <1475857740.65.0.470001906923.issue28383@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 12:29:29 2016 From: report at bugs.python.org (Tim Graham) Date: Fri, 07 Oct 2016 16:29:29 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1475857769.65.0.409655311835.issue21720@psf.upfronthosting.co.za> Tim Graham added the comment: As far as I can tell, this isn't an issue on Python 3. Can this be closed since Python 2 is only receiving bug fixes now? ---------- nosy: +Tim.Graham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 12:30:07 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 07 Oct 2016 16:30:07 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475857807.66.0.590186376559.issue28315@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi Jaysinh, I reviewed your changes, they look good to me. I can't approve it, so it would still be good for a core dev here to take another pass. Thanks :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 12:38:44 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 07 Oct 2016 16:38:44 +0000 Subject: [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal In-Reply-To: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> Message-ID: <1475858324.98.0.165462113525.issue28383@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This makes sense. Note that this is the way hashes are implemented for the datetime objects: . ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 12:49:44 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Oct 2016 16:49:44 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1475858984.45.0.640611388853.issue21720@psf.upfronthosting.co.za> Berker Peksag added the comment: I think we can classify this one as a usability bug and improve the exception message. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 12:50:32 2016 From: report at bugs.python.org (Daniel Moisset) Date: Fri, 07 Oct 2016 16:50:32 +0000 Subject: [issue28386] Improve documentation about tzinfo.dst(None) Message-ID: <1475859032.48.0.21993169144.issue28386@psf.upfronthosting.co.za> New submission from Daniel Moisset: The datetime module documentation[1] describes the tzinfo.dst method with a single "dt" argument without being too explicit about possible values for it. The implication is that dt should be a datetime object, but the implementation of time.dst() [2] actually calls tz.dst(None) (where tz is an instance of some tzinfo subclass), so this should clarify that None is an allowed value. Also, some of the examples given below in the same document (like LocalTimezone, GMT1, GMT2) actually have a related bug (it doesn't handle a None value correctly). So running >>> ... # copy the example from the documentation >>> t = time(tzinfo=LocalTimeZone()) >>> t.dst() crashes with an AttributeError: 'NoneType' object has no attribute 'year'. This kind of bugs have propagated to some other projects already [2]. Some of the other examples (like USTimeZone) seem to be OK What I think would be desirable here is: * A clarification on https://docs.python.org/3.5/library/datetime.html#datetime.tzinfo.dst indicating that dt is either a datetime or a None, in which situations it can be None, and what is the method supposed to return in this case. * Fixes in the code examples that reflect this I would offer a patch, but I'm not quite sure of what the desired behaviour is so I wouldn't know what to document :) [1] https://docs.python.org/3.5/library/datetime.html [2] https://github.com/python/cpython/blob/master/Modules/_datetimemodule.c#L3623 [3] https://github.com/django/django/blob/1.10.2/django/utils/timezone.py#L111 ---------- assignee: docs at python components: Documentation messages: 278256 nosy: Daniel Moisset, docs at python priority: normal severity: normal status: open title: Improve documentation about tzinfo.dst(None) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 13:03:54 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 07 Oct 2016 17:03:54 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1475859834.16.0.471471230007.issue24452@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The patch looks good to me. (The test coverage for chrome browser can be improved. But that seems a like a different change than the current one). ---------- assignee: -> orsenthil nosy: +orsenthil versions: +Python 3.7 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 13:12:39 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Oct 2016 17:12:39 +0000 Subject: [issue28377] struct.unpack of Bool In-Reply-To: <1475759663.29.0.378814371853.issue28377@psf.upfronthosting.co.za> Message-ID: <1475860359.64.0.13472571508.issue28377@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> struct.unpack('?', '\x02') returns (False,) on Mac OSX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 13:37:41 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Oct 2016 17:37:41 +0000 Subject: [issue28386] Improve documentation about tzinfo.dst(None) In-Reply-To: <1475859032.48.0.21993169144.issue28386@psf.upfronthosting.co.za> Message-ID: <1475861861.37.0.809701867542.issue28386@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 13:55:11 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 07 Oct 2016 17:55:11 +0000 Subject: [issue28386] Improve documentation about tzinfo.dst(None) In-Reply-To: <1475859032.48.0.21993169144.issue28386@psf.upfronthosting.co.za> Message-ID: <1475862911.11.0.464319402428.issue28386@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: None is passed to tzinfo.dst() when it is called from time.dst() method. This is documented in the relevant section: . I am not sure whether if it is worth repeating in the abstract tzinfo class documentation, but if we do, the same should be done for the utcoffset() and tzname() methods which also get None when called from namesake time methods. While we are at it, we should also do something about "If utcoffset() does not return None, dst() should not return None either." mandate in the tzinfo.utcoffset() documentation. See . This mandate is violated by the datetime.timezone class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 14:23:23 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 07 Oct 2016 18:23:23 +0000 Subject: [issue28378] urllib2 does not handle cookies with `,` In-Reply-To: <1475766073.34.0.905667468742.issue28378@psf.upfronthosting.co.za> Message-ID: <1475864603.32.0.304347562918.issue28378@psf.upfronthosting.co.za> SilentGhost added the comment: Could you please post an example of what you're being sent from the server and how your code handles / fails to deal with it. ---------- nosy: +SilentGhost stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 14:28:53 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 07 Oct 2016 18:28:53 +0000 Subject: [issue28384] hmac cannot be used with shake algorithms In-Reply-To: <1475841044.31.0.0614510494585.issue28384@psf.upfronthosting.co.za> Message-ID: <1475864933.85.0.548244946723.issue28384@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Extension Modules nosy: +christian.heimes type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 14:54:33 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 07 Oct 2016 18:54:33 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1475866473.76.0.49316288525.issue28385@psf.upfronthosting.co.za> ???? ????????? added the comment: Yes, that message will be sufficient. Perfectly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 14:57:47 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Oct 2016 18:57:47 +0000 Subject: [issue24098] Multiple use after frees in obj2ast_* methods In-Reply-To: <1430489429.65.0.587999729774.issue24098@psf.upfronthosting.co.za> Message-ID: <20161007185744.82459.29108.7FD1053A@psf.io> Roundup Robot added the comment: New changeset 47d5bf5a846f by Serhiy Storchaka in branch '2.7': Issue #24098: Fixed possible crash when AST is changed in process of https://hg.python.org/cpython/rev/47d5bf5a846f New changeset f575710b5f56 by Serhiy Storchaka in branch '3.5': Issue #24098: Fixed possible crash when AST is changed in process of https://hg.python.org/cpython/rev/f575710b5f56 New changeset 7528154cadaa by Serhiy Storchaka in branch '3.6': Issue #24098: Fixed possible crash when AST is changed in process of https://hg.python.org/cpython/rev/7528154cadaa New changeset def217aaad2f by Serhiy Storchaka in branch 'default': Issue #24098: Fixed possible crash when AST is changed in process of https://hg.python.org/cpython/rev/def217aaad2f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 15:25:25 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Oct 2016 19:25:25 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <20161007192521.17510.98758.C241E2E6@psf.io> Roundup Robot added the comment: New changeset 005704f5634f by Serhiy Storchaka in branch '3.5': Issue #26293: Fixed writing ZIP files that starts not from the start of the https://hg.python.org/cpython/rev/005704f5634f New changeset b06e75ae1981 by Serhiy Storchaka in branch '3.6': Issue #26293: Fixed writing ZIP files that starts not from the start of the https://hg.python.org/cpython/rev/b06e75ae1981 New changeset 64a19fe3a16a by Serhiy Storchaka in branch 'default': Issue #26293: Fixed writing ZIP files that starts not from the start of the https://hg.python.org/cpython/rev/64a19fe3a16a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 15:32:57 2016 From: report at bugs.python.org (Sebastian Cufre) Date: Fri, 07 Oct 2016 19:32:57 +0000 Subject: [issue28387] double free in io.TextIOWrapper Message-ID: <1475868777.61.0.59647562301.issue28387@psf.upfronthosting.co.za> New submission from Sebastian Cufre: We have found that you can produce a crash when an instance of _io.TextIOWrapper is being deallocated while there's another thread invoking the garbage collector. I've attached a simple script that should reproduce the issue (textiowrapper_crash.py) Looking at the code of the _io module, we found that on the dealloc method of the TextIOWrapper class, it first tries to invoke the close method, then releases its internal members, after that removes itself from the garbage collector tracking and finally frees deallocates the remaining stuff. What happens, is that while releasing it's internal members, it might end up calling code that releases the interpreter lock (because its doing an operating system call), letting other threads execute. If for example the thread that comes in, invokes the garbage collector, on debug will raise an assert on gcmodule.c on line 351, where I understand it is complaining that it is tracking an object with refcount 0. In a release build, I suppose this goes on and will end up releasing the object (given it has a refcount of 0), and when the interrupted dealloc thread continues will end up freeing again itself which at some point produces a crash. Attached is a proposed fix for the issue in textio.c.patch, where the it the call to _PyObject_GC_UNTRACK is now done right after the call to the close method and before release its internal members. As a reference we have been able to reproduce this with Python 2.7.12 on Windows (i386) ---------- components: Extension Modules files: textiowrapper_crash.py messages: 278263 nosy: scufre priority: normal severity: normal status: open title: double free in io.TextIOWrapper type: crash versions: Python 2.7 Added file: http://bugs.python.org/file45004/textiowrapper_crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 15:33:52 2016 From: report at bugs.python.org (Sebastian Cufre) Date: Fri, 07 Oct 2016 19:33:52 +0000 Subject: [issue28387] double free in io.TextIOWrapper In-Reply-To: <1475868777.61.0.59647562301.issue28387@psf.upfronthosting.co.za> Message-ID: <1475868832.28.0.179404574426.issue28387@psf.upfronthosting.co.za> Changes by Sebastian Cufre : ---------- keywords: +patch Added file: http://bugs.python.org/file45005/textio.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:13:15 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Oct 2016 20:13:15 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <20161007201312.15207.65536.87EDF16D@psf.io> Roundup Robot added the comment: New changeset 9a99a88301ef by Serhiy Storchaka in branch '2.7': Issue #26293: Fixed writing ZIP files that starts not from the start of the https://hg.python.org/cpython/rev/9a99a88301ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:15:03 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 20:15:03 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1475871303.79.0.433592715267.issue26293@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report and testing. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:17:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 20:17:38 +0000 Subject: [issue28387] double free in io.TextIOWrapper In-Reply-To: <1475868777.61.0.59647562301.issue28387@psf.upfronthosting.co.za> Message-ID: <1475871458.12.0.97546819832.issue28387@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +IO nosy: +benjamin.peterson, serhiy.storchaka, stutzbach priority: normal -> high stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:27:12 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Oct 2016 20:27:12 +0000 Subject: [issue18287] PyType_Ready() should sanity-check the tp_name field In-Reply-To: <1372000372.42.0.425313116494.issue18287@psf.upfronthosting.co.za> Message-ID: <20161007202707.1506.49592.4AF4BD59@psf.io> Roundup Robot added the comment: New changeset 5c459b0f2b75 by Serhiy Storchaka in branch '3.5': Issue #18287: PyType_Ready() now checks that tp_name is not NULL. https://hg.python.org/cpython/rev/5c459b0f2b75 New changeset ba76dd106e66 by Serhiy Storchaka in branch '2.7': Issue #18287: PyType_Ready() now checks that tp_name is not NULL. https://hg.python.org/cpython/rev/ba76dd106e66 New changeset 0b726193ec3c by Serhiy Storchaka in branch '3.6': Issue #18287: PyType_Ready() now checks that tp_name is not NULL. https://hg.python.org/cpython/rev/0b726193ec3c New changeset a60d0e80cc1d by Serhiy Storchaka in branch 'default': Issue #18287: PyType_Ready() now checks that tp_name is not NULL. https://hg.python.org/cpython/rev/a60d0e80cc1d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:28:15 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 20:28:15 +0000 Subject: [issue18287] PyType_Ready() should sanity-check the tp_name field In-Reply-To: <1372000372.42.0.425313116494.issue18287@psf.upfronthosting.co.za> Message-ID: <1475872095.27.0.0549609256994.issue18287@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Niklas for your report and patch. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:35:24 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Oct 2016 20:35:24 +0000 Subject: [issue28257] Regression for star argument parameter error messages In-Reply-To: <1474631746.14.0.840095421551.issue28257@psf.upfronthosting.co.za> Message-ID: <20161007203521.1569.31527.D8207CA9@psf.io> Roundup Robot added the comment: New changeset 35676cd72352 by Serhiy Storchaka in branch '3.5': Issue #28257: Improved error message when pass a non-mapping as a var-keyword https://hg.python.org/cpython/rev/35676cd72352 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:36:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 20:36:17 +0000 Subject: [issue28257] Regression for star argument parameter error messages In-Reply-To: <1474631746.14.0.840095421551.issue28257@psf.upfronthosting.co.za> Message-ID: <1475872577.41.0.567448264178.issue28257@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:40:12 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 20:40:12 +0000 Subject: [issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest) In-Reply-To: <1449078273.26.0.535537969115.issue25783@psf.upfronthosting.co.za> Message-ID: <1475872812.81.0.156301499259.issue25783@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:37:29 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 20:37:29 +0000 Subject: [issue24098] Multiple use after frees in obj2ast_* methods In-Reply-To: <1430489429.65.0.587999729774.issue24098@psf.upfronthosting.co.za> Message-ID: <1475872649.75.0.382984495285.issue24098@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:47:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Oct 2016 20:47:41 +0000 Subject: [issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest) In-Reply-To: <1449078273.26.0.535537969115.issue25783@psf.upfronthosting.co.za> Message-ID: <20161007204737.75793.41675.BDD86124@psf.io> Roundup Robot added the comment: New changeset 8d150de9edba by Serhiy Storchaka in branch '3.5': Issue #25783: Fixed test_traceback when run directly (without regrtest). https://hg.python.org/cpython/rev/8d150de9edba New changeset 4646b64139c9 by Serhiy Storchaka in branch '3.6': Issue #25783: Fixed test_traceback when run directly (without regrtest). https://hg.python.org/cpython/rev/4646b64139c9 New changeset 696851f38c93 by Serhiy Storchaka in branch 'default': Issue #25783: Fixed test_traceback when run directly (without regrtest). https://hg.python.org/cpython/rev/696851f38c93 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:48:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 20:48:21 +0000 Subject: [issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest) In-Reply-To: <1449078273.26.0.535537969115.issue25783@psf.upfronthosting.co.za> Message-ID: <1475873301.36.0.148857024197.issue25783@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:52:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 20:52:19 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1475873539.18.0.921492630672.issue28379@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 16:54:08 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Oct 2016 20:54:08 +0000 Subject: [issue28317] Improve support of FORMAT_VALUE in dis In-Reply-To: <1475245280.55.0.378844922584.issue28317@psf.upfronthosting.co.za> Message-ID: <1475873648.5.0.0346511710229.issue28317@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 17:31:29 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Oct 2016 21:31:29 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1475875889.59.0.596190336865.issue21720@psf.upfronthosting.co.za> Berker Peksag added the comment: Here's a patch to demonstrate what I meant in msg226047. Example from the REPL: >>> __import__('encodings', fromlist=[u'aliases']) Traceback (most recent call last): File "", line 1, in TypeError: Item in ``from list'' must be str, not unicode ---------- Added file: http://bugs.python.org/file45006/issue21720.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 17:37:22 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Oct 2016 21:37:22 +0000 Subject: [issue28326] multiprocessing.Process depends on sys.stdout being open In-Reply-To: <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za> Message-ID: <1475876242.15.0.241070077348.issue28326@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Patch looks plausible to me. The flush calls definitely need to be guarded. ---------- nosy: +terry.reedy stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 17:47:44 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Oct 2016 21:47:44 +0000 Subject: [issue28331] "CPython implementation detail:" removed when content translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475876864.68.0.507427484651.issue28331@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I abbreviated title to make most of it visible in listings. ---------- nosy: +terry.reedy title: "CPython implementation detail:" is removed when contents is translated -> "CPython implementation detail:" removed when content translated _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 17:51:14 2016 From: report at bugs.python.org (Tiago Antao) Date: Fri, 07 Oct 2016 21:51:14 +0000 Subject: [issue28326] multiprocessing.Process depends on sys.stdout being open In-Reply-To: <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za> Message-ID: <1475877074.63.0.185017485089.issue28326@psf.upfronthosting.co.za> Tiago Antao added the comment: This is the first patch that I am submitting. More than willing to do any changes deemed necessary... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 17:51:43 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Oct 2016 21:51:43 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1475877103.93.0.812025932601.issue28333@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Same output with cp437. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 17:52:48 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Oct 2016 21:52:48 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1475877168.8.0.350938483042.issue28333@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is a regression from 3.5.2, where input("?") displays "?". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 18:07:01 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Oct 2016 22:07:01 +0000 Subject: [issue28334] netrc does not work if $HOME is not set In-Reply-To: <1475336154.44.0.44449733804.issue28334@psf.upfronthosting.co.za> Message-ID: <1475878021.21.0.819021492169.issue28334@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On Windows, HOME is both split into two variables and replaced by USERPROFILE. C:\Users\Terry>set HOME HOMEDRIVE=C: HOMEPATH=\Users\Terry C:\Users\Terry>set USERPROFILE USERPROFILE=C:\Users\Terry So if it make sense to run this on Windows*, I would call it a bug. * I am guessing that Windows' FTP clients do not use .netrc. The doc says "the file .netrc in the user?s home directory will be read." without qualification by "if $HOME is set". I don't remember how os.path.expanduser might otherwise find the home directory on unix and don't know what unix users might reasonbly expect. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 18:08:01 2016 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Oct 2016 22:08:01 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1475878081.73.0.350469748868.issue28333@psf.upfronthosting.co.za> Steve Dower added the comment: This may force issue17620 into 3.6 - we really ought to be getting and using sys.stdin and sys.stderr in PyOS_StdioReadline() rather than going directly to the raw streams. The problem here is that we're still using fprintf to output the prompt, even though we know (assume) the input is utf-8. I haven't looked closely at how safely we can use Python objects from this code, except to see that it's not obviously safe, but we should really figure out how to deal in Python str rather than C char* for the default readline implementation (and then only fall back on the GNU protocol when someone asks for it). The faster fix here would be to decode the prompt from utf-8 to utf-16-le in PyOS_StdioReadline and then write it using a wide-char output function. ---------- keywords: +3.5regression stage: -> needs patch versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 18:12:42 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Oct 2016 22:12:42 +0000 Subject: [issue28340] TextIOWrapper.tell extremely slow In-Reply-To: <1475423487.6.0.338998508065.issue28340@psf.upfronthosting.co.za> Message-ID: <1475878362.11.0.497810511718.issue28340@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I suggest that you try backporting the patch to 2.7 and and/or ask on #11114 whether there was a positive reason not to do so (and mention that you opened this issue to do so). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 18:21:51 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Oct 2016 22:21:51 +0000 Subject: [issue28352] winfo_pathname(..) | window id "xyz" doesn't exist in this application. | Python 3.4.4 In-Reply-To: <1475546631.28.0.75775044978.issue28352@psf.upfronthosting.co.za> Message-ID: <1475878911.75.0.0905616917039.issue28352@psf.upfronthosting.co.za> Terry J. Reedy added the comment: At least give a minimal but complete example that works in 3.4.1 but fails in 3.4.4. What you put in the title in not valid syntax. ---------- nosy: +serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 18:23:33 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Oct 2016 22:23:33 +0000 Subject: [issue28367] Add more standard baud rate constants to "termios" In-Reply-To: <1475695367.16.0.283640170005.issue28367@psf.upfronthosting.co.za> Message-ID: <1475879013.96.0.502513341048.issue28367@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> patch review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 18:28:59 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 07 Oct 2016 22:28:59 +0000 Subject: [issue28100] Refactor error messages in symtable.c In-Reply-To: <1473680584.21.0.216530190248.issue28100@psf.upfronthosting.co.za> Message-ID: <1475879339.8.0.764939573879.issue28100@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 18:31:29 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 07 Oct 2016 22:31:29 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1475879489.12.0.303318662464.issue28339@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Since the quick fix is now applied, I think it should not be a release blocker any more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 18:32:54 2016 From: report at bugs.python.org (Eryk Sun) Date: Fri, 07 Oct 2016 22:32:54 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1475879574.69.0.283966666828.issue28333@psf.upfronthosting.co.za> Eryk Sun added the comment: When I pointed this issue out in code reviews, I assumed you would add the relatively simple fix to decode the prompt and call WriteConsoleW. The long-term fix in issue 17620 has to be worked out with cross-platform support, and ISTM that it can wait for 3.7. Off topic: I just noticed that you're not calling PyOS_InputHook in the new PyOS_StdioReadline code. Tkinter registers this function pointer to call its EventHook. Do you want a separate issue for this, or is there a reason its was omitted? ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 18:41:00 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Oct 2016 22:41:00 +0000 Subject: [issue28374] SyntaxError: invalid token in python2.7/test/test_grammar.py In-Reply-To: <1475748803.26.0.293864566162.issue28374@psf.upfronthosting.co.za> Message-ID: <1475880060.12.0.767118135503.issue28374@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The absence of a space is intentional. See #21642. Fix applied 2014-06-07. Hence Berker's guesses. def test_float_exponent_tokenization(self): # See issue 21642. self.assertEqual(1 if 1else 0, 1) self.assertEqual(1 if 0else 0, 0) self.assertRaises(SyntaxError, eval, "0 if 1Else 0") On Windows, test passes for 2.7.12 both installed and locally compiled. This said, it is possible that there is a compilation problem on some system, especially one that does not match a buildbot. We can re-open if this is the case. ---------- nosy: +terry.reedy status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 19:56:54 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 07 Oct 2016 23:56:54 +0000 Subject: [issue28388] Update documentation for typing module Message-ID: <1475884610.88.0.342172022706.issue28388@psf.upfronthosting.co.za> New submission from Ivan Levkivskyi: Here is the patch with updates according to recent changes in typing module and PEP 484: - most things are not classes now - outcome of parameterizing generics is cached - Union does not unify everything with Any - few minor fixes This patch also fixes http://bugs.python.org/issue27588 The attached patch is generated for 3.5 ---------- assignee: docs at python components: Documentation files: doc-typing-patch.diff keywords: patch messages: 278283 nosy: docs at python, gvanrossum, levkivskyi priority: normal severity: normal status: open title: Update documentation for typing module versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file45007/doc-typing-patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 21:01:17 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 08 Oct 2016 01:01:17 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1475888477.59.0.737077139889.issue28333@psf.upfronthosting.co.za> Eryk Sun added the comment: I'm sure Steve already has this covered, but FWIW here's a patch to call WriteConsoleW. Here's the result with the patch applied: >>> sys.ps1 = '??? ' ??? input("????: ") ????: spam 'spam' and with interactive stdin and stdout/stderr redirected to a file: >set PYTHONIOENCODING=utf-8 >amd64\python_d.exe >out.txt 2>&1 input("????: ") spam ^Z >chcp 65001 Active code page: 65001 >type out.txt Python 3.6.0b1+ (default, Oct 7 2016, 23:47:58) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> ????: 'spam' >>> If it can't write the prompt for some reason (e.g. out of memory, decoding fails, WriteConsole fails), it doesn't fall back on fprintf to write the prompt. Should it? This should also get a test that calls ReadConsoleOutputCharacter to verify that the correct prompt is written. ---------- keywords: +patch Added file: http://bugs.python.org/file45008/issue_28333_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 03:23:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 07:23:24 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475911404.35.0.345034906028.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Hmm, tests are passed on some Windows buildbots, but failed on others. http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/1631/steps/test/logs/stdio ====================================================================== ERROR: test_walk_topdown (test.test_os.BytesWalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_os.py", line 890, in test_walk_topdown all = list(self.walk(self.walk_path)) File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_os.py", line 1055, in walk for broot, bdirs, bfiles in os.walk(os.fsencode(top), **kwargs): File "D:\buildarea\3.x.bolen-windows10\build\lib\os.py", line 409, in walk yield from walk(new_path, topdown, onerror, followlinks) File "D:\buildarea\3.x.bolen-windows10\build\lib\os.py", line 367, in walk is_dir = entry.is_dir() TypeError: bad argument type for built-in operation ---------------------------------------------------------------------- The error message is not very informative. Seems like some C API function takes an argument of wrong type (e.g. bytes instead of unicode). ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 03:53:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 07:53:17 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475913197.92.0.109867672445.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suppose the following patch should fix the issue. Could anybody please test it on Windows? ---------- assignee: docs at python -> serhiy.storchaka stage: needs patch -> patch review Added file: http://bugs.python.org/file45009/direntry_bytes_path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 05:27:56 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 09:27:56 +0000 Subject: [issue26906] Special method lookup fails on unitialized types In-Reply-To: <1462194444.45.0.679859267338.issue26906@psf.upfronthosting.co.za> Message-ID: <1475918876.36.0.184677815828.issue26906@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: format(object.__reduce__) fails intermittently -> Special method lookup fails on unitialized types _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 05:28:54 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 09:28:54 +0000 Subject: [issue26906] Special method lookup fails on unitialized types In-Reply-To: <1462194444.45.0.679859267338.issue26906@psf.upfronthosting.co.za> Message-ID: <20161008092851.1758.25979.3C7A5FEB@psf.io> Roundup Robot added the comment: New changeset bbaf6c928526 by Serhiy Storchaka in branch '3.5': Issue #26906: Resolving special methods of uninitialized type now causes https://hg.python.org/cpython/rev/bbaf6c928526 New changeset 3119f08802a5 by Serhiy Storchaka in branch '2.7': Issue #26906: Resolving special methods of uninitialized type now causes https://hg.python.org/cpython/rev/3119f08802a5 New changeset 888a26fac9d2 by Serhiy Storchaka in branch '3.6': Issue #26906: Resolving special methods of uninitialized type now causes https://hg.python.org/cpython/rev/888a26fac9d2 New changeset d24f1467a297 by Serhiy Storchaka in branch 'default': Issue #26906: Resolving special methods of uninitialized type now causes https://hg.python.org/cpython/rev/d24f1467a297 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 05:35:24 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 09:35:24 +0000 Subject: [issue28317] Improve support of FORMAT_VALUE in dis In-Reply-To: <1475245280.55.0.378844922584.issue28317@psf.upfronthosting.co.za> Message-ID: <20161008093521.79510.31136.E5DA03C6@psf.io> Roundup Robot added the comment: New changeset 5e81d14a52f7 by Serhiy Storchaka in branch '3.6': Issue #28317: The disassembler now decodes FORMAT_VALUE argument. https://hg.python.org/cpython/rev/5e81d14a52f7 New changeset 085944763f3a by Serhiy Storchaka in branch 'default': Issue #28317: The disassembler now decodes FORMAT_VALUE argument. https://hg.python.org/cpython/rev/085944763f3a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 05:35:45 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 09:35:45 +0000 Subject: [issue28317] Improve support of FORMAT_VALUE in dis In-Reply-To: <1475245280.55.0.378844922584.issue28317@psf.upfronthosting.co.za> Message-ID: <1475919345.23.0.284116223712.issue28317@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 06:53:37 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 10:53:37 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1475924017.95.0.167339403159.issue28214@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What error messages you want for these cases? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 06:55:55 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 08 Oct 2016 10:55:55 +0000 Subject: [issue26906] Special method lookup fails on unitialized types In-Reply-To: <1462194444.45.0.679859267338.issue26906@psf.upfronthosting.co.za> Message-ID: <1475924155.08.0.734103357218.issue26906@psf.upfronthosting.co.za> Oren Milman added the comment: (Just to save time for anyone interested) The last demonstration of the bug Serhiy mentioned is caused by the following (this was right only until Serhiy's patch earlier today): - before importing collections.abc, str_iterator is not initialized, which means: * Its tp_mro is NULL. * _PyType_Lookup returns NULL (when called to lookup __length_hint__ in str_iterator (as part of operator.length_hint)) - on import, collections.abc also does 'Iterator.register(str_iterator)', which leads to the following call chain: ABCMeta.register(Iterator, str_iterator) => issubclass(str_iterator, Iterator) => PyObject_IsSubclass(str_iterator, Iterator) => Iterator.__subclasscheck__(Iterator, str_iterator) => Iterator.__subclasshook__(str_iterator) => collections.abc._check_methods(str_iterator, '__iter__', '__next__') And _check_methods first does 'mro = C.__mro__', which ultimately calls type_getattro (which calls PyType_Ready in case tp_dict is NULL). Anyway, with regard to the disconcerting comment: /* If mro is NULL, the type is either not yet initialized by PyType_Ready(), or already cleared by type_clear(). Either way the safest thing to do is to return NULL. */ Sorry for the newbie question, but why not add a Py_TPFLAGS_CLEARED flag to tp_flags? Then we could assert in _PyType_Lookup (and maybe also in other places that call PyType_Ready, such as type_getattro) that the Py_TPFLAGS_CLEARED is not set.. I realize adding such a flag is really a big deal, but maybe it's worth catching sneaky bugs caused by Python's equivalent of Use-After-Free bugs? ---------- nosy: +Oren Milman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 07:53:34 2016 From: report at bugs.python.org (Attila Vangel) Date: Sat, 08 Oct 2016 11:53:34 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work Message-ID: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> New submission from Attila Vangel: Go to https://docs.python.org/3/library/xmlrpc.client.html Under '21.26.8. Example of Client Usage' -> 'To access an XML-RPC server through a HTTP proxy, you need to define a custom transport. The following example shows how:' copy the example code to a .py file (for me it is easier than REPL), e.g. xmlrpc_client_http_proxy_test.py This is the example code: import xmlrpc.client, http.client class ProxiedTransport(xmlrpc.client.Transport): def set_proxy(self, proxy): self.proxy = proxy def make_connection(self, host): self.realhost = host h = http.client.HTTPConnection(self.proxy) return h def send_request(self, connection, handler, request_body, debug): connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler)) def send_host(self, connection, host): connection.putheader('Host', self.realhost) p = ProxiedTransport() p.set_proxy('proxy-server:8080') server = xmlrpc.client.ServerProxy('http://time.xmlrpc.com/RPC2', transport=p) print(server.currentTime.getCurrentTime()) I changed the 'proxy-server:8080' to '10.144.1.11:8080' which is a valid HTTP/HTTPS proxy in company I work for. Try to run this code: $ python3 xmlrpc_client_http_proxy_test.py Traceback (most recent call last): File "xmlrpc_client_http_proxy_test.py", line 21, in print(server.currentTime.getCurrentTime()) File "/usr/lib/python3.5/xmlrpc/client.py", line 1092, in __call__ return self.__send(self.__name, args) File "/usr/lib/python3.5/xmlrpc/client.py", line 1432, in __request verbose=self.__verbose File "/usr/lib/python3.5/xmlrpc/client.py", line 1134, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib/python3.5/xmlrpc/client.py", line 1146, in single_request http_conn = self.send_request(host, handler, request_body, verbose) File "xmlrpc_client_http_proxy_test.py", line 13, in send_request connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler)) AttributeError: 'str' object has no attribute 'putrequest' Personally I don't like the idea of putting this amount of code to documentation: - as it seems, without automated tests running it, the code seems to rot, and gets outdated - I need to paste this boilerplate code to my application if I want this functionality. IMHO it would be much better to move this ProxiedTransport example code (after fixing it) to e.g. xmlrpc.client.HttpProxyTransport (or similar name) class. Details about python3: $ python3 Python 3.5.2 (default, Sep 10 2016, 08:21:44) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ---------- assignee: docs at python components: Documentation files: xmlrpc_client_http_proxy_test.py messages: 278291 nosy: avangel, docs at python priority: normal severity: normal status: open title: xmlrpc.client HTTP proxy example code does not work type: crash versions: Python 3.5 Added file: http://bugs.python.org/file45010/xmlrpc_client_http_proxy_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 08:02:18 2016 From: report at bugs.python.org (Attila Vangel) Date: Sat, 08 Oct 2016 12:02:18 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475928138.86.0.766199801505.issue28389@psf.upfronthosting.co.za> Attila Vangel added the comment: I tested it also on Python 3.4.3. I got the same error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 08:02:47 2016 From: report at bugs.python.org (Attila Vangel) Date: Sat, 08 Oct 2016 12:02:47 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475928167.57.0.453164158751.issue28389@psf.upfronthosting.co.za> Changes by Attila Vangel : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 08:08:27 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Oct 2016 12:08:27 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1475928507.83.0.251210702996.issue28385@psf.upfronthosting.co.za> Berker Peksag added the comment: Here's a patch. Changes in test_builtin might be redundant, but I added them anyway. ---------- keywords: +patch nosy: +berker.peksag stage: needs patch -> patch review Added file: http://bugs.python.org/file45011/issue28385.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 08:29:44 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 08 Oct 2016 12:29:44 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1475929784.72.0.777860195705.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: Fixed overriding Future._repr_info(). But I failed to implement overridable Future.__del__ in C yet. (FYI, fastfuture2.patch passes tests by mix-in __del__ and __repr__) ---------- Added file: http://bugs.python.org/file45012/fastfuture3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 08:32:23 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 08 Oct 2016 12:32:23 +0000 Subject: [issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict In-Reply-To: <1473351940.28.0.277088210884.issue28023@psf.upfronthosting.co.za> Message-ID: <1475929943.59.0.0821698254005.issue28023@psf.upfronthosting.co.za> INADA Naoki added the comment: Could someone review this before 3.6b2? Without this patch, python-gdb.py causes many RuntimeError. ---------- keywords: +needs review stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 08:59:14 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 08 Oct 2016 12:59:14 +0000 Subject: [issue28390] Wrong heading levels in whatsnew/3.6 Message-ID: <1475931554.95.0.299802036089.issue28390@psf.upfronthosting.co.za> New submission from SilentGhost: Couple of headings in whatsnew/3.6.rst have wrong level. The patch fixes this. ---------- assignee: docs at python components: Documentation files: headings.diff keywords: patch messages: 278296 nosy: SilentGhost, docs at python priority: normal severity: normal stage: patch review status: open title: Wrong heading levels in whatsnew/3.6 type: behavior versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45013/headings.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 09:04:59 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Oct 2016 13:04:59 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475931899.62.0.274969497406.issue28389@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. Can you try the attached script? ---------- nosy: +berker.peksag Added file: http://bugs.python.org/file45014/proxy.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 09:15:48 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 13:15:48 +0000 Subject: [issue28390] Wrong heading levels in whatsnew/3.6 In-Reply-To: <1475931554.95.0.299802036089.issue28390@psf.upfronthosting.co.za> Message-ID: <20161008131543.79751.77805.082269CF@psf.io> Roundup Robot added the comment: New changeset 3ee15bd35902 by Berker Peksag in branch '3.6': Issue #28390: Fix header levels in whatsnew/3.6.rst https://hg.python.org/cpython/rev/3ee15bd35902 New changeset 43b1b3c883ff by Berker Peksag in branch 'default': Issue #28390: Merge from 3.6 https://hg.python.org/cpython/rev/43b1b3c883ff ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 09:16:17 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Oct 2016 13:16:17 +0000 Subject: [issue28390] Wrong heading levels in whatsnew/3.6 In-Reply-To: <1475931554.95.0.299802036089.issue28390@psf.upfronthosting.co.za> Message-ID: <1475932577.81.0.092573838328.issue28390@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 09:33:00 2016 From: report at bugs.python.org (Attila Vangel) Date: Sat, 08 Oct 2016 13:33:00 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475933580.85.0.235195143592.issue28389@psf.upfronthosting.co.za> Attila Vangel added the comment: Hi, thx for the quick turnaround. I tried the proxy.py (on python 3.5) of course replacing 'YOUR_PROXY' with '10.144.1.11:8080' according to my environment. python3 proxy.py Traceback (most recent call last): File "proxy.py", line 27, in print(server.examples.getStateName(41)) File "/usr/lib/python3.5/xmlrpc/client.py", line 1092, in __call__ return self.__send(self.__name, args) File "/usr/lib/python3.5/xmlrpc/client.py", line 1432, in __request verbose=self.__verbose File "/usr/lib/python3.5/xmlrpc/client.py", line 1134, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib/python3.5/xmlrpc/client.py", line 1147, in single_request resp = http_conn.getresponse() File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse response.begin() File "/usr/lib/python3.5/http/client.py", line 297, in begin version, status, reason = self._read_status() File "/usr/lib/python3.5/http/client.py", line 258, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.5/socket.py", line 575, in readinto return self._sock.recv_into(b) ConnectionResetError: [Errno 104] Connection reset by peer However, meanwhile I studied a bit the http.client API on how to use HTTP proxy, and I found set_tunnel() can do it. I had success by only overriding make_connection() in ProxiedTransport: - copy current code of make_connection() from xmlrpc.client.Transport to ProxiedTransport (NOTE, this itself violates the DRY principle, but there is no better way to do it), change it slightly: - create HTTPSConnection to the proxy (as I wanted to access a https URL) - use .set_tunnel(chost) on this connection I did not want to paste the code here, because - I did not want to fill the 'PSF Contributor Agreement', at least yet - it may be Python version specific solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 09:48:52 2016 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 08 Oct 2016 13:48:52 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1475934532.83.0.607374136021.issue28385@psf.upfronthosting.co.za> Eric V. Smith added the comment: I left a comment on Rietveld, but repeating it here because for me those messages often go to spam: I think you want to make this more general, by modifying the message for the TypeError that follows. Any type that doesn't provide it's own __format__ should produce an error when using a non-empty format string. For example: >>> format({}, 'a') Traceback (most recent call last): File "", line 1, in TypeError: non-empty format string passed to object.__format__ Would be better as: TypeError: non-empty format string passed to __format__ for object of type "class <'dict'>" (Or some prettier way to print out the type). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 10:06:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 14:06:52 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1475935612.73.0.76805261278.issue28385@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, but it looks to me that issue28385.diff solves wrong issue. The issue is not in bytes, but in default __format__. object.__format__ should raise an error message that contains the name of the actual type. There are other issues with object.__format__, following patch tries to solve them. 1. Error message now contains the name of the actual type. 2. Format spec is checked before converting the value to str. Converting bytes and bytearray to str can raise a BytesWarning, and it is better if the type of this error doesn't depend on the -b option. 3. Since format spec is always empty, avoid calling PyObject_Format(). In theory PyObject_Str() can raise a subclass of str with non-trivial __format__, but I think we can ignore this subtle behavior difference. ---------- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file45015/object___format__.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 10:16:29 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Sat, 08 Oct 2016 14:16:29 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1475936189.41.0.490641562243.issue25720@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: Added comment in review. Yen, I tried to build without curses.h file (overwrite to ncurses.h). It was failed on checking header. Hence, I confirmed curses headers on Cygwin and Ubuntu. I found out that curses.h includes the directive "#include ". And unctrl.h has "#include ". Therefore, I think that some platforms require curses.h. Would you confirm your platform curses library? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 10:43:42 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 14:43:42 +0000 Subject: [issue26906] Special method lookup fails on uninitialized types In-Reply-To: <1462194444.45.0.679859267338.issue26906@psf.upfronthosting.co.za> Message-ID: <1475937822.26.0.763870597465.issue26906@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Special method lookup fails on unitialized types -> Special method lookup fails on uninitialized types _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 11:14:39 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Oct 2016 15:14:39 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475939679.81.0.071180837558.issue28389@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks. I guess your solution was similar to the attached patch? ---------- keywords: +patch stage: -> patch review type: crash -> behavior versions: +Python 3.6, Python 3.7 -Python 3.4 Added file: http://bugs.python.org/file45016/issue28389.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 11:29:44 2016 From: report at bugs.python.org (Attila Vangel) Date: Sat, 08 Oct 2016 15:29:44 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475940584.2.0.904238671288.issue28389@psf.upfronthosting.co.za> Attila Vangel added the comment: It's my pleasure. It was somewhat similar: - the set_proxy() is the same - for the make_connection() I gave the necessary clues, so one can create the code and you can use that in a way that I don't have to spend time on the PSF Contributor Agreement - overriding send_request() is not necessary at all, because the HTTP proxying is done in http.client level ---------- type: behavior -> crash versions: +Python 3.4 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 11:37:02 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Oct 2016 15:37:02 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475941022.96.0.0507071945608.issue28389@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- type: crash -> behavior versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:19:26 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 08 Oct 2016 16:19:26 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475943566.78.0.230283886952.issue27998@psf.upfronthosting.co.za> Eryk Sun added the comment: Here's an alternative patch, using PyUnicode_FSDecoder. It also adds path_object_error and path_object_error2 helper functions. ---------- Added file: http://bugs.python.org/file45017/issue_27998_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:25:17 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 08 Oct 2016 16:25:17 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475943917.43.0.822199716647.issue28376@psf.upfronthosting.co.za> Oren Milman added the comment: The diff files for 3.6 and 3.7 are attached (named '*ver3.diff'). Changes: - in 3.6, added: * raising a DeprecationWarning in rangeiter_new * a test to verify the DeprecationWarning is raised - in 3.7: * changed the tests so they would only verify a TypeError is raised when calling either range_iterator or longrange_iterator * removed the test.support.cpython_only decorator of the test The output of 'python_d.exe -m test -j3' for each version is also attached (they were both successful). ---------- Added file: http://bugs.python.org/file45018/issue28376_CPython36_ver3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:25:40 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 08 Oct 2016 16:25:40 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475943940.78.0.417437922086.issue28376@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file45019/issue28376_CPython37_ver3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:26:16 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 08 Oct 2016 16:26:16 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475943976.94.0.680563821992.issue28376@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file45020/patchedCPython36TestOutput_ver3.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:26:49 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 08 Oct 2016 16:26:49 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475944009.75.0.573975719485.issue28376@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file45021/patchedCPython37TestOutput_ver3.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:31:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 16:31:27 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475944287.69.0.794495901899.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Eryk. The patch LGTM. Did you tested that it fixes tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:44:09 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 16:44:09 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475945049.3.0.23996359615.issue28376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Oren. Patches for 3.5 and 3.7 LGTM, the patch for 3.6 should be fixed. Tests should pass with -Wa and -We. No need to attach test output. Just check that your patch doesn't add a regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:48:30 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 08 Oct 2016 16:48:30 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475945310.53.0.0956793986908.issue27998@psf.upfronthosting.co.za> Eryk Sun added the comment: With the patch I uploaded, test_glob and test_os BytesWalkTests both pass, in both Windows 10 and Linux. Without it those tests fail for me in Windows 10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 13:17:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 17:17:51 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <20161008171744.5537.27232.60E6F8BA@psf.io> Roundup Robot added the comment: New changeset 4ed634870a9a by Serhiy Storchaka in branch '3.6': Issue #27998: Fixed bytes path support in os.scandir() on Windows. https://hg.python.org/cpython/rev/4ed634870a9a New changeset 837114dea493 by Serhiy Storchaka in branch 'default': Issue #27998: Fixed bytes path support in os.scandir() on Windows. https://hg.python.org/cpython/rev/837114dea493 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 13:20:04 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 17:20:04 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475947204.15.0.739108743187.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Now it is documentation issue again. ---------- keywords: -patch priority: release blocker -> normal stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 13:51:49 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 08 Oct 2016 17:51:49 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475949109.27.0.490532653063.issue28376@psf.upfronthosting.co.za> Oren Milman added the comment: Alright, just added 'with test.support.check_warnings(('', DeprecationWarning)):'. *ver4.diff is attached. I ran the tests again (this time using 'python_d.exe -We -m test -j3'), and they were successful :) That was totally my bad, of course, but anyway, ISTM that https://docs.python.org/devguide/index.html should say './python -We -m test -j3' in section 4 (Run the tests). ---------- Added file: http://bugs.python.org/file45022/issue28376_CPython36_ver4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 14:01:46 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 08 Oct 2016 18:01:46 +0000 Subject: [issue15332] 2to3 should fix bad indentation (or warn about it) In-Reply-To: <1342104283.46.0.0298718422519.issue15332@psf.upfronthosting.co.za> Message-ID: <1475949706.1.0.717308329728.issue15332@psf.upfronthosting.co.za> R. David Murray added the comment: Agreed. -tt is designed for this job; there's no need for 2to3 to duplicate the functionality given that reindent.py exists and can be (and "should" be) applied to the python2 source even if you aren't doing single-source. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 15:08:34 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 19:08:34 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <20161008190831.15207.26020.9865E1FC@psf.io> Roundup Robot added the comment: New changeset ee049edc3fff by Serhiy Storchaka in branch '3.5': Issue #28376: Fixed typos. https://hg.python.org/cpython/rev/ee049edc3fff New changeset e486f3d30e0e by Serhiy Storchaka in branch '3.5': Issue #28376: The constructor of range_iterator now checks that step is not 0. https://hg.python.org/cpython/rev/e486f3d30e0e New changeset 06f065a59751 by Serhiy Storchaka in branch '3.6': Issue #28376: Creating instances of range_iterator by calling range_iterator https://hg.python.org/cpython/rev/06f065a59751 New changeset e099583400f3 by Serhiy Storchaka in branch 'default': Issue #28376: Creating instances of range_iterator by calling range_iterator https://hg.python.org/cpython/rev/e099583400f3 New changeset ce4af7593e45 by Serhiy Storchaka in branch '3.5': Issue #28376: The type of long range iterator is now registered as Iterator. https://hg.python.org/cpython/rev/ce4af7593e45 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 15:09:37 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 19:09:37 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1475953777.74.0.357947810679.issue28376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Oren. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 15:19:01 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 19:19:01 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <20161008191858.79555.25241.CE19EA03@psf.io> Roundup Robot added the comment: New changeset faf5493e6f61 by Steve Dower in branch '3.6': Issue #28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk Sun) https://hg.python.org/cpython/rev/faf5493e6f61 New changeset cb62e921bd06 by Steve Dower in branch 'default': Issue #28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk Sun) https://hg.python.org/cpython/rev/cb62e921bd06 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 15:20:36 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 08 Oct 2016 19:20:36 +0000 Subject: [issue23578] struct.pack error messages do not indicate which argument was invalid In-Reply-To: <1425402185.63.0.203193056814.issue23578@psf.upfronthosting.co.za> Message-ID: <1475954436.98.0.183010953693.issue23578@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- keywords: +easy (C) stage: -> needs patch versions: +Python 3.7 -Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 15:21:35 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 19:21:35 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <20161008192132.15398.44094.1EAE83DC@psf.io> Roundup Robot added the comment: New changeset 63ceadf8410f by Steve Dower in branch '3.6': Issue #28333: Remove unnecessary increment. https://hg.python.org/cpython/rev/63ceadf8410f New changeset d76c8f9ea787 by Steve Dower in branch 'default': Issue #28333: Remove unnecessary increment. https://hg.python.org/cpython/rev/d76c8f9ea787 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 15:23:23 2016 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Oct 2016 19:23:23 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1475954603.03.0.540540243092.issue28333@psf.upfronthosting.co.za> Steve Dower added the comment: I made some minor tweaks to the patch (no need for strlen() - passing -1 works equivalently), but otherwise it's exactly what I would have done so I committed it. We currently have no tests to check which characters are written to a console output buffer. Issue28217 was tracking those, but considering how little code we have on top of output I don't think it's worth blocking anything on automating those tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 15:38:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 19:38:08 +0000 Subject: [issue28162] WindowsConsoleIO readall() fails if first line starts with Ctrl+Z In-Reply-To: <1473909917.67.0.236391762597.issue28162@psf.upfronthosting.co.za> Message-ID: <20161008193805.20033.20933.42BC5A69@psf.io> Roundup Robot added the comment: New changeset 4d4aefa52f49 by Steve Dower in branch '3.6': Issue #28162: Fixes Ctrl+Z handling in console readall() https://hg.python.org/cpython/rev/4d4aefa52f49 New changeset 947fa496ca6f by Steve Dower in branch 'default': Issue #28162: Fixes Ctrl+Z handling in console readall() https://hg.python.org/cpython/rev/947fa496ca6f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 15:44:31 2016 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Oct 2016 19:44:31 +0000 Subject: [issue28162] WindowsConsoleIO readall() fails if first line starts with Ctrl+Z In-Reply-To: <1473909917.67.0.236391762597.issue28162@psf.upfronthosting.co.za> Message-ID: <1475955871.85.0.564774491997.issue28162@psf.upfronthosting.co.za> Steve Dower added the comment: I didn't see your patch, but I made basically the same fix and added a test. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 15:48:31 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 19:48:31 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <20161008194828.15562.37969.CC07EB39@psf.io> Roundup Robot added the comment: New changeset 13addd71b751 by Serhiy Storchaka in branch '3.5': Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters(). https://hg.python.org/cpython/rev/13addd71b751 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 15:50:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 19:50:20 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1475956220.75.0.256567453083.issue28379@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 16:04:37 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Oct 2016 20:04:37 +0000 Subject: [issue26171] heap overflow in zipimporter module In-Reply-To: <1453348353.03.0.314168195173.issue26171@psf.upfronthosting.co.za> Message-ID: <1475957077.55.0.118487136322.issue26171@psf.upfronthosting.co.za> Ned Deily added the comment: Parvesh, we only maintain the latest micro release of a release cycle; for 2.7, that is currently 2.7.12. In other words, once 2.7.9 was released, 2.7.8 was no longer supported by us (although, of course, downstream distributors of Cpython can choose to backport fixes to older releases on their own). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 16:07:42 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Oct 2016 20:07:42 +0000 Subject: [issue26171] heap overflow in zipimporter module In-Reply-To: <1453348353.03.0.314168195173.issue26171@psf.upfronthosting.co.za> Message-ID: <1475957262.33.0.838928383768.issue26171@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: release blocker -> versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 16:36:24 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 08 Oct 2016 20:36:24 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1475958984.41.0.581938214677.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: Now I understand tp_dealloc, tp_finalize and subtype_dealloc. Attached patch passes tests. ---------- Added file: http://bugs.python.org/file45023/fastfuture4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 17:25:39 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Oct 2016 21:25:39 +0000 Subject: [issue28097] IDLE: document all key bindings, add menu items for more. In-Reply-To: <1473663810.99.0.66873909958.issue28097@psf.upfronthosting.co.za> Message-ID: <1475961939.06.0.88743425746.issue28097@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The toggle highlighting issue is #27170 (not 27120) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 17:30:25 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Oct 2016 21:30:25 +0000 Subject: [issue27170] IDLE: remove Toggle Auto Coloring or add to edit menu & doc In-Reply-To: <1464724931.74.0.507384074731.issue27170@psf.upfronthosting.co.za> Message-ID: <1475962225.77.0.435051405919.issue27170@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Toggling syntax highlighting is part of #6858. Adding it to menu and doc is part of #28097 ---------- assignee: -> terry.reedy components: +IDLE -2to3 (2.x to 3.x conversion tool) resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> IDLE: document all key bindings, add menu items for more. versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 21:00:01 2016 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 09 Oct 2016 01:00:01 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1475974801.17.0.112909023817.issue26081@psf.upfronthosting.co.za> Yury Selivanov added the comment: I quickly looked over the patch and I think it's good. If anything we still have time to hunt down any bugs or even revert this before 3.6 final. INADA, feel free to commit it before Monday to 3.6 and default branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 21:34:18 2016 From: report at bugs.python.org (Arno-Can Uestuensoez) Date: Sun, 09 Oct 2016 01:34:18 +0000 Subject: [issue28391] Multiple occurances of: Closing quotes separate words Message-ID: <1475976858.38.0.622085422041.issue28391@psf.upfronthosting.co.za> New submission from Arno-Can Uestuensoez: I am currently writing an extended options scanner including shlex-compatibility mode. So including numerous extended unittests for compatibility verification. I am not sure whether the following behaviour of shlex.split() is correct: Quote from manual: Parsing Rules: Closing quotes separate words ("Do"Separate is parsed as "Do" and Separate); Case-0: Works sopts = """-a "Do"Separate """ resx = ["-a", '"Do"', 'Separate', ] shlex.split(sopts,posix=False) assert res == resx Case-1: Fails - should work? sopts = """-a "Do"Separate"this" """ resx = ["-a", '"Do"', 'Separate', '"this"', ] shlex.split(sopts,posix=False) assert res == resx Case-2: Works - should fail? sopts = """-a "Do"Separate"this" """ #@UnusedVariable resx = ["-a", '"Do"', 'Separate"this"', ] shlex.split(sopts,posix=False) assert res == resx The Case-0 is as defined in the manuals. Is Case-1 or Case-2 the correct behaviour? Which of Case-1, Case-2 is an error? REMARK: I haven't found an eralier issue, so filing this here. ---------- components: Library (Lib) messages: 278329 nosy: Andrey.Kislyuk, acue, cvrebert, eric.araujo, eric.smith, ezio.melotti, python-dev, r.david.murray, robodan, vinay.sajip priority: normal severity: normal status: open title: Multiple occurances of: Closing quotes separate words type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 22:52:11 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Oct 2016 02:52:11 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1475981531.81.0.645193700737.issue21720@psf.upfronthosting.co.za> Nick Coghlan added the comment: Berker's fix for Python 2.7 looks good to me. However, Python 3 has a comparably vague error message, it's just inverted to complain about bytes rather than unicode due to the change in the native str type: >>> __import__('encodings', fromlist=[b'aliases']) Traceback (most recent call last): File "", line 1, in File "", line 1013, in _handle_fromlist TypeError: hasattr(): attribute name must be string hasattr() in Python 2.7 is similarly unhelpful regarding what type it actually got when you give it something it doesn't expect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:03:54 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Oct 2016 03:03:54 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1475982234.13.0.288430769834.issue28214@psf.upfronthosting.co.za> Nick Coghlan added the comment: The following seem like a reasonable starting point to me: TypeError: Failed to set name on 'BadIdea' instance 'attr' in 'NotGoingToWork': 'NoneType' object is not callable TypeError: Failed to set name on 'FaultyImplementation' instance 'attr' in 'TheoreticallyCouldWork': ZeroDivisionError: division by zero That is, the error message format would be along the lines of: f"Failed to set name on {type(the_attr).__name__!r} instance {the_attr_name!r} in {class_being_defined.__name__!r}: {str(raised_exc)}" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:05:31 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 03:05:31 +0000 Subject: [issue28388] Update documentation for typing module In-Reply-To: <1475884610.88.0.342172022706.issue28388@psf.upfronthosting.co.za> Message-ID: <1475982331.37.0.716905106657.issue28388@psf.upfronthosting.co.za> Guido van Rossum added the comment: LGTM. I have a small number of nits that I will apply when merging this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:06:53 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Oct 2016 03:06:53 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1475982413.03.0.0750905667505.issue28214@psf.upfronthosting.co.za> Nick Coghlan added the comment: Slight change, as it makes sense to reference the special method name explicitly: TypeError: Error calling __set_name__ on 'BadIdea' instance 'attr' in 'NotGoingToWork': 'NoneType' object is not callable TypeError: Error calling __set_name__ on 'FaultyImplementation' instance 'attr' in 'TheoreticallyCouldWork': ZeroDivisionError: division by zero ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:08:18 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Oct 2016 03:08:18 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1475982498.09.0.74329182297.issue28214@psf.upfronthosting.co.za> Nick Coghlan added the comment: Fixing the proposed format string accordingly, and also including the underlying exception type as I did in the examples: f"Error calling __set_name__ on {type(the_attr).__name__!r} instance {the_attr_name!r} in {class_being_defined.__name__!r}: {type(raised_exc).__name__}: {str(raised_exc)}" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:10:38 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 03:10:38 +0000 Subject: [issue28388] Update documentation for typing module In-Reply-To: <1475884610.88.0.342172022706.issue28388@psf.upfronthosting.co.za> Message-ID: <20161009031035.20553.54885.F0A81DD8@psf.io> Roundup Robot added the comment: New changeset 9953efbb4974 by Guido van Rossum in branch '3.5': Issue #28388: update typing module documentation. https://hg.python.org/cpython/rev/9953efbb4974 New changeset 589e11c3489e by Guido van Rossum in branch '3.6': Issue #28388: update typing module documentation. (merge 3.5->3.6) https://hg.python.org/cpython/rev/589e11c3489e New changeset 6cb9dfe4cbeb by Guido van Rossum in branch 'default': Issue #28388: update typing module documentation. (merge 3.6->3.7) https://hg.python.org/cpython/rev/6cb9dfe4cbeb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:10:59 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 03:10:59 +0000 Subject: [issue28388] Update documentation for typing module In-Reply-To: <1475884610.88.0.342172022706.issue28388@psf.upfronthosting.co.za> Message-ID: <1475982659.29.0.657520820603.issue28388@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:14:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 03:14:13 +0000 Subject: [issue28388] Update documentation for typing module In-Reply-To: <1475884610.88.0.342172022706.issue28388@psf.upfronthosting.co.za> Message-ID: <20161009031410.15775.29338.012CCC61@psf.io> Roundup Robot added the comment: New changeset d7f2b0332343 by Guido van Rossum in branch '3.5': Adjust ClassVar example to use pre-PEP-526 syntax. (Issue #28388) https://hg.python.org/cpython/rev/d7f2b0332343 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:18:21 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 03:18:21 +0000 Subject: [issue27588] Type (typing) objects are hashable and comparable for equality but this is not documented In-Reply-To: <1469181051.15.0.925508125369.issue27588@psf.upfronthosting.co.za> Message-ID: <1475983101.24.0.662671869123.issue27588@psf.upfronthosting.co.za> Guido van Rossum added the comment: Fixed by the changes for issue #28388. ---------- nosy: +gvanrossum resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:23:05 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 03:23:05 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1475983385.22.0.647411717946.issue28339@psf.upfronthosting.co.za> Guido van Rossum added the comment: Making it a deferred release blocker so we're reminded to do the more thorough fix before 3.6.0 rc1. ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 00:18:19 2016 From: report at bugs.python.org (Aidin Gharibnavaz) Date: Sun, 09 Oct 2016 04:18:19 +0000 Subject: [issue24398] Update test_capi to use test.support.script_helper In-Reply-To: <1433614432.33.0.0607159967244.issue24398@psf.upfronthosting.co.za> Message-ID: <1475986699.17.0.485946183123.issue24398@psf.upfronthosting.co.za> Aidin Gharibnavaz added the comment: I am working on this issue. ---------- nosy: +aidin36 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 00:36:33 2016 From: report at bugs.python.org (Oleg Broytman) Date: Sun, 09 Oct 2016 04:36:33 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1475987793.75.0.959093027067.issue23262@psf.upfronthosting.co.za> Changes by Oleg Broytman : Removed file: http://bugs.python.org/file38227/new_firefox.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 00:36:41 2016 From: report at bugs.python.org (Oleg Broytman) Date: Sun, 09 Oct 2016 04:36:41 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1475987801.1.0.089040377262.issue23262@psf.upfronthosting.co.za> Changes by Oleg Broytman : Removed file: http://bugs.python.org/file43748/webbrowser.py-2.7-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 00:36:47 2016 From: report at bugs.python.org (Oleg Broytman) Date: Sun, 09 Oct 2016 04:36:47 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1475987807.68.0.145442118329.issue23262@psf.upfronthosting.co.za> Changes by Oleg Broytman : Removed file: http://bugs.python.org/file43749/webbrowser.py-3.4-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 00:36:53 2016 From: report at bugs.python.org (Oleg Broytman) Date: Sun, 09 Oct 2016 04:36:53 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1475987813.02.0.262819540451.issue23262@psf.upfronthosting.co.za> Changes by Oleg Broytman : Removed file: http://bugs.python.org/file43751/webbrowser.py-2.7-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 00:36:59 2016 From: report at bugs.python.org (Oleg Broytman) Date: Sun, 09 Oct 2016 04:36:59 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1475987819.15.0.214022075964.issue23262@psf.upfronthosting.co.za> Changes by Oleg Broytman : Removed file: http://bugs.python.org/file43752/webbrowser.py-3.4-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 00:38:44 2016 From: report at bugs.python.org (Oleg Broytman) Date: Sun, 09 Oct 2016 04:38:44 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1475987924.33.0.750875784307.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: Add NewFox class to webbrowser for Py 2.7 (added raise_opts ? Mozilla no longer supports autoraise). ---------- Added file: http://bugs.python.org/file45024/webbrowser.py-2.7-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 00:39:05 2016 From: report at bugs.python.org (Oleg Broytman) Date: Sun, 09 Oct 2016 04:39:05 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1475987945.15.0.756159929786.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: Add NewFox class to webbrowser for Py 3.4 (added raise_opts ? Mozilla no longer supports autoraise). ---------- Added file: http://bugs.python.org/file45025/webbrowser.py-3.4-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 00:41:43 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 09 Oct 2016 04:41:43 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1475988103.86.0.620708980119.issue28379@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks Serhiy! But sorry I think I have made a mistake. In unicode_copycharacters we don't need PyUnicode_READY since it has been done in argument parse. Could you remove it? ---------- stage: resolved -> patch review status: closed -> open Added file: http://bugs.python.org/file45026/unicode_copycharacters.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 01:04:27 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 09 Oct 2016 05:04:27 +0000 Subject: [issue28391] Multiple occurances of: Closing quotes separate words In-Reply-To: <1475976858.38.0.622085422041.issue28391@psf.upfronthosting.co.za> Message-ID: <1475989467.02.0.41508625703.issue28391@psf.upfronthosting.co.za> R. David Murray added the comment: Case 2 (the actual behavior) is correct. Quotes *within* words are ignored, only a leading quoted string will result in a separate word. (That's recursive: try '"Do""This""Separate). That said, we don't really care about non-posix mode, it's just there for backward compatibility. I don't know why we haven't changed the default for shlex.shlex to posix=True. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 01:21:42 2016 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 09 Oct 2016 05:21:42 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1475990502.62.0.278340096503.issue28339@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: All tests from test_functools.py now pass. test.test_collections.TestCollectionABCs.test_ByteString() from test_functools.py still fails (as reported in msg277953). LD_LIBRARY_PATH="$(pwd)" ./python -c 'import runpy, typing; runpy.run_module("test")' -v test_collections ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 01:29:06 2016 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 09 Oct 2016 05:29:06 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1475990946.43.0.706687464273.issue28339@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- Removed message: http://bugs.python.org/msg278344 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 01:29:11 2016 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 09 Oct 2016 05:29:11 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1475990951.02.0.274962948643.issue28339@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: All tests from test_functools.py now pass. test.test_collections.TestCollectionABCs.test_ByteString() from test_collections.py still fails (as reported in msg277953). LD_LIBRARY_PATH="$(pwd)" ./python -c 'import runpy, typing; runpy.run_module("test")' -v test_collections ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 01:39:19 2016 From: report at bugs.python.org (Oleg Broytman) Date: Sun, 09 Oct 2016 05:39:19 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1475991559.39.0.134989486521.issue23262@psf.upfronthosting.co.za> Changes by Oleg Broytman : Removed file: http://bugs.python.org/file45024/webbrowser.py-2.7-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 01:40:01 2016 From: report at bugs.python.org (Oleg Broytman) Date: Sun, 09 Oct 2016 05:40:01 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1475991601.57.0.47642901595.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: Remove empty args (backported from 3.4). ---------- Added file: http://bugs.python.org/file45027/webbrowser.py-2.7-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 01:51:49 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 05:51:49 +0000 Subject: [issue26801] Fix shutil.get_terminal_size() to catch AttributeError In-Reply-To: <1461023037.12.0.975016313479.issue26801@psf.upfronthosting.co.za> Message-ID: <20161009055146.20873.1500.300D49E5@psf.io> Roundup Robot added the comment: New changeset 678424183b38 by INADA Naoki in branch '3.6': Issue #26801: Added C implementation of asyncio.Future. https://hg.python.org/cpython/rev/678424183b38 New changeset f8815001a390 by INADA Naoki in branch 'default': Issue #26801: Added C implementation of asyncio.Future. https://hg.python.org/cpython/rev/f8815001a390 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 01:56:58 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 09 Oct 2016 05:56:58 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1475992618.47.0.620385348998.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: I've committed the patch with trivial fixes (adding curly braces to if statements). And I'm sorry, I committed with wrong issue number. https://hg.python.org/cpython/rev/678424183b38 (3.6) https://hg.python.org/cpython/rev/f8815001a390 (default) I fixed NEWS entry already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 02:31:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 06:31:21 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1475994681.48.0.167651729415.issue28214@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Shouldn't it be RuntimeError? Proposed patch makes RuntimeError be raised with chained original exception. This preserves more information. >>> class FaultyImplementation: ... def __set_name__(self, *args): ... 1/0 ... >>> class TheoreticallyCouldWork: ... attr = FaultyImplementation() ... ZeroDivisionError: division by zero During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in RuntimeError: Error calling __set_name__ on 'FaultyImplementation' instance 'attr' in 'TheoreticallyCouldWork' ---------- Added file: http://bugs.python.org/file45028/set_name_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 02:41:32 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 06:41:32 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1475995292.43.0.747440096426.issue28214@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Alternative patch chain original exception as __cause__ instead of __context__. What is better? >>> class FaultyImplementation: ... def __set_name__(self, *args): ... 1/0 ... >>> class TheoreticallyCouldWork: ... attr = FaultyImplementation() ... ZeroDivisionError: division by zero The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in RuntimeError: Error calling __set_name__ on 'FaultyImplementation' instance 'attr' in 'TheoreticallyCouldWork' ---------- Added file: http://bugs.python.org/file45029/set_name_chain_error_cause.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 04:02:45 2016 From: report at bugs.python.org (Arno-Can Uestuensoez) Date: Sun, 09 Oct 2016 08:02:45 +0000 Subject: [issue28392] shlex - non-posix-mode: error in Multiple occurances of quotes substrings/words Message-ID: <1476000165.64.0.597524292198.issue28392@psf.upfronthosting.co.za> New submission from Arno-Can Uestuensoez: See also 28391: Multiple occurances of: Closing quotes separate words The issue 28391 is accepted, as it is defined: Quotes *within* words are ignored, only a leading quoted string will result in a separate word. (That's recursive: try '"Do""This""Separate). So I implement for compatibility mode your proposal. But the example does not seem to work as expected, so seems to hint to a bug. Thus openning a seperate issue: snip--> import shlex sopts = """-a "Do""This""Separate" """ resx = ["-a", '"Do"', 'ThisSeparate', ] res=shlex.split(sopts,posix=False) print "sopts ="+str(sopts) print "resx ="+str(resx) print "res ="+str(res) assert res == resx """ Results in: sopts =-a "Do""This""Separate" resx =['-a', '"Do"', 'ThisSeparate'] res =['-a', '"Do"', '"This"', '"Separate"'] Traceback (most recent call last): File "shlex_demo.py", line 52, in assert res == resx AssertionError """ <--snip I also checked the variant with a trailing quoted word for completeness, which is not enclosed. Does not split at all: sopts =-a Do"SeparateThis" resx =['-a', 'Do', '"SeparateThis"'] res =['-a', 'Do"SeparateThis"'] ---------- components: Library (Lib) messages: 278351 nosy: Andrey.Kislyuk, acue, cvrebert, eric.araujo, eric.smith, ezio.melotti, python-dev, r.david.murray, robodan, vinay.sajip priority: normal severity: normal status: open title: shlex - non-posix-mode: error in Multiple occurances of quotes substrings/words type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 05:48:43 2016 From: report at bugs.python.org (Oren Milman) Date: Sun, 09 Oct 2016 09:48:43 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1476006523.16.0.645230015563.issue28376@psf.upfronthosting.co.za> Oren Milman added the comment: Thanks for the reviews and patience :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 05:50:09 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sun, 09 Oct 2016 09:50:09 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1476006609.31.0.702836369067.issue25720@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: headers.sh in ncurses changes "#include " to the actual path. For example here's a line in my unctrl.h: #include ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 07:39:09 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 09 Oct 2016 11:39:09 +0000 Subject: [issue28393] Update encoding lookup docs wrt #27938 Message-ID: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> New submission from Ville Skytt?: The attached patch brings codecs docs up to date with respect to changes in #27938. ---------- assignee: docs at python components: Documentation files: codecs-doc.patch keywords: patch messages: 278354 nosy: docs at python, haypo, scop priority: normal severity: normal status: open title: Update encoding lookup docs wrt #27938 type: enhancement Added file: http://bugs.python.org/file45030/codecs-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 07:46:33 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 09 Oct 2016 11:46:33 +0000 Subject: [issue28394] Spelling fixes Message-ID: <1476013593.44.0.181122480978.issue28394@psf.upfronthosting.co.za> Changes by Ville Skytt? : ---------- assignee: docs at python components: Documentation files: spelling.patch keywords: patch nosy: docs at python, scop priority: normal severity: normal status: open title: Spelling fixes type: enhancement Added file: http://bugs.python.org/file45031/spelling.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 07:49:02 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 09 Oct 2016 11:49:02 +0000 Subject: [issue28395] Remove unnecessary semicolons Message-ID: <1476013742.58.0.0976253320339.issue28395@psf.upfronthosting.co.za> Changes by Ville Skytt? : ---------- components: Tests files: semicolons.patch keywords: patch nosy: scop priority: normal severity: normal status: open title: Remove unnecessary semicolons type: enhancement Added file: http://bugs.python.org/file45032/semicolons.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 07:50:43 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 09 Oct 2016 11:50:43 +0000 Subject: [issue28396] Remove *.pyo references from man page Message-ID: <1476013843.61.0.385970802582.issue28396@psf.upfronthosting.co.za> Changes by Ville Skytt? : ---------- assignee: docs at python components: Documentation files: man-pyo.patch keywords: patch nosy: docs at python, scop priority: normal severity: normal status: open title: Remove *.pyo references from man page type: enhancement Added file: http://bugs.python.org/file45033/man-pyo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 07:54:46 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 11:54:46 +0000 Subject: [issue28394] Spelling fixes Message-ID: <1476014086.96.0.714013131882.issue28394@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 08:32:06 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 12:32:06 +0000 Subject: [issue28397] Faster index range checks Message-ID: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The expression for testing that some index is in half-open range from 0 to limit can be written as index >= 0 && index < limit or as (size_t)index < (size_t)limit The latter form generates simpler machine code. This is idiomatic code, it is used in many C and C++ libraries (including C++ stdlib implementations). It already is used in CPython (in deque implementation). Proposed patch rewrites index range checks in more efficient way. The patch was generated automatically by coccinelle script, and then manually cleaned up. ---------- components: Extension Modules, Interpreter Core files: check_index.patch keywords: patch messages: 278355 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Faster index range checks type: performance versions: Python 3.7 Added file: http://bugs.python.org/file45034/check_index.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 08:33:18 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 12:33:18 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476016398.46.0.0822865948539.issue28397@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45035/check_index.cocci _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 08:38:10 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 12:38:10 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <20161009123807.15228.54241.8290C05F@psf.io> Roundup Robot added the comment: New changeset 1be8cd7cee92 by Serhiy Storchaka in branch 'default': Issue #28379: Removed redundant check. https://hg.python.org/cpython/rev/1be8cd7cee92 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 08:40:04 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 12:40:04 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1476016804.94.0.191066443315.issue28379@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 08:43:43 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 12:43:43 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1476017023.56.0.266524210603.issue27945@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +inada.naoki versions: +Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 08:46:52 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 09 Oct 2016 12:46:52 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1476017212.32.0.83475708799.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: I close this issue for now. Further improvements can be new issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 08:59:10 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 12:59:10 +0000 Subject: [issue23782] Leak in _PyTraceback_Add In-Reply-To: <1427365502.47.0.105321888995.issue23782@psf.upfronthosting.co.za> Message-ID: <1476017950.29.0.22394959597.issue23782@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: More refactoring. ---------- Added file: http://bugs.python.org/file45036/_PyTraceback_Add_leak2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 09:00:45 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 09 Oct 2016 13:00:45 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1476018045.83.0.357141497682.issue26081@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: patch review -> resolved versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 09:31:30 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 09 Oct 2016 13:31:30 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1476019890.45.0.304920089096.issue28379@psf.upfronthosting.co.za> Xiang Zhang added the comment: We don't need to remove it for 3.5 and 3.6? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 09:35:17 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Sun, 09 Oct 2016 13:35:17 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1476020117.85.0.210846115738.issue25720@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: Thank you for confirming, Yen :) In this case, It seems necessary that resolves headers. I think missing headers issue maybe solve by #28190. I wrote a join test patch for #28190 and #25720. Would you be able to resolve headers using this? ---------- Added file: http://bugs.python.org/file45037/join-test-issue28190-issue25720.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 11:02:55 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 09 Oct 2016 15:02:55 +0000 Subject: [issue28392] shlex - non-posix-mode: error in Multiple occurances of quotes substrings/words In-Reply-To: <1476000165.64.0.597524292198.issue28392@psf.upfronthosting.co.za> Message-ID: <1476025375.14.0.158963280209.issue28392@psf.upfronthosting.co.za> R. David Murray added the comment: >>> shlex.split('"Do""This""Separate"', posix=False) ['"Do"', '"This"', '"Separate"'] >>> shlex.split('Do"SeparateThis"', posix=False) ['Do"SeparateThis"'] Both of these are as documented. The first has three separate words, since each word that starts with a leading " is split at the closing quote (thus producing a new word that starts with a "). The last is one word, because the first " is internal to the word that starts at 'Do'. In any case, if you find something that disagrees with the docs, we'll just change the docs, because posix=False exists only for backward compatibility so whatever the code actually does is by definition correct at this point. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 11:19:17 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 15:19:17 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <20161009151913.79751.29237.78146A01@psf.io> Roundup Robot added the comment: New changeset 94c9c314f5d9 by Berker Peksag in branch '3.5': Issue #28389: Fix ProxiedTransport example in xmlrpc.client documentation https://hg.python.org/cpython/rev/94c9c314f5d9 New changeset 60c5c77c0190 by Berker Peksag in branch '3.6': Issue #28389: Merge from 3.5 https://hg.python.org/cpython/rev/60c5c77c0190 New changeset 5f9351bc317e by Berker Peksag in branch 'default': Issue #28389: Merge from 3.6 https://hg.python.org/cpython/rev/5f9351bc317e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 11:19:45 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 09 Oct 2016 15:19:45 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1476026385.76.0.375686532947.issue28389@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 11:40:17 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sun, 09 Oct 2016 15:40:17 +0000 Subject: [issue25720] Fix curses module compilation with ncurses6 In-Reply-To: <1448365148.0.0.732837314732.issue25720@psf.upfronthosting.co.za> Message-ID: <1476027617.43.0.660009029874.issue25720@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Thanks, building is fine here. By the way, testing is broken due to other bugs (/tmp not available on Android). It's unrelated and I'll open a new issue for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 11:49:06 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 09 Oct 2016 15:49:06 +0000 Subject: [issue28398] Return singleton empty string in _PyUnicode_FromASCII Message-ID: <1476028146.3.0.529072270103.issue28398@psf.upfronthosting.co.za> New submission from Xiang Zhang: Right now in _PyUnicode_FromASCII, it only optimises for size 1 not size 0. All other places getting the same situation in unicodeobject.c do both. ---------- files: _PyUnicode_FromASCII.patch keywords: patch messages: 278364 nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Return singleton empty string in _PyUnicode_FromASCII type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45038/_PyUnicode_FromASCII.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 12:00:43 2016 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 09 Oct 2016 16:00:43 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1476028843.56.0.238266949521.issue26081@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you, INADA! Next task -- optimize asyncio.Task in C in 3.7. Another 10-15% performance improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 12:02:07 2016 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 09 Oct 2016 16:02:07 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1476028927.87.0.64524811661.issue26081@psf.upfronthosting.co.za> Yury Selivanov added the comment: I mean another optimization possibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 12:13:45 2016 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 09 Oct 2016 16:13:45 +0000 Subject: [issue28399] Remove UNIX socket from FS before binding Message-ID: <1476029625.22.0.715081570912.issue28399@psf.upfronthosting.co.za> New submission from Yury Selivanov: Proxy for https://github.com/python/asyncio/pull/441 ---------- assignee: yselivanov components: asyncio messages: 278367 nosy: gvanrossum, yselivanov priority: normal severity: normal stage: resolved status: open title: Remove UNIX socket from FS before binding type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 12:13:56 2016 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 09 Oct 2016 16:13:56 +0000 Subject: [issue28399] Remove UNIX socket from FS before binding In-Reply-To: <1476029625.22.0.715081570912.issue28399@psf.upfronthosting.co.za> Message-ID: <1476029636.03.0.174740279463.issue28399@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 12:16:30 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 09 Oct 2016 16:16:30 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1476029790.65.0.784020187671.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: How about changing module name? _asyncio_speedup for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 12:16:37 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 16:16:37 +0000 Subject: [issue28399] Remove UNIX socket from FS before binding In-Reply-To: <1476029625.22.0.715081570912.issue28399@psf.upfronthosting.co.za> Message-ID: <20161009161634.85581.79080.5D5C963E@psf.io> Roundup Robot added the comment: New changeset a3b162d5e70a by Yury Selivanov in branch '3.5': Issue #28399: Remove UNIX socket from FS before binding. https://hg.python.org/cpython/rev/a3b162d5e70a New changeset 019c5c2f1239 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #28399) https://hg.python.org/cpython/rev/019c5c2f1239 New changeset 2e5a8b4d9c97 by Yury Selivanov in branch 'default': Merge 3.6 (issue #28399) https://hg.python.org/cpython/rev/2e5a8b4d9c97 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 12:19:55 2016 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 09 Oct 2016 16:19:55 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1476029995.11.0.617603654477.issue26081@psf.upfronthosting.co.za> Yury Selivanov added the comment: Yes, I think it's a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 12:21:21 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 16:21:21 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: <1473157014.91.0.531687158456.issue27972@psf.upfronthosting.co.za> Message-ID: <20161009162118.17279.52890.CFFA4B33@psf.io> Roundup Robot added the comment: New changeset 8d877876aa89 by Yury Selivanov in branch '3.5': Issue #27972: Prohibit Tasks to await on themselves. https://hg.python.org/cpython/rev/8d877876aa89 New changeset 41c4f535b5c0 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #27972) https://hg.python.org/cpython/rev/41c4f535b5c0 New changeset 47720192b318 by Yury Selivanov in branch 'default': Merge 3.6 (issue #27972) https://hg.python.org/cpython/rev/47720192b318 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 12:22:05 2016 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 09 Oct 2016 16:22:05 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: <1473157014.91.0.531687158456.issue27972@psf.upfronthosting.co.za> Message-ID: <1476030125.92.0.490564126856.issue27972@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you for reporting this! Closing the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 12:54:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 16:54:20 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1476032059.98.0.218514547116.issue28379@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is just a cleaning up of not very important code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:00:20 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 09 Oct 2016 17:00:20 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1476032420.74.0.829702211044.issue28379@psf.upfronthosting.co.za> Xiang Zhang added the comment: Fine. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:01:07 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 17:01:07 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1476032467.36.0.499448364225.issue28339@psf.upfronthosting.co.za> Guido van Rossum added the comment: Oh the line ByteString.register(type(memoryview(b''))) should be removed from typing.py. ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:05:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 17:05:08 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <20161009170503.94849.82720.7EB3E019@psf.io> Roundup Robot added the comment: New changeset 69fe5f2e5aae by Guido van Rossum in branch '3.5': Issue #28339: Remove ByteString.register(memoryview(...)) from typing.py. https://hg.python.org/cpython/rev/69fe5f2e5aae New changeset 8958836a2c89 by Guido van Rossum in branch '3.6': Issue #28339: Remove ByteString.register(memoryview(...)) from typing.py. (merge 3.5->3.6) https://hg.python.org/cpython/rev/8958836a2c89 New changeset def461406c70 by Guido van Rossum in branch 'default': Issue #28339: Remove ByteString.register(memoryview(...)) from typing.py. (merge 3.6->3.7) https://hg.python.org/cpython/rev/def461406c70 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:07:25 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 17:07:25 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1476032845.55.0.216468749742.issue28339@psf.upfronthosting.co.za> Guido van Rossum added the comment: Maybe this fix helps? I tried your repro and it no longer fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:16:59 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 09 Oct 2016 17:16:59 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1476033419.06.0.248628947092.issue28339@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I think this is the right way to fix this, as discussed on python-dev, memoryview is not considered consistent with ByteString. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:21:42 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 09 Oct 2016 17:21:42 +0000 Subject: [issue28400] Remove uncessary checks in unicode_char and resize_copy Message-ID: <1476033702.7.0.657105257763.issue28400@psf.upfronthosting.co.za> New submission from Xiang Zhang: In resize_copy we don't need to PyUnicode_READY(unicode) since when it's not PyUnicode_WCHAR_KIND it should be ready. In unicode_char, PyUnicode_1BYTE_KIND is handled by get_latin1_char. ---------- components: Interpreter Core files: unicode_char_and_resize_copy.patch keywords: patch messages: 278379 nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Remove uncessary checks in unicode_char and resize_copy type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45039/unicode_char_and_resize_copy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:27:34 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 09 Oct 2016 17:27:34 +0000 Subject: [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1476034054.35.0.646612609153.issue25152@psf.upfronthosting.co.za> R. David Murray added the comment: Issue 25154 has deprecated pyvenv in 3.6. The docs, however, still need updating. The updated docs should mention pyvenv only to say that it is deprecated, I think. This change could be applied to 3.5 if we get it in before 3.5 final. ---------- stage: -> needs patch type: -> behavior versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:31:32 2016 From: report at bugs.python.org (Stefano Rivera) Date: Sun, 09 Oct 2016 17:31:32 +0000 Subject: [issue28401] Don't support the PEP384 stable ABI in pydebug builds Message-ID: <1476034292.17.0.316209799179.issue28401@psf.upfronthosting.co.za> New submission from Stefano Rivera: setup.py build for a library using py_limited_api will always generate a stable ABI tagged shared library, even under the pydebug interpreter. This means that extensions that are built for a pydebug interpreter may be accidentally (and brokenly) imported in a non-dbg interpreter and vice-versa. e.g. in python-librtmp, with cffi 1.8.3: $ python3-dbg setup.py build ... x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -Og -fdebug-prefix-map=/build/python3.5-H9Fri6/python3.5-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5-pydebug/build/temp.linux-x86_64-3.5-pydebug/librtmp._librtmp.o -lrtmp -o build/lib.linux-x86_64-3.5-pydebug/librtmp/_librtmp.abi3.so Then: $ cd build/lib.linux-x86_64-3.5-pydebug $ python3 -c 'import librtmp' Traceback (most recent call last): File "", line 1, in File "/tmp/python-librtmp-0.3.0/build/lib.linux-x86_64-3.5-pydebug/librtmp/__init__.py", line 8, in from ._librtmp import ffi, lib as librtmp ImportError: /tmp/python-librtmp-0.3.0/build/lib.linux-x86_64-3.5-pydebug/librtmp/_librtmp.abi3.so: undefined symbol: _Py_RefTotal setuptools decides whether to use the stable ABI, by looking at imp.get_suffixes(). And obviously, the importer is looking at that too. So, the stable ABI tag should simply not be in there. PEP3149 agrees with this. It has this quote from Martin v. L?wis: --with-pydebug would not be supported by the stable ABI because this changes the layout of PyObject , which is an exposed structure. So, here's a patch, to disable support for the stable ABI under pydebug builds. ---------- components: Library (Lib) files: pep384-pydbg.patch keywords: patch messages: 278381 nosy: stefanor priority: normal severity: normal status: open title: Don't support the PEP384 stable ABI in pydebug builds type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45040/pep384-pydbg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:47:25 2016 From: report at bugs.python.org (Attila Vangel) Date: Sun, 09 Oct 2016 17:47:25 +0000 Subject: [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1476035245.94.0.399035090149.issue28389@psf.upfronthosting.co.za> Attila Vangel added the comment: Thanks for fixing this issue. I checked the changed documentation online, and I came up with a very similar solution. One difference is that although this example overrides the make_connection() method, but omits the following lines which are present in the xmlrpc.client.Transport code (I checked that in python 3.5.3): # return an existing connection if possible. This allows # HTTP/1.1 keep-alive. if self._connection and host == self._connection[0]: return self._connection[1] # create a HTTP connection object from a host descriptor chost, self._extra_headers, x509 = self.get_host_info(host) Please check xmlrpc.client.Transport.make_connection(). I am not sure about the what kind of effect this may have. I used chost as the parameter of set_tunnel(), rather than host (after briefly checking the code how it is calculated I felt that it's better to use chost than host, but I don't have a deep understanding of the http.client code). The proxy_headers is a new thing, I guess it's a good thing if someone needs that. I don't understand why the '*' character is needed in connection = http.client.HTTPConnection(*self.proxy) However I'm quite new to python. I will try this new code tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:58:45 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 09 Oct 2016 17:58:45 +0000 Subject: [issue3401] wsgiref can't handle unicode environments In-Reply-To: <1216338814.66.0.0698084133409.issue3401@psf.upfronthosting.co.za> Message-ID: <1476035925.69.0.415242358766.issue3401@psf.upfronthosting.co.za> R. David Murray added the comment: Since this is a buildbot error report and we don't release unless the buildbots in the stable set are green, I think we can close this now :) ---------- nosy: +r.david.murray resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 14:59:16 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 18:59:16 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1476033419.06.0.248628947092.issue28339@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: So is a larger fix not necessary? If so we can close this (assuming the tests now pass). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 15:08:51 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 09 Oct 2016 19:08:51 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1476040131.41.0.340468993114.issue28339@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I tried and all tests pass on 3.7a also with prior import of typing. A larger fix is not _necessary_, but I would _prefer_ to go with the option 4 that I proposed above, i.e.: Instead of special casing abc and functools in __subclasshook__ in typing via sys._getframe, I would rather add small changes to abc and functools (they should use __origin__ in subclass checks). In general, I think we should document __origin__, it could be useful at runtime (especially that we prohibit certain things like class checks for parameterized generics). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 15:39:33 2016 From: report at bugs.python.org (Oren Milman) Date: Sun, 09 Oct 2016 19:39:33 +0000 Subject: [issue12974] array module: deprecate '__int__' conversion support for array elements In-Reply-To: <1315961295.78.0.425877150438.issue12974@psf.upfronthosting.co.za> Message-ID: <1476041973.91.0.108311158594.issue12974@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- nosy: +Oren Milman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 15:45:28 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 19:45:28 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1476042328.78.0.445215799832.issue28339@psf.upfronthosting.co.za> Guido van Rossum added the comment: Hm. I agree that _getframe() is horrible. But I'm not sure I want code outside typing.py to be aware of __origin__. ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 16:09:24 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 20:09:24 +0000 Subject: [issue28183] Clean up and speed up dict iteration In-Reply-To: <1474063807.66.0.276436600383.issue28183@psf.upfronthosting.co.za> Message-ID: <20161009200921.76110.66945.D1CE1327@psf.io> Roundup Robot added the comment: New changeset 112714f3745d by Serhiy Storchaka in branch '3.6': Issue #28183: Optimize and cleanup dict iteration. https://hg.python.org/cpython/rev/112714f3745d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 16:17:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 20:17:19 +0000 Subject: [issue28183] Clean up and speed up dict iteration In-Reply-To: <1474063807.66.0.276436600383.issue28183@psf.upfronthosting.co.za> Message-ID: <1476044239.81.0.24235526908.issue28183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Few weeks I tried to rewrite loops in more fast way, but I have not found anything significantly faster or clearer. Some forms of was a few percent faster, but I would be difficult to explain this effect. Most likely it was an artifact of the compilation. Removed unrelated changes from dict_iter8.patch and added additional check in _PyDict_Next() before committing. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 16:35:14 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 20:35:14 +0000 Subject: [issue28398] Return singleton empty string in _PyUnicode_FromASCII In-Reply-To: <1476028146.3.0.529072270103.issue28398@psf.upfronthosting.co.za> Message-ID: <1476045314.64.0.34381848021.issue28398@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Additional check has a non-zero cost. What is the benefit of this change? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 16:42:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 20:42:55 +0000 Subject: [issue28400] Remove uncessary checks in unicode_char and resize_copy In-Reply-To: <1476033702.7.0.657105257763.issue28400@psf.upfronthosting.co.za> Message-ID: <1476045775.49.0.916170790611.issue28400@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- assignee: -> serhiy.storchaka stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 16:45:10 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 20:45:10 +0000 Subject: [issue28400] Remove uncessary checks in unicode_char and resize_copy In-Reply-To: <1476033702.7.0.657105257763.issue28400@psf.upfronthosting.co.za> Message-ID: <20161009204507.20873.70068.122297F7@psf.io> Roundup Robot added the comment: New changeset 61e454a1c9d7 by Serhiy Storchaka in branch 'default': Issue #28400: Removed uncessary checks in unicode_char and resize_copy. https://hg.python.org/cpython/rev/61e454a1c9d7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 16:45:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 20:45:53 +0000 Subject: [issue28400] Remove uncessary checks in unicode_char and resize_copy In-Reply-To: <1476033702.7.0.657105257763.issue28400@psf.upfronthosting.co.za> Message-ID: <1476045953.28.0.366052321429.issue28400@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 17:41:07 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 09 Oct 2016 21:41:07 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476049267.38.0.725924607206.issue28092@psf.upfronthosting.co.za> Martin Panter added the comment: For replacing macros, I think ?static inline? may be fine, even with older compilers. Maybe these PyDTrace_ functions could also be static inline, since they were originally macros. Or do they really need to be linkable inline functions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 17:43:30 2016 From: report at bugs.python.org (Mingye Wang) Date: Sun, 09 Oct 2016 21:43:30 +0000 Subject: [issue28343] Bad encoding alias cp936 -> gbk: euro sign In-Reply-To: <1475464291.36.0.0934021228231.issue28343@psf.upfronthosting.co.za> Message-ID: <1476049410.4.0.548041889071.issue28343@psf.upfronthosting.co.za> Mingye Wang added the comment: The "join the web people" solution should look like this: $ diff -Naurp a/_codecs_cn.c b/_codecs_cn.c --- a/_codecs_cn.c 2016-10-09 14:24:04.675111500 -0700 +++ b/_codecs_cn.c 2016-10-09 14:27:06.600961500 -0700 @@ -128,6 +128,12 @@ ENCODER(gbk) continue; } + if (c == 0x20AC) { /* cp936, or web GBK */ + WRITEBYTE1((unsigned char)0x80); + NEXT(1, 1); + continue; + } + if (c > 0xFFFF) return 1; @@ -159,6 +165,12 @@ DECODER(gbk) NEXT_IN(1); continue; } + + if (c == 0x80) { /* cp936, or web GBK */ + OUTCHAR(0x20AC); + NEXT_IN(1); + continue; + } REQUIRE_INBUF(2); It should be mostly safe as this character is not previously defined in Python's GBK implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 19:57:14 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 09 Oct 2016 23:57:14 +0000 Subject: [issue28373] input() prints to original stdout even if sys.stdout is wrapped In-Reply-To: <1475745183.18.0.209614419228.issue28373@psf.upfronthosting.co.za> Message-ID: <1476057434.06.0.330973105076.issue28373@psf.upfronthosting.co.za> Martin Panter added the comment: >From memory, there are at least three code paths for input(): 1. Fallback implementation, used when stdout is a pipe or other non-terminal 2. Default PyOS_ReadlineFunctionPointer() hook, used when stdout is a terminal: https://docs.python.org/3.5/c-api/veryhigh.html#c.PyOS_ReadlineFunctionPointer 3. Gnu Readline (or another hook installed by a C module) Arnon?s problem only seems to occur in the last two cases, when PyOS_ReadlineFunctionPointer() is used. The problem is that PyOS_ReadlineFunctionPointer() uses C FILE pointers, not Python file objects. Python calls sys.stdout.fileno() to see if it can substitute the C-level stdout FILE object. Adam: I think your sys.readlinehook() proposal is independent of Arnon?s problem. We would still need some logic to decide what to pass to libraries like Gnu Readline that want a FILE pointer instead of a Python file object. The fileno() method is documented all file objects, including text files like sys.stdout. So I think implementing your own fileno() method is completely valid. One other idea that comes to mind is if Python checked if the sys.stdout object has been changed (e.g. sys.stdout != sys.__stdout__), rather than just comparing fileno() values. But I am not sure if this change is worth it. BTW if I revert the fix for Issue 24402 (I also tried 3.3.3), the problem occurs even when a custom fileno() is defined. On the other hand, Python 2?s raw_input() is not affected, presumably because it uses PyFile_AsFile() and fails immediately if stdout is a custom class. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 20:33:50 2016 From: report at bugs.python.org (Joshua Jay Herman) Date: Mon, 10 Oct 2016 00:33:50 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1476059630.9.0.259033302037.issue24459@psf.upfronthosting.co.za> Joshua Jay Herman added the comment: Hi I performed the rebase on the default branch. ---------- Added file: http://bugs.python.org/file45041/rebased_addMissingEnvironmentalVariables.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 21:34:49 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Oct 2016 01:34:49 +0000 Subject: [issue28394] Spelling fixes Message-ID: <20161010013445.20766.86546.B8433476@psf.io> New submission from Roundup Robot: New changeset 6b1df8905012 by Martin Panter in branch '3.5': Issue #28394: Spelling and typo fixes in code comments and changelog https://hg.python.org/cpython/rev/6b1df8905012 New changeset bd113af10005 by Martin Panter in branch '3.6': Issue #28394: Merge typo fixes from 3.5 into 3.6 https://hg.python.org/cpython/rev/bd113af10005 New changeset 004d1809db41 by Martin Panter in branch '3.6': Issue #28394: More typo fixes for 3.6+ https://hg.python.org/cpython/rev/004d1809db41 New changeset 678fe178da0d by Martin Panter in branch 'default': Issue #28394: Merge typo fixes from 3.6 https://hg.python.org/cpython/rev/678fe178da0d New changeset de13f5a0f4d5 by Martin Panter in branch '2.7': Issue #28394: Typo fixes in code comments and changelog https://hg.python.org/cpython/rev/de13f5a0f4d5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 22:17:39 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 10 Oct 2016 02:17:39 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476065859.95.0.0900228045201.issue28397@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Don't change the code in the collections module. While semantically valid, the change obfuscates the code. The meaning of maxlen < 0 is that there is no maximum length. I don't want this test hidden; otherwise, I would have changed it long ago as was done elsewhere in the module where it made sense. Elsewhere, consider making a macro with clear name and comment (as was done with NEEDS_TRIM) in the collections module. Otherwise, you're just leaving behind constipated and tricky code with no indication of why a signed variable is being coerced to unsigned. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 22:44:22 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 10 Oct 2016 02:44:22 +0000 Subject: [issue28398] Return singleton empty string in _PyUnicode_FromASCII In-Reply-To: <1476028146.3.0.529072270103.issue28398@psf.upfronthosting.co.za> Message-ID: <1476067462.82.0.40507848437.issue28398@psf.upfronthosting.co.za> Xiang Zhang added the comment: The cost is really small (an integer compare vs memory malloc and copy). The advantages are fast path for empty strings and retaining consistency with other codes in unicodeobject.c. You can see other places use the same optimization, e.g. PyUnicode_FromUnicode, PyUnicode_FromUCS1, and some functions using unicode_result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 22:45:28 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Oct 2016 02:45:28 +0000 Subject: [issue28394] Spelling fixes In-Reply-To: <20161010013445.20766.86546.B8433476@psf.io> Message-ID: <1476067528.97.0.260343942441.issue28394@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks Ville. I added some more fixes of my own I had been saving up. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 23:17:50 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Oct 2016 03:17:50 +0000 Subject: [issue28402] Add signed catalog files for stdlib on Windows Message-ID: <1476069470.02.0.829638678389.issue28402@psf.upfronthosting.co.za> New submission from Steve Dower: On Windows, we sign all binaries with the PSF code signing certificate. We can also sign all the standard library and tools .py files using a catalog, which will put the hashes of the original files into a signed bundle. This can then be validated by users (e.g. using "signtool.exe verify") at any point after installation. Worth noting that the OS does not automatically verify signatures in a catalog file. It's only worthwhile doing this for files that may end up on a production machine - essentially, those files included in lib.msi and tools.msi (not test.msi, dev.msi or tcltk.msi). ---------- assignee: steve.dower components: Windows messages: 278400 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Add signed catalog files for stdlib on Windows type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 23:19:43 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Oct 2016 03:19:43 +0000 Subject: [issue28402] Add signed catalog files for stdlib on Windows In-Reply-To: <1476069470.02.0.829638678389.issue28402@psf.upfronthosting.co.za> Message-ID: <20161010031940.82187.40106.471EB7E6@psf.io> Roundup Robot added the comment: New changeset e050ed5da06d by Steve Dower in branch '3.6': Issue #28402: Adds signed catalog files for stdlib on Windows. https://hg.python.org/cpython/rev/e050ed5da06d New changeset 27edae50e62c by Steve Dower in branch 'default': Issue #28402: Adds signed catalog files for stdlib on Windows. https://hg.python.org/cpython/rev/27edae50e62c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 23:20:17 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Oct 2016 03:20:17 +0000 Subject: [issue28402] Add signed catalog files for stdlib on Windows In-Reply-To: <1476069470.02.0.829638678389.issue28402@psf.upfronthosting.co.za> Message-ID: <1476069617.81.0.370468797105.issue28402@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 23:52:12 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 10 Oct 2016 03:52:12 +0000 Subject: [issue28403] Migration RFE: optional warning for implicit unicode conversions Message-ID: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> New submission from Nick Coghlan: Some of the hardest compatibility issues to track down in Python 3 migrations are those where existing code is depending on an implicit str->unicode promotion something in the depths of a support library (or sometimes even the standard library - the context where this came up relates to some apparent misbehaviour in the standard library). In other cases, just being able to rule implicit conversions out as a possible contributing factor can be helpful in finding the real problem. It's technically already possible to hook implicit conversions by adjusting (or shadowing) the site.py module and replacing the default "ascii" encoding with one that emits a warning whenever you rely on it: http://washort.twistedmatrix.com/2010/11/unicode-in-python-and-how-to-prevent-it.html However, actually setting that up is a bit tricky, since we deliberately drop "sys.setdefaultencoding" from the sys module in the default site module. That means requesting warnings for implicit conversions requires doing the following: 1. Finding the "ascii_with_warnings" codec above (or writing your own) 2. Learning one of the following 3 tricks for overriding the default encoding: 2a. Run with "-S" and call sys.setdefaultencoding post-startup 2b. Edit the actual system site.py in a container or other test environment 2c. Shadow site.py with your own modified copy 3. Run your tests or application with the modified default encoding If we wanted to make that easier for folks migrating, the first step would be to provide the "ascii_with_warnings" codec by default in Python 2.7 (perhaps as "_ascii_with_warnings", since it isn't intended for general use, it's just a migration helper) The second would be to provide a way to turn it on that doesn't require fiddling with the site module. The simplest option there would be to always enable it under `-3`. The argument against the simple option is that I'm not sure how noisy it would be by default - there are some standard library modules (e.g. URL processing) where we still rely on implicit encoding and decoding in Python 2, but have separate code paths in Python 3. Since we don't have -X options in Python 2, the second simplest alternative would be to leave `sys.setdefaultencoding` available when running under `-3`: that way folks could more easily opt in to enabling the "ascii_with_warnings" codec selectively (e.g. via a context manager), rather than always having it enabled. ---------- messages: 278402 nosy: ncoghlan priority: normal severity: normal status: open title: Migration RFE: optional warning for implicit unicode conversions type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 23:58:28 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 10 Oct 2016 03:58:28 +0000 Subject: [issue28403] Migration RFE: optional warning for implicit unicode conversions In-Reply-To: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> Message-ID: <1476071908.84.0.777341516055.issue28403@psf.upfronthosting.co.za> Nick Coghlan added the comment: (Correction to the above: the case where this came up turned out to be due to consuming code monkeypatching things when it really shouldn't have been, so it fell into the second category of "It would have been helpful to be able to more easily rule this out as a contributing factor") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 02:49:37 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 10 Oct 2016 06:49:37 +0000 Subject: [issue28395] Remove unnecessary semicolons Message-ID: <1476082177.89.0.151508255977.issue28395@psf.upfronthosting.co.za> New submission from Mariatta Wijaya: Thanks scop. The patch looks good to me, and it can be applied cleanly to 3.5, 3.6, and default branches. I did find more occurrences of unnecessary semicolons, for example (not a complete list) https://github.com/python/cpython/blob/master/Lib/smtpd.py#L569 https://github.com/python/cpython/blob/master/Lib/smtpd.py#L611 https://github.com/python/cpython/blob/master/Lib/test/test_itertools.py#L120 https://github.com/python/cpython/blob/master/Lib/test/test_pyexpat.py#L572 Not sure if it's really worth trying to fix all of them? Thanks :) ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 03:17:34 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 10 Oct 2016 07:17:34 +0000 Subject: [issue28403] Migration RFE: optional warning for implicit unicode conversions In-Reply-To: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> Message-ID: <1476083854.55.0.140774997651.issue28403@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Nick, I think you've missed the "undefined" encoding that we've had for this ever since Unicode was added to Python. You put the needed code into your sitecustomize.py file and Python2 will then behave just like Python3, i.e. raise an exception instead of coercing to Unicode: sitecustomize.py: import sys sys.setdefaultencoding('undefined') There's no need to hack this into site.py or to make sys.setdefaultencoding() available outside sitecustomize.py. If you want an OS environ switch, you can put the necessary logic into sitecustomize.py as well. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 03:29:36 2016 From: report at bugs.python.org (=?utf-8?q?Adam_Barto=C5=A1?=) Date: Mon, 10 Oct 2016 07:29:36 +0000 Subject: [issue28373] input() prints to original stdout even if sys.stdout is wrapped In-Reply-To: <1475745183.18.0.209614419228.issue28373@psf.upfronthosting.co.za> Message-ID: <1476084576.52.0.309654290324.issue28373@psf.upfronthosting.co.za> Adam Barto? added the comment: Does GNU readline do anything fancy about printing the prompt? Because you may want to use GNU readline for autocompletition while still enable colored output via wrapped stdout. Both at the same time with one call to input(). It seems that currently either you go interactive and ignore sys.std*, or you lose readline capabilities. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 05:11:22 2016 From: report at bugs.python.org (Max von Tettenborn) Date: Mon, 10 Oct 2016 09:11:22 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: <1473157014.91.0.531687158456.issue27972@psf.upfronthosting.co.za> Message-ID: <1476090682.81.0.674054363819.issue27972@psf.upfronthosting.co.za> Max von Tettenborn added the comment: You are very welcome, glad I could help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 06:05:39 2016 From: report at bugs.python.org (Stefan Krah) Date: Mon, 10 Oct 2016 10:05:39 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476093939.11.0.584031443597.issue28397@psf.upfronthosting.co.za> Stefan Krah added the comment: Serhiy, could you please take out _decimal.c? I thought we had been through that before. :) :) :) ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 07:38:45 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 10 Oct 2016 11:38:45 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1476099525.58.0.985309034716.issue28214@psf.upfronthosting.co.za> Nick Coghlan added the comment: You're right, RuntimeError is a more suitable exception type. So +1 for the second version of the patch that uses `__cause__` and the patch itself looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 07:55:00 2016 From: report at bugs.python.org (Stefan Krah) Date: Mon, 10 Oct 2016 11:55:00 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476100500.56.0.941528909449.issue28397@psf.upfronthosting.co.za> Stefan Krah added the comment: The same applies to memoryview.c and _testbuffer.c -- I doubt that there's any measurable speed benefit and the clarity is reduced (I also don't want macros there). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 08:09:38 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 10 Oct 2016 12:09:38 +0000 Subject: [issue28403] Migration RFE: optional warning for implicit unicode conversions In-Reply-To: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> Message-ID: <1476101378.89.0.703754087355.issue28403@psf.upfronthosting.co.za> Nick Coghlan added the comment: The main problem with the "undefined" encoding is that it actually *fails* the application, rather than allowing it to continue, but providing a warning at each new point where it encounters implicit encoding or decoding. This means the parts of the standard library that actually rely on implicit coercion fail outright, rather than just generate warning noise that you can filter out as irrelevant to your particular application. You raise a good point about `sitecustomize.py` though - I always forget about that feature myself, and it didn't come up in any of the Google results I looked at either. The existing "undefined" option also at least allows you to categorically ensure you're not relying on implicit conversions at all, so the Python 3 porting guide could be updated to explicitly cover: 1. Finding the site customization path for your active virtual environment: python -c 'import os.path, sysconfig; print(os.path.join(sysconfig.get_path("purelib"), "sitecustomize.py"))' 2. What to write to that location to disable implicit Unicode conversions: import sys sys.setdefaultencoding('undefined') Giving folks the following tiered path to Python 3 support: - get "pylint --py3k" passing (e.g. via python-modernize) - eliminate "python -3" warnings under Python 2 - (optional) support running with the above site customizations - actually run under Python 3 Brett, does the above approach sound reasonable to you? If so, then I'll do that as a pure documentation change in the Py3k porting guide with a "See Also" to the above blog post, and then mark this as closed/postponed (given the `sitecustomize` approach to enable it, the 3rd party codec should be fine for folks that want the warning behaviour instead) ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 08:14:22 2016 From: report at bugs.python.org (=?utf-8?q?Jos=C3=A9_Manuel?=) Date: Mon, 10 Oct 2016 12:14:22 +0000 Subject: [issue28404] Logging SyslogHandler not appending '\n' to the end Message-ID: <1476101662.48.0.994997122347.issue28404@psf.upfronthosting.co.za> New submission from Jos? Manuel: I'm using SyslogHandler from logging.handlers to send syslog messages to a Fluentd input (https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin/in_syslog.rb), both in TCP and UDP. UDP works fine, but TCP does not work. The "problem" is that the handler is not ending messages with a new line '\n' character (I realized that using tcpdump). I've temporarily added this to line 855 of handlers.py: msg = prio + msg + '\n' And now is working. Now I'm confused because maybe this is not an issue but a problem of Fluentd. For the time, I will create a new class extending SyslogHandler and override the emit function. Thank you for your time. ---------- components: Library (Lib) messages: 278412 nosy: elelement priority: normal severity: normal status: open title: Logging SyslogHandler not appending '\n' to the end type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 08:17:08 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 10 Oct 2016 12:17:08 +0000 Subject: [issue28403] Porting guide: disabling & warning on implicit unicode conversions In-Reply-To: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> Message-ID: <1476101828.33.0.521500725925.issue28403@psf.upfronthosting.co.za> Nick Coghlan added the comment: Adding Petr to the nosy list, as I'd like to get his perspective on this once I have a draft docs patch to review. I also realised it made more sense to just repurpose this issue to cover the proposed docs updates. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, encukou stage: -> needs patch title: Migration RFE: optional warning for implicit unicode conversions -> Porting guide: disabling & warning on implicit unicode conversions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 09:04:44 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 10 Oct 2016 13:04:44 +0000 Subject: [issue28230] tarfile does not support pathlib Message-ID: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> New submission from Berker Peksag: Here's an updated patch with different tests and documentation changes. I simplified Lib/tarfile.py a bit (see my review comments) A slightly off-topic question: I had to update both docstrings and documentation. Should we use this as an opportunity to simplify the docstrings? ---------- Added file: http://bugs.python.org/file45042/issue28230_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 09:08:10 2016 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 10 Oct 2016 13:08:10 +0000 Subject: [issue28403] Porting guide: disabling & warning on implicit unicode conversions In-Reply-To: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> Message-ID: <1476104890.3.0.560027179107.issue28403@psf.upfronthosting.co.za> Petr Viktorin added the comment: In portingguide [0] I could only recommend sitecustomize with a (possibly third-party) codec that emits warnings; not 'undefined'. The things that aren't ported yet are generally either Non-Python applications with Python bindings or plugins (Gimp, Samba, ...), projects that are very large relative to the count of available maintainers (VCSs, Sugar, wxPython, ...), or code that depends on those. If sys.setdefaultencoding('undefined') breaks parts of the standard library, it might be OK for smaller scripts but I fear it won't help big projects much. [0] http://portingguide.readthedocs.io/en/latest/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 09:36:42 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Oct 2016 13:36:42 +0000 Subject: [issue28230] tarfile does not support pathlib In-Reply-To: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> Message-ID: <1476106602.76.0.132149411918.issue28230@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are two kinds of paths in tarinfo: 1) External paths that correspond to filesystem paths. The path of the tar file itself, patches of added files and target directory for extraction. Supporting path protocol looks reasonable for them. 1) Internal paths, they are just string keys inside an archive. They come from TarFile.getnames() and always are strings. I'm not sure that pathlib have relation to this. This issue needs more thoughts. I would not haste with this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 10:43:26 2016 From: report at bugs.python.org (=?utf-8?q?Jos=C3=A9_Manuel?=) Date: Mon, 10 Oct 2016 14:43:26 +0000 Subject: [issue28404] Logging SyslogHandler not appending '\n' to the end In-Reply-To: <1476101662.48.0.994997122347.issue28404@psf.upfronthosting.co.za> Message-ID: <1476110606.71.0.15020812007.issue28404@psf.upfronthosting.co.za> Jos? Manuel added the comment: After reading the RFC5424 it seems that there is no such "new line message delimiter": -------------------------------- 4.3.1. Message Length The message length is the octet count of the SYSLOG-MSG in the SYSLOG-FRAME. A transport receiver MUST use the message length to delimit a syslog message -------------------------------- So I think it must be a Fluentd error. This is what caused my confusion: >From in_syslog.rb (https://github.com/athenahealth/fluent-plugin-newsyslog/blob/master/lib/fluent/plugin/in_newsyslog.rb): -------------------------------- # syslog family add "\n" to each message and this seems only way to split messages in tcp stream Coolio::TCPServer.new(@bind, @port, SocketUtil::TcpHandler, log, "\n", callback) -------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 10:46:48 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Mon, 10 Oct 2016 14:46:48 +0000 Subject: [issue28405] Compile error on Modules/_futuresmodule.c Message-ID: <1476110808.48.0.333996496956.issue28405@psf.upfronthosting.co.za> New submission from Masayuki Yamamoto: I tried to build cpython on cygwin (vista x86). Core interpretor has built to success, but '_futures' extension module has failed (compile error on Modules/_futuresmodule.c:946 ). It has occured since f8815001a390 part of build log: $ uname -a CYGWIN_NT-6.0 masayuki-PC 2.6.0(0.304/5/3) 2016-08-31 14:27 i686 Cygwin $ ./configure --without-threads --prefix=/opt/py37 $ LANG=C make (snip) building '_futures' extension gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I./Include -I/opt/py37/include -I. -I/usr/local/include -I/home/masayuki/var/repos/py37-work01/Include -I/home/masayuki/var/repos/py37-work01 -c /home/masayuki/var/repos/py37-work01/Modules/_futuresmodule.c -o build/temp.cygwin-2.6.0-i686-3.7/home/masayuki/var/repos/py37-work01/Modules/_futuresmodule.o gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-2.6.0-i686-3.7/home/masayuki/var/repos/py37-work01/Modules/_futuresmodule.o -L. -L/opt/py37/lib -L/usr/local/lib -L. -lpython3.7m -o build/lib.cygwin-2.6.0-i686-3.7/_futures.dll build/temp.cygwin-2.6.0-i686-3.7/home/masayuki/var/repos/py37-work01/Modules/_futuresmodule.o: In function `new_future_iter': /home/masayuki/var/repos/py37-work01/Modules/_futuresmodule.c:946: undefined reference to `_PyGC_generation0' /home/masayuki/var/repos/py37-work01/Modules/_futuresmodule.c:946: undefined reference to `_PyGC_generation0' /home/masayuki/var/repos/py37-work01/Modules/_futuresmodule.c:946: undefined reference to `_PyGC_generation0' collect2: error: ld returned 1 exit status (snip) ---------- components: Build, Extension Modules messages: 278418 nosy: bquinlan, masamoto priority: normal severity: normal status: open title: Compile error on Modules/_futuresmodule.c type: compile error versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 10:50:01 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Mon, 10 Oct 2016 14:50:01 +0000 Subject: [issue28405] Compile error on Modules/_futuresmodule.c In-Reply-To: <1476110808.48.0.333996496956.issue28405@psf.upfronthosting.co.za> Message-ID: <1476111001.21.0.559089841823.issue28405@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: I searched declaration for _PyGC_generation0, And it has be found at Include/objimpl.h:259 The found declaration hasn't used PyAPI_DATA macro. Hence, I wrote a patch to wrap declaration by the macro. I has succeeded to build _futures module using the patch. By the way, I has found similar declarations and defines. I'd like to report them, but Should I create each another issues by places? ---------- keywords: +patch Added file: http://bugs.python.org/file45043/_PyGC_generation0-declaration.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 10:58:45 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 10 Oct 2016 14:58:45 +0000 Subject: [issue28405] Compile error on Modules/_futuresmodule.c In-Reply-To: <1476110808.48.0.333996496956.issue28405@psf.upfronthosting.co.za> Message-ID: <1476111525.8.0.869718159449.issue28405@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +inada.naoki, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 11:02:09 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 10 Oct 2016 15:02:09 +0000 Subject: [issue28403] Porting guide: disabling & warning on implicit unicode conversions In-Reply-To: <1476104890.3.0.560027179107.issue28403@psf.upfronthosting.co.za> Message-ID: <57FBAD6D.3000203@egenix.com> Marc-Andre Lemburg added the comment: On 10.10.2016 15:08, Petr Viktorin wrote: > If sys.setdefaultencoding('undefined') breaks parts of the standard library, it might be OK for smaller scripts but I fear it won't help big projects much. That's true. It does break the stdlib (the codec was originally added in order to test exactly this scenario). A new codec "ascii-warn" could easily be added, based on the code used for "undefined". ---------- _______________________________________ Python tracker _______________________________________ From mal at egenix.com Mon Oct 10 11:02:05 2016 From: mal at egenix.com (M.-A. Lemburg) Date: Mon, 10 Oct 2016 17:02:05 +0200 Subject: [issue28403] Porting guide: disabling & warning on implicit unicode conversions In-Reply-To: <1476104890.3.0.560027179107.issue28403@psf.upfronthosting.co.za> References: <1476104890.3.0.560027179107.issue28403@psf.upfronthosting.co.za> Message-ID: <57FBAD6D.3000203@egenix.com> On 10.10.2016 15:08, Petr Viktorin wrote: > If sys.setdefaultencoding('undefined') breaks parts of the standard library, it might be OK for smaller scripts but I fear it won't help big projects much. That's true. It does break the stdlib (the codec was originally added in order to test exactly this scenario). A new codec "ascii-warn" could easily be added, based on the code used for "undefined". -- Marc-Andre Lemburg eGenix.com From report at bugs.python.org Mon Oct 10 11:41:22 2016 From: report at bugs.python.org (Larry Hastings) Date: Mon, 10 Oct 2016 15:41:22 +0000 Subject: [issue28406] Possible PyUnicode_InternInPlace() edge-case bug Message-ID: <1476114082.63.0.695607000765.issue28406@psf.upfronthosting.co.za> New submission from Larry Hastings: A visual inspection of PyUnicode_InternInPlace() suggests there might be a rare edge-case bug lurking there. Specifically, the bug has to do with "interned mortal" strings. Interned mortal strings are stored in the static "interned" dictionary, with their key and value set to the same string. (If "x" is interned, then in the interned dictionary "x" is set to "x".) Under normal circumstances, these two references would keep the string alive forever. However, in order for the string to be *mortal*, the unicode object then DECREFs the string twice so the references in the "interned" dict no longer "count". When the refcnt reaches 0, and the string is being destroyed, unicode_dealloc() temporarily resurrects the object, bumping its reference count up to 3. It then removes the string from the interned dict and destroys it as normal. The actual intern substitution happens in a function called PyUnicode_InternInPlace(). This function looks the string up in the "interned" dictionary, and if the string is there it substitutes in the interned version from the dictionary. There's a curious comment in that function: /* It might be that the GetItem call fails even though the key is present in the dictionary, namely when this happens during a stack overflow. */ Py_ALLOW_RECURSION t = PyDict_GetItem(interned, s); Py_END_ALLOW_RECURSION If t is NULL, then PyUnicode_InternInPlace() goes on to set t in the interned dictionary, reduces the refcnt by 2, etc etc. The problem: if t is in the dictionary, but PyDict_GetItem() fails (during a stack overflow?), then the subsequent PyDict_SetItem() will *overwrite* the existing interned string. Which means the "interned" dict will drop its two references, which means two REFCNTs. If there were only 1 or 2 extant references to this string, it means the string will be immediately dealloc'd, *even though the string was still in use*. I suppose this is already such a speculative condition that it's probably not worrying over. If PyDict_GetItem fails due to stack overflow, perhaps the Python process is doomed to fail soon anyway. Perhaps PyDict_SetItem has no chance of working. But it *seems* like this code is intended to function correctly even when PyDict_GetItem fails due to stack overflow, and I suspect it won't. ---------- components: Interpreter Core messages: 278421 nosy: larry priority: low severity: normal stage: test needed status: open title: Possible PyUnicode_InternInPlace() edge-case bug type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 11:51:41 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 10 Oct 2016 15:51:41 +0000 Subject: [issue28405] Compile error on Modules/_futuresmodule.c In-Reply-To: <1476110808.48.0.333996496956.issue28405@psf.upfronthosting.co.za> Message-ID: <1476114701.55.0.909203737069.issue28405@psf.upfronthosting.co.za> INADA Naoki added the comment: Thank you for reporting. C-API doc [https://docs.python.org/3.7/c-api/gcsupport.html#c._PyObject_GC_TRACK] says: > A macro version of PyObject_GC_Track(). It should not be used for extension modules. So simply replacing it to PyObject_GC_Track() may solve the issue. ---------- assignee: -> inada.naoki priority: normal -> high stage: -> commit review Added file: http://bugs.python.org/file45044/28045-gc_track.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 11:57:22 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 10 Oct 2016 15:57:22 +0000 Subject: [issue28405] Compile error on Modules/_futuresmodule.c In-Reply-To: <1476110808.48.0.333996496956.issue28405@psf.upfronthosting.co.za> Message-ID: <1476115042.69.0.0263302063102.issue28405@psf.upfronthosting.co.za> INADA Naoki added the comment: I need another LGTM from core developer before committing. Yury, could you see it? This is one line patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 12:00:05 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 10 Oct 2016 16:00:05 +0000 Subject: [issue28406] Possible PyUnicode_InternInPlace() edge-case bug In-Reply-To: <1476114082.63.0.695607000765.issue28406@psf.upfronthosting.co.za> Message-ID: <1476115205.77.0.738960409675.issue28406@psf.upfronthosting.co.za> Xiang Zhang added the comment: The code has already been changed in #27454. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 12:00:48 2016 From: report at bugs.python.org (Joshua Jay Herman) Date: Mon, 10 Oct 2016 16:00:48 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1476115248.71.0.829837043383.issue24459@psf.upfronthosting.co.za> Joshua Jay Herman added the comment: Thanks for reviewing Mariatta I have made a new patch that has those typos corrected. ---------- Added file: http://bugs.python.org/file45045/correctedRebasedAddMissingEnvironmentalVariables.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 12:09:13 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 10 Oct 2016 16:09:13 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1476115753.74.0.255351950519.issue27761@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 12:09:39 2016 From: report at bugs.python.org (Larry Hastings) Date: Mon, 10 Oct 2016 16:09:39 +0000 Subject: [issue28406] Possible PyUnicode_InternInPlace() edge-case bug In-Reply-To: <1476114082.63.0.695607000765.issue28406@psf.upfronthosting.co.za> Message-ID: <1476115779.61.0.341482180224.issue28406@psf.upfronthosting.co.za> Larry Hastings added the comment: Ah, indeed. My mistake--I'm working in the Gilectomy branch, which is hilariously out of date. (It's stuck in February 2016.) The new version using PyDict_SetDefault() won't have *this* specific problem. Perhaps later I'll read the new code and see if I can spot a similar problem. But for now it only makes sense to close this issue. ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 12:28:25 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 10 Oct 2016 16:28:25 +0000 Subject: [issue28406] Possible PyUnicode_InternInPlace() edge-case bug In-Reply-To: <1476114082.63.0.695607000765.issue28406@psf.upfronthosting.co.za> Message-ID: <1476116904.99.0.0729967652511.issue28406@psf.upfronthosting.co.za> INADA Naoki added the comment: I think the comment described "Why Py_ALLOW_RECURSION is required", not "t may be NULL even if s is in the intern dict". > If PyDict_GetItem fails due to stack overflow, perhaps the Python process is doomed to fail soon anyway. When I changed the code to use PyDict_SetDefault(), I found "USE_STACKCHECK" macro. See https://docs.python.org/3/c-api/sys.html#c.PyOS_CheckStack But I don't know this can be really happend. Interned dict only contains exact unicode objects. There is no chance for calling user defined __hash__() or __eq__(). ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 12:45:16 2016 From: report at bugs.python.org (Ethan Furman) Date: Mon, 10 Oct 2016 16:45:16 +0000 Subject: [issue28230] tarfile does not support pathlib In-Reply-To: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> Message-ID: <1476117916.9.0.246040817694.issue28230@psf.upfronthosting.co.za> Ethan Furman added the comment: As Serhiy was alluding to, if the incoming path is for the actual tar file and is only passed along to Python itself then we probably don't need to worry about os.fspath(). For names that will be interally stored, or are for accessing internal files, then the proper sequence is check for and call os.fspath if necessary, and then double-check that the name to be used is a str. The double-check is needed because os.fspath may return a bytes object, which tar does not allow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 13:03:24 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Mon, 10 Oct 2016 17:03:24 +0000 Subject: [issue28405] Compile error on Modules/_futuresmodule.c In-Reply-To: <1476110808.48.0.333996496956.issue28405@psf.upfronthosting.co.za> Message-ID: <1476119004.66.0.0882604080589.issue28405@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: Thanks, INADA. I confirmed your solution, and has succeeded to build _futures extension. Your patch has a little misspell. I fixed it. ---------- Added file: http://bugs.python.org/file45046/gc_track-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 13:06:00 2016 From: report at bugs.python.org (Dillon Brock) Date: Mon, 10 Oct 2016 17:06:00 +0000 Subject: [issue28407] Improve coverage of email.utils.make_msgid() Message-ID: <1476119160.34.0.206786092221.issue28407@psf.upfronthosting.co.za> New submission from Dillon Brock: There were 2 lines of email.utils.make_msgid() that were not covered (lines 202 and 204 of Lib/email/utils.py), so I wrote a quick patch to cover them. ---------- components: Tests, email files: make_msgid_coverage.patch keywords: patch messages: 278430 nosy: barry, dillon.brock, r.david.murray priority: normal severity: normal status: open title: Improve coverage of email.utils.make_msgid() type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45047/make_msgid_coverage.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 13:07:13 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 10 Oct 2016 17:07:13 +0000 Subject: [issue28405] Compile error on Modules/_futuresmodule.c In-Reply-To: <1476110808.48.0.333996496956.issue28405@psf.upfronthosting.co.za> Message-ID: <1476119233.98.0.250159305133.issue28405@psf.upfronthosting.co.za> Ned Deily added the comment: revised patch LGTM ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 13:07:44 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 10 Oct 2016 17:07:44 +0000 Subject: [issue28405] Compile error on Modules/_futuresmodule.c In-Reply-To: <1476110808.48.0.333996496956.issue28405@psf.upfronthosting.co.za> Message-ID: <1476119264.01.0.554824056025.issue28405@psf.upfronthosting.co.za> INADA Naoki added the comment: Oh! Thanks, While I ran make, I had missed error message somehow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 13:13:05 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Oct 2016 17:13:05 +0000 Subject: [issue28405] Compile error on Modules/_futuresmodule.c In-Reply-To: <1476110808.48.0.333996496956.issue28405@psf.upfronthosting.co.za> Message-ID: <20161010171301.20229.68091.83140529@psf.io> Roundup Robot added the comment: New changeset a8dd18e375c8 by INADA Naoki in branch '3.6': Issue #28405: Fix compile error for _futuresmodule.c on Cygwin. https://hg.python.org/cpython/rev/a8dd18e375c8 New changeset d2a313d13542 by INADA Naoki in branch 'default': Issue #28405: Fix compile error for _futuresmodule.c on Cygwin. https://hg.python.org/cpython/rev/d2a313d13542 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 13:13:36 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 10 Oct 2016 17:13:36 +0000 Subject: [issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish Message-ID: <1476119616.69.0.933399987937.issue28408@psf.upfronthosting.co.za> New submission from Xiang Zhang: _PyUnicodeWriter_Finish gets 2 problems now: 1. It has two same branches handling empty strings which is redundant. 2. It may leak the inner buffer object when resize_compact fails. When resize_compact fails, the buffer object is left untouched. Then the writer itself is freed and the buffer is leaked. ---------- components: Interpreter Core files: _PyUnicodeWriter_Finish.patch keywords: patch messages: 278434 nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Fix redundant code and memory leak in _PyUnicodeWriter_Finish type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45048/_PyUnicodeWriter_Finish.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 13:30:15 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 10 Oct 2016 17:30:15 +0000 Subject: [issue28328] statistics.geometric_mean has no tests. Defer to 3.7? In-Reply-To: <1475325234.65.0.257375698668.issue28328@psf.upfronthosting.co.za> Message-ID: <1476120615.58.0.723149737909.issue28328@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 13:37:52 2016 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 10 Oct 2016 17:37:52 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags Message-ID: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> New submission from Charalampos Stratakis: Until python3.6.0a04 it was possible to pass multiple times the -x option at regrtest. However since the 3.6.0b1 when trying the same thing I get an error. Test names are random. python3 -m test.regrtest -x test_venv -x test_gdb usage: python -m test [options] [test_name1 [test_name2 ...]] python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]] regrtest.py: error: unrecognized arguments: test_gdb If however I omit the second -x, the tests run fine and correctly exclude the specific tests. Was the change intentional or a side effect from something else? ---------- components: Tests messages: 278435 nosy: cstratak priority: normal severity: normal status: open title: test.regrtest does not support multiple -x flags versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 13:45:24 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 10 Oct 2016 17:45:24 +0000 Subject: [issue28179] Segfault in test_recursionlimit_fatalerror In-Reply-To: <1474017738.64.0.366816916836.issue28179@psf.upfronthosting.co.za> Message-ID: <1476121524.38.0.564916526245.issue28179@psf.upfronthosting.co.za> Ned Deily added the comment: Since this is also reproducible on some 3.5.2 platforms, I don't think it qualifies as a release blocker for 3.6.0. But it still should be addressed. ---------- priority: release blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 14:03:43 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Oct 2016 18:03:43 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476122623.01.0.673848908961.issue28409@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +haypo stage: -> needs patch type: -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 14:04:19 2016 From: report at bugs.python.org (Aviv Palivoda) Date: Mon, 10 Oct 2016 18:04:19 +0000 Subject: [issue20463] sqlite dumpiter dumps invalid script when virtual tables are used In-Reply-To: <1391198256.46.0.541752876278.issue20463@psf.upfronthosting.co.za> Message-ID: <1476122659.03.0.841102984838.issue20463@psf.upfronthosting.co.za> Aviv Palivoda added the comment: Attached is patch with a fix for this issue. This is not as comprehensive as the solution in apsw but I think this should cover most of the cases. The result for Ronny dump after this fix is: BEGIN TRANSACTION; PRAGMA writable_schema=ON; INSERT INTO sqlite_master(type,name,tbl_name,rootpage,sql)VALUES('table','test','test',0,'CREATE VIRTUAL TABLE test using fts4(example)'); CREATE TABLE 'test_content'(docid INTEGER PRIMARY KEY, 'c0example'); CREATE TABLE 'test_docsize'(docid INTEGER PRIMARY KEY, size BLOB); CREATE TABLE 'test_segdir'(level INTEGER,idx INTEGER,start_block INTEGER,leaves_end_block INTEGER,end_block INTEGER,root BLOB,PRIMARY KEY(level, idx)); CREATE TABLE 'test_segments'(blockid INTEGER PRIMARY KEY, block BLOB); CREATE TABLE 'test_stat'(id INTEGER PRIMARY KEY, value BLOB); PRAGMA writable_schema=OFF; COMMIT; ---------- keywords: +patch nosy: +palaviv Added file: http://bugs.python.org/file45049/20463.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 14:09:55 2016 From: report at bugs.python.org (Dimitri Merejkowsky) Date: Mon, 10 Oct 2016 18:09:55 +0000 Subject: [issue28334] netrc does not work if $HOME is not set In-Reply-To: <1475336154.44.0.44449733804.issue28334@psf.upfronthosting.co.za> Message-ID: <1476122995.93.0.826346433658.issue28334@psf.upfronthosting.co.za> Dimitri Merejkowsky added the comment: > if it make sense to run this on Windows I found this issue while running cross-platform code. I needed to store some credentials, did not mind having them in plain-text and I thought .netrc was a good place for this. (did not need to re-invent the wheel ...) > don't know what unix users might reasonbly expect. Well, I guess as a bonus of this patch we could add a link to the `os.path.expanduser` section[1] in `netrc` documentation. The behavior when $HOME is not set is properly documented there. [1] https://docs.python.org/3/library/os.path.html#os.path.expanduser ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 14:19:05 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Oct 2016 18:19:05 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476123545.95.0.651641148091.issue28409@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems this is related to some changes in argparse. ---------- nosy: +bethard, serhiy.storchaka versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 14:38:26 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 10 Oct 2016 18:38:26 +0000 Subject: [issue20215] socketserver.TCPServer can not listen IPv6 address In-Reply-To: <1389319382.42.0.481013787618.issue20215@psf.upfronthosting.co.za> Message-ID: <1476124706.62.0.503395330799.issue20215@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- nosy: +jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 14:52:55 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Oct 2016 18:52:55 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476125575.5.0.307288986131.issue28409@psf.upfronthosting.co.za> R. David Murray added the comment: That sounds like a regression in argparse that we'd better track down. ---------- nosy: +larry, ned.deily, r.david.murray priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 14:59:40 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 10 Oct 2016 18:59:40 +0000 Subject: [issue28230] tarfile does not support pathlib In-Reply-To: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> Message-ID: <1476125980.96.0.0623073099244.issue28230@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 15:08:50 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 10 Oct 2016 19:08:50 +0000 Subject: [issue28314] ElementTree: Element.getiterator(tag) broken in 3.6 In-Reply-To: <1475178246.36.0.289281608925.issue28314@psf.upfronthosting.co.za> Message-ID: <1476126530.85.0.503876377075.issue28314@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 15:16:00 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 10 Oct 2016 19:16:00 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1476126960.28.0.287481513194.issue2897@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: docs at python -> belopolsky stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 15:40:11 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 10 Oct 2016 19:40:11 +0000 Subject: [issue28404] Logging SyslogHandler not appending '\n' to the end In-Reply-To: <1476101662.48.0.994997122347.issue28404@psf.upfronthosting.co.za> Message-ID: <1476128411.48.0.842117934167.issue28404@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 15:50:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Oct 2016 19:50:27 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." Message-ID: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Sometimes after catching an exception we need to raise new exception of specific type, but save the information about current exception. In Python the syntax "raise ... from ..." serves this purpose (PEP 3134). But in C the code that implements this is too cumbersome. Proposed patch adds private convenient function that raises an exception and sets previously raised exception as its __context__ and __cause__ attributes. This is a generalized version of gen_chain_runtime_error() from Objects/genobject.c. It could be reused in three other places: Objects/abstract.c, Objects/unicodeobject.c, and Modules/zipimport.c (currently only __context__ is set, but setting __cause__ looks preferable), and in new code for issue28214. Maybe there are other opportunities. ---------- components: Interpreter Core files: _PyErr_FormatFromCause.patch keywords: patch messages: 278441 nosy: haypo, serhiy.storchaka, yselivanov priority: normal severity: normal stage: patch review status: open title: Add convenient C API for "raise ... from ..." type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45050/_PyErr_FormatFromCause.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 15:51:44 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Oct 2016 19:51:44 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1476129104.51.0.370881848802.issue28214@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add convenient C API for "raise ... from ..." _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 15:52:47 2016 From: report at bugs.python.org (Thomas Guettler) Date: Mon, 10 Oct 2016 19:52:47 +0000 Subject: [issue26869] unittest longMessage docs In-Reply-To: <1461743267.94.0.620093650485.issue26869@psf.upfronthosting.co.za> Message-ID: <1476129167.35.0.501849242437.issue26869@psf.upfronthosting.co.za> Thomas Guettler added the comment: @Mariatta thank you very much. This update makes the docs easy to read and understand. Thank you :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 16:37:05 2016 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 10 Oct 2016 20:37:05 +0000 Subject: [issue28404] Logging SyslogHandler not appending '\n' to the end In-Reply-To: <1476101662.48.0.994997122347.issue28404@psf.upfronthosting.co.za> Message-ID: <1476131825.51.0.0900878090229.issue28404@psf.upfronthosting.co.za> Vinay Sajip added the comment: > So I think it must be a Fluentd error. So I'll close this. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 17:06:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Oct 2016 21:06:20 +0000 Subject: [issue28230] tarfile does not support pathlib In-Reply-To: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> Message-ID: <1476133580.1.0.170559156176.issue28230@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It seems to me that tarfile already supports path protocol for all external patches and no changes for tarfile are needed. Proposed patch adds tests for (already implemented) support of pathlike protocol in tarfile. ---------- Added file: http://bugs.python.org/file45051/test_tarfile_pathlike.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 17:56:38 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 10 Oct 2016 21:56:38 +0000 Subject: [issue28405] Compile error on Modules/_futuresmodule.c In-Reply-To: <1476110808.48.0.333996496956.issue28405@psf.upfronthosting.co.za> Message-ID: <1476136598.46.0.174977604883.issue28405@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 18:33:06 2016 From: report at bugs.python.org (Eric Snow) Date: Mon, 10 Oct 2016 22:33:06 +0000 Subject: [issue28411] Eliminate PyInterpreterState.modules. Message-ID: <1476138783.81.0.661524291989.issue28411@psf.upfronthosting.co.za> New submission from Eric Snow: tl;dr PyInterpreterState does not need a "modules" field. Attached is a patch that removes it. During interpreter startup [1] the sys module is imported using the same C API [2] as any other builtin module. That API only requires one bit of import state, sys.modules. Obviously, while the sys module is being imported, sys.modules does not exist yet. To accommodate this situation, PyInterpreterState has a "modules" field. The problem is that PyInterpreterState.modules remains significant in the C-API long after it is actually needed during startup. This creates the potential for sys.modules and PyInterpreterState.modules to be out of sync. Currently I'm working on an encapsulation of the import state. PyInterpreterState.modules complicates the scene enough that I'd like to see it go away. The attached patch does so by adding private C-API functions that take a modules arg, rather than getting it from the interpreter state. These are used during interpreter startup, rendering PyInterpreterState.modules unnecessary and allowing sys.modules to become the single source of truth. If this patch lands, we can close issue12633. [1] see _Py_InitializeEx_Private() and Py_NewInterpreter() in Python/pylifecycle.c [2] see PyModule_Create2() and _PyImport_FindBuiltin() in Python/import.c ---------- components: Interpreter Core files: drop-interp-modules.diff keywords: patch messages: 278445 nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: patch review status: open title: Eliminate PyInterpreterState.modules. versions: Python 3.7 Added file: http://bugs.python.org/file45052/drop-interp-modules.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 18:57:46 2016 From: report at bugs.python.org (Michael Partridge) Date: Mon, 10 Oct 2016 22:57:46 +0000 Subject: [issue28412] os.path.splitdrive documentation out of date Message-ID: <1476140266.77.0.441294579348.issue28412@psf.upfronthosting.co.za> New submission from Michael Partridge: ntpath.splitdrive was updated in patch 26ec6248ee8b. (I think this was released in 2.7.8.) This changes the behaviour of splitdrive for UNC style paths. Previously: >>> ntpath.splitdrive(r'\\nancy\foo\bar') ('', '\\\\nancy\\foo\\bar') >>> Now: >>> ntpath.splitdrive(r'\\nancy\foo\bar') ('\\\\nancy\\foo', '\\bar') >>> The documentation should be updated to say the same. ---------- assignee: docs at python components: Documentation messages: 278446 nosy: docs at python, snooter priority: normal severity: normal status: open title: os.path.splitdrive documentation out of date type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 19:25:47 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Oct 2016 23:25:47 +0000 Subject: [issue28412] os.path.splitdrive documentation out of date In-Reply-To: <1476140266.77.0.441294579348.issue28412@psf.upfronthosting.co.za> Message-ID: <1476141947.58.0.0448254031867.issue28412@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 19:33:20 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Oct 2016 23:33:20 +0000 Subject: [issue28334] netrc does not work if $HOME is not set In-Reply-To: <1475336154.44.0.44449733804.issue28334@psf.upfronthosting.co.za> Message-ID: <1476142399.99.0.185342852513.issue28334@psf.upfronthosting.co.za> Terry J. Reedy added the comment: FWIW, some history: The $HOME lookup was in Guido's original 1998-12-22 patch: if not file: file = os.path.join(os.environ['HOME'], ".netrc") The lookup was wrapped in try-except 4 years later to give a 'consistent error message'. Module ntpath dates back to 1994. Expanduser only used HOMEDRIVE and HOMEPATH. Guido added support for HOME in 1997. Support for USERPROFILE was added a decade later. Since the module is NOT marked 'Unix-only', I think it a bug to not use os.path.expanduser. Larry, Ned, do either of you have an opinion on whether the change should be made in current versions or only 3.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 19:44:15 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 10 Oct 2016 23:44:15 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476143055.73.0.998472996215.issue28410@psf.upfronthosting.co.za> Changes by Emanuel Barry : ---------- nosy: +ebarry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 21:51:31 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Oct 2016 01:51:31 +0000 Subject: [issue28248] Upgrade installers to OpenSSL 1.0.2j In-Reply-To: <1474552584.95.0.0318594270303.issue28248@psf.upfronthosting.co.za> Message-ID: <1476150691.64.0.329566685514.issue28248@psf.upfronthosting.co.za> Ned Deily added the comment: We didn't get this into 3.6.0b2; needs to be in 3.6.0b3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 21:57:29 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Oct 2016 01:57:29 +0000 Subject: [issue28208] update sqlite to 3.14.2 In-Reply-To: <1474317408.19.0.662096879681.issue28208@psf.upfronthosting.co.za> Message-ID: <1476151049.9.0.294012637644.issue28208@psf.upfronthosting.co.za> Ned Deily added the comment: I'd like to see this in 3.6.0b3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 22:46:57 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 11 Oct 2016 02:46:57 +0000 Subject: [issue13646] Document poor interaction between multiprocessing and -m on Windows In-Reply-To: <1324476963.91.0.938014809315.issue13646@psf.upfronthosting.co.za> Message-ID: <1476154017.89.0.881461337575.issue13646@psf.upfronthosting.co.za> Nick Coghlan added the comment: These interactions were fixed in the release where *nix multiprocessing gained the ability to mimic the Windows behaviour. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 22:50:14 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 11 Oct 2016 02:50:14 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476154214.8.0.689732603901.issue28410@psf.upfronthosting.co.za> Nick Coghlan added the comment: Serhiy, how does this version compare/relate to the previous discussion in http://bugs.python.org/issue23188 ? ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 22:52:19 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 11 Oct 2016 02:52:19 +0000 Subject: [issue28208] update sqlite to 3.14.2 In-Reply-To: <1474317408.19.0.662096879681.issue28208@psf.upfronthosting.co.za> Message-ID: <1476154339.69.0.195483403361.issue28208@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hello, Attached is the patch for updating sqlite version to 3.14.2. Please review, and let me know if this works. Thanks :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45053/issue28208.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 23:15:53 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 11 Oct 2016 03:15:53 +0000 Subject: [issue28248] Upgrade installers to OpenSSL 1.0.2j In-Reply-To: <1474552584.95.0.0318594270303.issue28248@psf.upfronthosting.co.za> Message-ID: <1476155753.98.0.00508804443591.issue28248@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, I updated the openssl version from 1.0.2h to 1.0.2j in build-installer.py Please let me know if this works. Thanks :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45054/issue28248.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 23:30:36 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Oct 2016 03:30:36 +0000 Subject: [issue28248] Upgrade installers to OpenSSL 1.0.2j In-Reply-To: <1474552584.95.0.0318594270303.issue28248@psf.upfronthosting.co.za> Message-ID: <20161011033033.95017.49558.B51DFF93@psf.io> Roundup Robot added the comment: New changeset c29045efd25e by Zachary Ware in branch '2.7': Issue #28248: Update Windows build to use OpenSSL 1.0.2j https://hg.python.org/cpython/rev/c29045efd25e New changeset d7b9ce8ae79b by Zachary Ware in branch '3.4': Issue #28248: Update Windows build to use OpenSSL 1.0.2j https://hg.python.org/cpython/rev/d7b9ce8ae79b New changeset 5fa74d8c987b by Zachary Ware in branch '3.5': Issue #28248: Merge with 3.4 https://hg.python.org/cpython/rev/5fa74d8c987b New changeset cc5006dab787 by Zachary Ware in branch '3.6': Issue #28248: Merge with 3.5 https://hg.python.org/cpython/rev/cc5006dab787 New changeset fea9ff9e745d by Zachary Ware in branch 'default': Issue #28248: Merge with 3.6 https://hg.python.org/cpython/rev/fea9ff9e745d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 23:38:06 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Oct 2016 03:38:06 +0000 Subject: [issue28208] update sqlite to 3.14.2 In-Reply-To: <1474317408.19.0.662096879681.issue28208@psf.upfronthosting.co.za> Message-ID: <20161011033803.1447.52583.4891E218@psf.io> Roundup Robot added the comment: New changeset b7e068d6c53f by Zachary Ware in branch '3.6': Issue #28208: Update Windows build to use SQLite 3.14.2.0 https://hg.python.org/cpython/rev/b7e068d6c53f New changeset 3e329b553567 by Zachary Ware in branch 'default': Issue #28208: Merge with 3.6 https://hg.python.org/cpython/rev/3e329b553567 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 00:06:06 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 11 Oct 2016 04:06:06 +0000 Subject: [issue28411] Eliminate PyInterpreterState.modules. In-Reply-To: <1476138783.81.0.661524291989.issue28411@psf.upfronthosting.co.za> Message-ID: <1476158766.7.0.025800634681.issue28411@psf.upfronthosting.co.za> Nick Coghlan added the comment: (added Graham Dumpleton to the nosy list to ask if this change may impact mod_wsgi for 3.7) +1 on the general idea, but given that the current field is a public part of the interpreter state, the replacement access API should really be public as well - we can't be sure folks will always be going through the "PyImport_GetModuleDict()" API. If you replace the addition of the `_PyImport_GetModuleDict` API with a public `PyInterpreterState_GetModuleDict` API, I think that will cover it - the new calls would just be "PyInterpreterState_GetModuleCache(tstate->interp)" rather than `_PyImport_GetModuleDict(tstate)` Folks accessing this field directly can then define their own shim function if PyInterpreterState_GetModuleCache isn't defined. (The rationale for the GetModuleDict -> GetModuleCache change is that "ModuleDict" is ambiguous - every module has a dict. For PyImport_* we're stuck with it, but the "PyImport" prefix at least gives a hint that the reference might be to the sys.modules cache. That affordance doesn't exist for the "PyInterpeterState" prefix. ---------- nosy: +grahamd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 00:34:18 2016 From: report at bugs.python.org (Graham Dumpleton) Date: Tue, 11 Oct 2016 04:34:18 +0000 Subject: [issue28411] Eliminate PyInterpreterState.modules. In-Reply-To: <1476138783.81.0.661524291989.issue28411@psf.upfronthosting.co.za> Message-ID: <1476160458.55.0.849634628567.issue28411@psf.upfronthosting.co.za> Graham Dumpleton added the comment: I always use PyImport_GetModuleDict(). So long as that isn't going away I should be good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 01:01:48 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 11 Oct 2016 05:01:48 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476162108.68.0.451783358644.issue28409@psf.upfronthosting.co.za> Xiang Zhang added the comment: This regression is introduced in 4df2d43e995d. And actually to skip multiple tests, you should use python3 -m test.regrtest -x test_venv test_gdb. Although Charalampos's example could work, it actually treats -x as a test. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 01:10:59 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 11 Oct 2016 05:10:59 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476162659.44.0.287773442835.issue28409@psf.upfronthosting.co.za> Xiang Zhang added the comment: So should we still consider this a regression? Actually -x is used as a hint flag and should not be used as -x arg pair. The right usage could still work now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 01:47:54 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Oct 2016 05:47:54 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476164874.62.0.416365714153.issue28409@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue is not specific to -x, but affects all options. Following lines work: ./python -m test.regrtest -v test_unary test_binop ./python -m test.regrtest -u all test_unary test_binop ./python -m test.regrtest test_unary test_binop -v ./python -m test.regrtest test_unary test_binop -u all But following lines don't work: ./python -m test.regrtest test_unary -v test_binop ./python -m test.regrtest test_unary -u all test_binop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 01:57:00 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 11 Oct 2016 05:57:00 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476165420.54.0.221511969781.issue28409@psf.upfronthosting.co.za> Xiang Zhang added the comment: > ./python -m test.regrtest test_unary -v test_binop > ./python -m test.regrtest test_unary -u all test_binop These also fail in 3.6.0a4. You can only specify options after args now. test_binop is not valid option. Isn't this the expected behaviour? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 01:59:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Oct 2016 05:59:24 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476165564.38.0.0253546698331.issue28410@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know how it is related to issue23188. Maybe solving issue23188 will make _PyErr_ChainExceptions and the function proposed in this issue redundant. Or will make them simpler. But it looks to me that issue23188 is far from the completion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 02:02:34 2016 From: report at bugs.python.org (Matthias Klose) Date: Tue, 11 Oct 2016 06:02:34 +0000 Subject: [issue28413] unprefixed global symbol freegrammar Message-ID: <1476165754.08.0.234164363206.issue28413@psf.upfronthosting.co.za> New submission from Matthias Klose: changeset 103932 introduced an unprefixed global symbol freegrammar. Please make it local, or prefix it with _Py_. ---------- messages: 278463 nosy: benjamin.peterson, doko priority: normal severity: normal stage: needs patch status: open title: unprefixed global symbol freegrammar versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 02:18:46 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Oct 2016 06:18:46 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476166726.5.0.313067406078.issue28409@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed, previously -x in the middle of test names worked only by accident, because it was interpreted as the name of excluded test. Now it stops positional arguments. Current behavior is explainable, but surprising. This part of argparse is not clear and can cause unexpected effects. I afraid that argparse is incorrectly used in tarfile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 02:21:19 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Oct 2016 06:21:19 +0000 Subject: [issue28413] unprefixed global symbol freegrammar In-Reply-To: <1476165754.08.0.234164363206.issue28413@psf.upfronthosting.co.za> Message-ID: <20161011062116.20766.42038.5635A0E9@psf.io> Roundup Robot added the comment: New changeset 032d807039b9 by Benjamin Peterson in branch '3.6': prefix freegrammar (closes #28413) https://hg.python.org/cpython/rev/032d807039b9 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 04:02:36 2016 From: report at bugs.python.org (Anton Sychugov) Date: Tue, 11 Oct 2016 08:02:36 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names Message-ID: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> New submission from Anton Sychugov: In accordance with http://tools.ietf.org/html/rfc6125#section-6.4.2: "If the DNS domain name portion of a reference identifier is an internationalized domain name, then an implementation MUST convert any U-labels [IDNA-DEFS] in the domain name to A-labels before checking the domain name." The question is: Where in python stdlib should it to convert domain name from U-label to A-label? Should it be in ssl._dnsname_match, e.g.: ... hostname = hostname.encode('idna').decode('utf-8') ... Or should it be at ssl._dnsname_match caller level? I found that error appears after using ssl.SSLContext.wrap_bio, which in turn uses internal newPySSLSocket, which in turn always decode server_hostname through: PySSLSocket *self; ... PyObject *hostname = PyUnicode_Decode(server_hostname, strlen(server_hostname), "idna", "strict"); ... self->server_hostname = hostname; In this way, SSLSocket always contains U-label in its server_hostname field, and ssl._dnsname_match falis with "ssl.CertificateError: hostname ... doesn't match either of ..." And i don't understand where is a bug, or is it a bug. ---------- components: asyncio messages: 278466 nosy: abracadaber, gvanrossum, yselivanov priority: normal severity: normal status: open title: SSL match_hostname fails for internationalized domain names versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 04:23:36 2016 From: report at bugs.python.org (Anton Sychugov) Date: Tue, 11 Oct 2016 08:23:36 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1476174216.4.0.181482743375.issue28414@psf.upfronthosting.co.za> Changes by Anton Sychugov : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 04:56:20 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 11 Oct 2016 08:56:20 +0000 Subject: [issue28415] PyUnicode_FromFromat interger format handling different from printf about zeropad Message-ID: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> New submission from Xiang Zhang: Although declared *exactly equivalent* to printf in the doc, PyUnicode_FromFormat could generate different result from printf with the same format. For example: from ctypes import pythonapi, py_object, c_int f = getattr(pythonapi, 'PyUnicode_FromFormat') f.restype = py_object f(b'%010.5d', c_int(100)) '0000000100' while printf outputs: printf("%010.5d\n", 100); 00100 I use both gcc and clang to compile and get the same result. gcc gives me a warning: warning: '0' flag ignored with precision and ?%d? gnu_printf format I am not sure this should be fixed. It seems the change could break backwards compatibility. ---------- components: Interpreter Core messages: 278467 nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal status: open title: PyUnicode_FromFromat interger format handling different from printf about zeropad type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 05:05:21 2016 From: report at bugs.python.org (Anton Sychugov) Date: Tue, 11 Oct 2016 09:05:21 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1476176721.98.0.611962978499.issue28414@psf.upfronthosting.co.za> Changes by Anton Sychugov : ---------- assignee: -> christian.heimes components: +SSL nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 05:32:00 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 11 Oct 2016 09:32:00 +0000 Subject: [issue28384] hmac cannot be used with shake algorithms In-Reply-To: <1475841044.31.0.0614510494585.issue28384@psf.upfronthosting.co.za> Message-ID: <1476178320.79.0.681558310515.issue28384@psf.upfronthosting.co.za> Christian Heimes added the comment: It's not a bug, but indented behavior. It does not make any sense to use SHAKE with the HMAC construct. In fact it does not make sense to combine Keccak sponge or Blake2 with HMAC at all. HMAC is only necessary for old, Merkle-Damgard hashing algorithms like MD5, SHA1 and SHA2, because they are subject to length extension attacks. The correct solution is 4. improve documentation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:05:20 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 11 Oct 2016 11:05:20 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476183920.16.0.49801706523.issue28397@psf.upfronthosting.co.za> Stefan Krah added the comment: In the following program, with gcc-5.3 doit() is significantly faster than doit2() in 64-bit Linux: ================================================================ #include int doit(int64_t index, int64_t nitems) { return index < 0 || index >= nitems; } int doit2(int64_t index, int64_t nitems) { return (uint64_t)index >= (uint64_t)nitems; } int main(void) { int count, i; for (i = 0; i < 1000000000; i++) { count += doit(832921, i); } return count; } ================================================================ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:31:47 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 11 Oct 2016 11:31:47 +0000 Subject: [issue12660] test_gdb fails when installed In-Reply-To: <1312038409.05.0.274432685937.issue12660@psf.upfronthosting.co.za> Message-ID: <1476185507.64.0.644700581678.issue12660@psf.upfronthosting.co.za> INADA Naoki added the comment: Is this issue OK to close? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:45:08 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 11 Oct 2016 11:45:08 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476186308.85.0.135300165503.issue28397@psf.upfronthosting.co.za> Stefan Krah added the comment: The difference in favor of doit() is even more pronounced with this loop (also sorry for the uninitialized variable, but that does not make a difference for benchmarking): ===================================== for (i = 0; i < 10000; i++) { for (j = 0; j < 10000; j++) { count += doit(i, j); } } ====================================== ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:45:29 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 11 Oct 2016 11:45:29 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476186329.18.0.971447177759.issue28397@psf.upfronthosting.co.za> ???? ????????? added the comment: I have tested. performace differs in about of two times. gcc -O3 0.22 nanoseconds per comparison. vs 0.58 nanoseconds per comparison. Does it cost a time that we spent to discuss here ? ---------- nosy: +mmarkk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:47:03 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 11 Oct 2016 11:47:03 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476186423.77.0.83341077122.issue28397@psf.upfronthosting.co.za> Stefan Krah added the comment: Which version is faster in your tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:47:37 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 11 Oct 2016 11:47:37 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476186457.06.0.690585305293.issue28397@psf.upfronthosting.co.za> ???? ????????? added the comment: Much more conveniet way is to use unsigned variables in appropriate places. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:49:03 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 11 Oct 2016 11:49:03 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476186543.35.0.357588105186.issue28397@psf.upfronthosting.co.za> ???? ????????? added the comment: oh shi....doit() i.e. return index < 0 || index >= nitems; is faster! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:50:14 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 11 Oct 2016 11:50:14 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476186614.1.0.59102406036.issue28397@psf.upfronthosting.co.za> ???? ????????? added the comment: Without optimisation in compiler (-O0) speed is the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:51:41 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 11 Oct 2016 11:51:41 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476186701.68.0.409938640575.issue28397@psf.upfronthosting.co.za> ???? ????????? added the comment: -O2 -- the same speed too! -O3 really helps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:52:11 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 11 Oct 2016 11:52:11 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476186731.28.0.120067198313.issue28397@psf.upfronthosting.co.za> ???? ????????? added the comment: $ gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 07:54:46 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 11 Oct 2016 11:54:46 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476186886.05.0.121637327478.issue28397@psf.upfronthosting.co.za> Stefan Krah added the comment: That matches my results as well: -O2 gives about the same speed, with -O3 doit() has a huge advantage. I'm not sure this is an optimization at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 08:40:16 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Oct 2016 12:40:16 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476189616.07.0.477129999937.issue28409@psf.upfronthosting.co.za> R. David Murray added the comment: OK, so this isn't a regression in argparse itself? I thought you meant it was, which is why I set it to release blocker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 09:05:46 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Oct 2016 13:05:46 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476191146.3.0.746874182157.issue28397@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In your example functions are inlined. If prohibit inlining, the second function is faster. $ gcc -O3 -o issue28397 issue28397-2.c $ time ./issue28397 0 real 0m8.097s user 0m7.992s sys 0m0.012s $ time ./issue28397 1 real 0m5.467s user 0m5.436s sys 0m0.024s ---------- Added file: http://bugs.python.org/file45055/issue28397-2.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 09:16:12 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Oct 2016 13:16:12 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476191772.9.0.0853699928735.issue28409@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No, this is not a regression in argparse itself, nor in regrtest (as Xiang pointed, original example is incorrect use). But I'm not sure about the support of options after positional arguments. This is dangerous feature. I'm going to investigate this further and find whether all is correct or needed some code or documentation changes. ---------- priority: release blocker -> normal stage: needs patch -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 09:20:13 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 11 Oct 2016 13:20:13 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1476192013.6.0.198249210962.issue28414@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for bringing this to my attention. I can confirm that the code is broken. Further more there are no tests for IDN for server_hostname. * server_hostname must be an IDN U-label (loc?lhost) * SSL handshake correctly converts and sends TLS SNI as IDN A-label (xn--loclhost-2za) * getpeercert() returns DNS SAN as IDN A-label. It's less than ideal but required. * the serverhostname_callback is called with IDN U-label * match_hostname() is called with IDN U-label The bug is clearly in match_hostname(). The function fails to convert the hostname U-label to A-label before it compares the certificate. I have a rough draft of a patch here https://github.com/tiran/cpython/tree/issue28414_idna_verify By the way IDNA support in Python is broken in general, #17305. We still don't support the latest IDNA standard from 2008 (!). IDNA 2003 is not compatible with German, Greek, Farsi and Sinhalese domains, http://unicode.org/faq/idn.html. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 09:20:32 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 11 Oct 2016 13:20:32 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1476192032.25.0.573476088937.issue28414@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 09:24:31 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 11 Oct 2016 13:24:31 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476192271.97.0.411908781425.issue28397@psf.upfronthosting.co.za> ???? ????????? added the comment: $ gcc -O3 -DDOIT=doit ./zzz.c -o zzz && time ./zzz real 0m1.675s user 0m1.672s sys 0m0.000s $ gcc -O3 -DDOIT=doit2 ./zzz.c -o zzz && time ./zzz real 0m1.657s user 0m1.656s sys 0m0.000s ==================================================== #include static int __attribute__((noinline)) doit(int64_t index, int64_t nitems) { return index < 0 || index >= nitems; } static int __attribute__((noinline)) doit2(int64_t index, int64_t nitems) { return (uint64_t)index >= (uint64_t)nitems; } int main(void) { int count=0, i; for (i = 0; i < 1000000000; i++) { count += DOIT(832921, i); } return count; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 09:30:58 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 11 Oct 2016 13:30:58 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476192658.67.0.289705422722.issue28397@psf.upfronthosting.co.za> Stefan Krah added the comment: On 64-bit Linux there's no difference: $ ./usr/bin/gcc -O3 -o issue28397-2 issue28397-2.c $ time ./issue28397-2 0 real 0m2.486s user 0m2.424s sys 0m0.014s $ time ./issue28397-2 1 real 0m2.433s user 0m2.422s sys 0m0.008s Also, most of the time "index < 0 || index >= nitems" *is* inlined, and it was at least three times faster here. I guess the general point is that such micro-optimizations are unpredictable on modern architectures and modern compilers. Note that the fast inlined version used SSE instructions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 09:32:50 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Oct 2016 13:32:50 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476192770.83.0.30088363356.issue28397@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: "The latter form generates simpler machine code." Since this issue is an optimization, can you please provide results of Python benchmarks? Maybe run the performance benchmark suite? I just released performance 0.3 with new benchmarks and less bugs! ;-) http://github.com/python/performance ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 09:36:15 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Oct 2016 13:36:15 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476192975.23.0.327380874494.issue28409@psf.upfronthosting.co.za> STINNER Victor added the comment: Xiang: "This regression is introduced in 4df2d43e995d." Sorry, my commit message is very short. I made this change because I was very annoying of getting "unknown test -m" and "unknown test test_access" when using the -m option to filter tests: ./python -m test test_os -m test_access It's annoying to have to type: ./python -m test -m test_access test_os By the way, it seems weird to have two consecutive -m with two different meanings ;-) I didn't expect any regression, since argparse is smart to parse arguments. If something is wrong, I wouldn't call it a bug in argparse, but a bug in regrtest, how regrtest uses argparse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 09:42:10 2016 From: report at bugs.python.org (Anton Sychugov) Date: Tue, 11 Oct 2016 13:42:10 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1476193330.16.0.640525468413.issue28414@psf.upfronthosting.co.za> Anton Sychugov added the comment: Yes, I misspelled, match_hostname() fails with ssl.CertificateError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 10:25:25 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Oct 2016 14:25:25 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476195925.62.0.680267757494.issue28397@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unlikely this optimization have measurable affect on benchmarks. I opened this issue because this optimization already was applied to deque (issue23553), and it is easy to write a script for applying it to all code. But since there are doubts about this optimization, I withdraw my patch. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 10:35:03 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Oct 2016 14:35:03 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476196503.7.0.125463754733.issue28409@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached patch should fix the issue. I didn't know that argparse was so strict: "arg1 -v arg2" is not supported by default, see the issue #14191, whereas it works well with optparse. The patch uses parse_known_args() as a workaround, and then manually checks for unknown options. ---------- keywords: +patch Added file: http://bugs.python.org/file45056/regrtest_cli.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 10:39:06 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Oct 2016 14:39:06 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476196746.69.0.533494262954.issue28397@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy Storchaka: "I opened this issue because this optimization already was applied to deque (issue23553)" Ah, change 1e89094998b2 written by Raymond Hettinger last year, Raymond who wrote (msg278397): "Don't change the code in the collections module. While semantically valid, the change obfuscates the code." :-) To stay consistent, I suggest to revert the useless micro-optimization 1e89094998b2. Python uses Py_ssize_t instead of size_t to support "i >= 0" checks", it's a deliberate choice to catch bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 10:50:06 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Oct 2016 14:50:06 +0000 Subject: [issue28397] Faster index range checks In-Reply-To: <1476016325.64.0.828735989384.issue28397@psf.upfronthosting.co.za> Message-ID: <1476197406.23.0.906147686578.issue28397@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Raymond extracted his optimization into separate function and commented it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 10:52:46 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 11 Oct 2016 14:52:46 +0000 Subject: [issue17305] IDNA2008 encoding missing In-Reply-To: <1361928766.42.0.728949411958.issue17305@psf.upfronthosting.co.za> Message-ID: <1476197566.37.0.459016304172.issue17305@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm considering lack of IDNA 2008 a security issue for applications that perform DNS lookups and X.509 cert validation. Applications may end up connecting to the wrong machine and even validate the cert correctly. Wrong: >>> import socket >>> u'stra?e.de'.encode('idna') 'strasse.de' >>> socket.gethostbyname(u'stra?e.de'.encode('idna')) '72.52.4.119' Correct: >>> import idna >>> idna.encode(u'stra?e.de') 'xn--strae-oqa.de' >>> socket.gethostbyname(idna.encode(u'stra?e.de')) '81.169.145.78' ---------- priority: high -> critical type: enhancement -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 11:42:59 2016 From: report at bugs.python.org (Mariusz Masztalerczuk) Date: Tue, 11 Oct 2016 15:42:59 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1476200579.82.0.779500417797.issue18233@psf.upfronthosting.co.za> Mariusz Masztalerczuk added the comment: Hello :) I'm not sure why patches created by christian.heimes is not merged to python, but because last patch was created in 2013, I've created a new version of this patch. What do you think about it? ---------- nosy: +mmasztalerczuk Added file: http://bugs.python.org/file45057/ssl_peercertchain3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 11:49:07 2016 From: report at bugs.python.org (Andreas Gnau) Date: Tue, 11 Oct 2016 15:49:07 +0000 Subject: [issue11429] ctypes is highly eclectic in its raw-memory support In-Reply-To: <1299484141.33.0.394671210882.issue11429@psf.upfronthosting.co.za> Message-ID: <1476200947.9.0.697115340067.issue11429@psf.upfronthosting.co.za> Changes by Andreas Gnau : ---------- nosy: +Rondom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 12:14:12 2016 From: report at bugs.python.org (Carl Witty) Date: Tue, 11 Oct 2016 16:14:12 +0000 Subject: [issue28416] defining persistent_id in _pickle.Pickler subclass causes reference cycle Message-ID: <1476202451.78.0.408768500752.issue28416@psf.upfronthosting.co.za> New submission from Carl Witty: On creation, _pickle.Pickler caches any .persistent_id() method defined by a subclass (in the pers_func field of PicklerObject). This causes a reference cycle (pickler -> bound method of pickler -> pickler), so the pickler is held in memory until the next cycle collection. (Then, because of the pickler's memo table, any objects that this pickler has pickled are also held until the next cycle collection.) Looking at the source code, it looks like the same thing would happen with _pickle.Unpickler and .persistent_load(), but I haven't tested it. Any fix should be applied to both classes. I've attached a test file; when I run it with "python3 pickle_reference_cycle.py", all 3 print statements are executed. I would prefer it if "Oops, still here" was not printed. (I'm using Debian's python3.5 package, version 3.5.2-4 for amd64, but I believe the problem occurs across many versions of python3, looking at the history of _pickle.c.) I don't see how to fix the problem with no performance impact. (Setting pers_func at the beginning of dump() and clearing it at the end would have approximately the same performance in the common case that only one object was dumped per pickler, but would be slower when dumping multiple objects.) If you decide not to fix the problem, could you at least describe the problem and a workaround in the documentation? ---------- components: Extension Modules files: pickle_reference_cycle.py messages: 278495 nosy: cwitty priority: normal severity: normal status: open title: defining persistent_id in _pickle.Pickler subclass causes reference cycle type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file45058/pickle_reference_cycle.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 12:17:26 2016 From: report at bugs.python.org (Andreas Gnau) Date: Tue, 11 Oct 2016 16:17:26 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1476202646.98.0.927710573554.issue27923@psf.upfronthosting.co.za> Changes by Andreas Gnau : ---------- nosy: +Rondom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 12:19:38 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 11 Oct 2016 16:19:38 +0000 Subject: [issue28417] va_end twice in PyUnicode_FromFormatV Message-ID: <1476202778.52.0.223163614953.issue28417@psf.upfronthosting.co.za> New submission from Xiang Zhang: vargs2 could be va_end()ed twice in PyUnicode_FromFormatV when format contains non-ascii characters. Once va_end()ed, vargs2 is undefined. So this could lead to undefined behaviour. ---------- components: Interpreter Core files: PyUnicode_FromFormatV.patch keywords: patch messages: 278496 nosy: christian.heimes, haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: va_end twice in PyUnicode_FromFormatV type: behavior versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45059/PyUnicode_FromFormatV.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 12:43:35 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 11 Oct 2016 16:43:35 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1476204215.02.0.256888048984.issue27923@psf.upfronthosting.co.za> Nick Coghlan added the comment: Something else the PEP needs to be updated to cover is that in 3.5+ (and maybe even in 3.4 - I'm not sure when 'c' support landed in memoryview) you can write the following efficient bytes iterator: def iterbytes(data): return iter(memoryview(data).cast('c')) And use it as so: >>> data = b"123" >>> for datum in iterbytes(data): ... print(datum) ... b'1' b'2' b'3' That will then work with any buffer exporter, not just bytes and bytearray, and since it's a function, you can easily make a similar function that's polymorphic on str -> str iterator and bytes-like -> bytes iterator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 12:49:32 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Oct 2016 16:49:32 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1476204572.65.0.890732572515.issue28414@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 13:38:00 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Oct 2016 17:38:00 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1476204215.02.0.256888048984.issue27923@psf.upfronthosting.co.za> Message-ID: <13799675.csttR5sOfp@xarax> Serhiy Storchaka added the comment: Even in 3.3+. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 13:58:22 2016 From: report at bugs.python.org (Aidin Gharibnavaz) Date: Tue, 11 Oct 2016 17:58:22 +0000 Subject: [issue24398] Update test_capi to use test.support.script_helper In-Reply-To: <1433614432.33.0.0607159967244.issue24398@psf.upfronthosting.co.za> Message-ID: <1476208702.05.0.219559737336.issue24398@psf.upfronthosting.co.za> Aidin Gharibnavaz added the comment: I tested the patch locally, on my Gnu/Linux machine, and it seems fine. ---------- keywords: +patch Added file: http://bugs.python.org/file45060/issue24398.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 13:59:23 2016 From: report at bugs.python.org (SilentGhost) Date: Tue, 11 Oct 2016 17:59:23 +0000 Subject: [issue28416] defining persistent_id in _pickle.Pickler subclass causes reference cycle In-Reply-To: <1476202451.78.0.408768500752.issue28416@psf.upfronthosting.co.za> Message-ID: <1476208763.54.0.48606095033.issue28416@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 15:04:57 2016 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 11 Oct 2016 19:04:57 +0000 Subject: [issue28418] Raise Deprecation warning for tokenize.generate_tokens Message-ID: <1476212697.92.0.408666384378.issue28418@psf.upfronthosting.co.za> New submission from Matthias Bussonnier: the Tokenize module has the following code: # An undocumented, backwards compatible, API for all the places in the standard # library that expect to be able to use tokenize with strings def generate_tokens(readline): return _tokenize(readline, None) So I'm going to assume it is Deprecated... (since 3.0 AFAICT). If it is expected from Python developers to not use it, may I suggest: 1) Marking it as deprecated in the docstring/ 2) Raise a deprecation warning. Indeed not everyone code by looking at the documentation and it is relatively easy to have your IDE/editor/REPL to complete it. Even tools that grab the source (IPython double question mark for example) will not show the comment above which make it kinda pointless. ---------- assignee: docs at python components: Documentation messages: 278500 nosy: docs at python, mbussonn priority: normal severity: normal status: open title: Raise Deprecation warning for tokenize.generate_tokens versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 15:12:08 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Oct 2016 19:12:08 +0000 Subject: [issue28416] defining persistent_id in _pickle.Pickler subclass causes reference cycle In-Reply-To: <1476202451.78.0.408768500752.issue28416@psf.upfronthosting.co.za> Message-ID: <1476213128.18.0.576148315992.issue28416@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka type: behavior -> resource usage versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 15:58:24 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 11 Oct 2016 19:58:24 +0000 Subject: [issue28393] Update encoding lookup docs wrt #27938 In-Reply-To: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> Message-ID: <1476215904.33.0.403593897349.issue28393@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch! Do we still need to keep the last sentence? Is there any other alternatives that can be used? Perhaps the word "spellings" can be changed with "aliases" to make the sentence a little bit clearer. ---------- nosy: +berker.peksag stage: -> patch review type: enhancement -> behavior versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 16:07:23 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 11 Oct 2016 20:07:23 +0000 Subject: [issue28393] Update encoding lookup docs wrt #27938 In-Reply-To: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> Message-ID: <1476216443.29.0.0485930426488.issue28393@psf.upfronthosting.co.za> Ville Skytt? added the comment: I believe (but haven't checked) that additionally, encoding names are case insensitive with respect to the fast-path behavior. But then again I also suppose that's the way it was before #27938 as well, which is why I didn't change that in this patch. But why not add it while at it, if I'm correct. Something like this revised patch? ---------- Added file: http://bugs.python.org/file45061/codecs-doc-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 16:26:46 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 11 Oct 2016 20:26:46 +0000 Subject: [issue28418] Raise Deprecation warning for tokenize.generate_tokens In-Reply-To: <1476212697.92.0.408666384378.issue28418@psf.upfronthosting.co.za> Message-ID: <1476217606.58.0.219994412112.issue28418@psf.upfronthosting.co.za> Martin Panter added the comment: There is related discussion in Issue 12486 about supporting unencoded text input. The current patch there actually already raises a warning and removes call sites from the Python library, though it does not add a doc string. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 16:36:14 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 11 Oct 2016 20:36:14 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1476218174.11.0.470392368413.issue27923@psf.upfronthosting.co.za> Martin Panter added the comment: For arbitrary C-contiguous buffers aka ?bytes-like objects? (which are not just arrays of bytes), I think this trick relies on Issue 15944, which is only added in 3.5+. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 17:38:57 2016 From: report at bugs.python.org (David Eyk) Date: Tue, 11 Oct 2016 21:38:57 +0000 Subject: [issue28419] List comprehension in class scope does not have access to class scope Message-ID: <1476221937.84.0.647969996739.issue28419@psf.upfronthosting.co.za> New submission from David Eyk: I've discovered what appears to be a scoping bug in Python 3.5.1, where the class scope is not available inside a list comprehension defined in the class scope. Attached is a simple example script, also available at the following gist: https://gist.github.com/eykd/c63a7cf760a538ee8bc3828362ed12e3 As demonstrated, the script runs fine in Python 2.7.11, but fails in 3.5.1. I can't think of any good reason why the class scope wouldn't be available to the comprehension scope, but if there is a reason, I'm keen to know what it is! ---------- components: Interpreter Core files: comp_scope.py messages: 278505 nosy: David Eyk priority: normal severity: normal status: open title: List comprehension in class scope does not have access to class scope versions: Python 3.5 Added file: http://bugs.python.org/file45062/comp_scope.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 18:10:04 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 11 Oct 2016 22:10:04 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1476223804.13.0.885534555051.issue21720@psf.upfronthosting.co.za> Berker Peksag added the comment: Good catch, thanks Nick. Here's a Python 3 version of the patch. I excluded Python/importlib.h from the patch to make review easier. ---------- components: +Interpreter Core versions: +Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45063/issue21720_python3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 18:44:47 2016 From: report at bugs.python.org (Eric Snow) Date: Tue, 11 Oct 2016 22:44:47 +0000 Subject: [issue28411] Eliminate PyInterpreterState.modules. In-Reply-To: <1476138783.81.0.661524291989.issue28411@psf.upfronthosting.co.za> Message-ID: <1476225887.07.0.494948614607.issue28411@psf.upfronthosting.co.za> Eric Snow added the comment: What's the benefit to adding PyInterpreterState_GetModuleCache()? TBH, it should only be needed in this short period during startup when the import system hasn't been bootstrapped yet. After that code can import sys and access sys.modules from there. (For that matter, PyImport_GetModuleDict() doesn't buy all that much either...) I think all this would be clearer in a world with PEP 432. :) FWIW, I'm inclined to encourage new APIs where it makes sense that take an explicit interp arg. I just don't think a new public API is warranted here. If we didn't already have PyImport_GetModuleDict(), I'd probably just move the code to Python/pylifecycle.c, inlined or in a small static function. And +1 to ModuleCache vs. ModuleDict. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 18:57:23 2016 From: report at bugs.python.org (Eric Snow) Date: Tue, 11 Oct 2016 22:57:23 +0000 Subject: [issue28411] Eliminate PyInterpreterState.modules. In-Reply-To: <1476138783.81.0.661524291989.issue28411@psf.upfronthosting.co.za> Message-ID: <1476226643.88.0.850309217819.issue28411@psf.upfronthosting.co.za> Eric Snow added the comment: Hmm, actually _PyImport_GetModuleDict() isn't needed to solve the startup issue. It's still rather internally focused but the same could be said for PyImport_GetModuleDict(). I guess I'm still not sold on adding a new public API function for what amounts to a rename of PyImport_GetModuleDict(). Furthermore, wouldn't it make more sense to keep it in the PyImport_* namespace? Perhaps we could set the precedent that explicitly-arg'ed functions should be in the PyInterpreterState_* (or PyInterpreter_*) namespace? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 19:05:25 2016 From: report at bugs.python.org (Eric Snow) Date: Tue, 11 Oct 2016 23:05:25 +0000 Subject: [issue28411] Eliminate PyInterpreterState.modules. In-Reply-To: <1476138783.81.0.661524291989.issue28411@psf.upfronthosting.co.za> Message-ID: <1476227125.39.0.364022635043.issue28411@psf.upfronthosting.co.za> Eric Snow added the comment: Meh, there really isn't any need for _PyImport_GetModuleDict(). I'll drop it. Problem solved! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 19:20:48 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Oct 2016 23:20:48 +0000 Subject: [issue28419] List comprehension in class scope does not have access to class scope In-Reply-To: <1476221937.84.0.647969996739.issue28419@psf.upfronthosting.co.za> Message-ID: <1476228048.41.0.0603785027933.issue28419@psf.upfronthosting.co.za> R. David Murray added the comment: See issue 11796, and the issue it is marked as a duplicate of, for an explanation. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Comprehensions in a class definition mostly cannot access class variable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 20:01:05 2016 From: report at bugs.python.org (David Eyk) Date: Wed, 12 Oct 2016 00:01:05 +0000 Subject: [issue28419] List comprehension in class scope does not have access to class scope In-Reply-To: <1476221937.84.0.647969996739.issue28419@psf.upfronthosting.co.za> Message-ID: <1476230465.01.0.292599104352.issue28419@psf.upfronthosting.co.za> David Eyk added the comment: Thanks for the pointer. That seems weird and arbitrary when you think of it in terms of scope, but what can you do? All the same, thanks for the quick response. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 20:11:27 2016 From: report at bugs.python.org (Vagner Clementino) Date: Wed, 12 Oct 2016 00:11:27 +0000 Subject: [issue28420] is ok Message-ID: <1476231087.75.0.88301007171.issue28420@psf.upfronthosting.co.za> Changes by Vagner Clementino : ---------- nosy: Vagner Clementino priority: normal severity: normal status: open title: is ok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 23:05:35 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 12 Oct 2016 03:05:35 +0000 Subject: [issue28420] is ok Message-ID: <1476241535.08.0.607004536306.issue28420@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 23:21:10 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 12 Oct 2016 03:21:10 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1476242470.93.0.413785177712.issue21720@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks Berker - looks good to me! Should we file a separate issue regarding the similarly vague error message from hasattr() itself? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 23:39:44 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 12 Oct 2016 03:39:44 +0000 Subject: [issue28411] Eliminate PyInterpreterState.modules. In-Reply-To: <1476138783.81.0.661524291989.issue28411@psf.upfronthosting.co.za> Message-ID: <1476243584.23.0.458769529589.issue28411@psf.upfronthosting.co.za> Nick Coghlan added the comment: I just checked the docs, and it turns out I'm wrong about this being a previously public API: "There are no public members in this structure." >From https://docs.python.org/3/c-api/init.html#c.PyInterpreterState That means the only externally supported API that needs to be preserved is PyImport_GetModuleDict() to get the current thread's module cache, and your original patch already did that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 00:08:34 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 12 Oct 2016 04:08:34 +0000 Subject: [issue28420] is ok Message-ID: <1476245314.26.0.987725755843.issue28420@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- resolution: -> not a bug stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 00:43:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Oct 2016 04:43:52 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1476247432.81.0.282228998518.issue21720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If run Python 3 with -bb: >>> __import__('encodings', fromlist=[b'aliases']) Traceback (most recent call last): File "", line 1, in File "", line 1000, in _handle_fromlist BytesWarning: Comparison between bytes and string ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 01:42:49 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 12 Oct 2016 05:42:49 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <20161012054246.95121.86632.603C8590@psf.io> Roundup Robot added the comment: New changeset 433cff92d565 by Raymond Hettinger in branch '3.6': Issue #18844: Fix-up examples for random.choices(). Remove over-specified test. https://hg.python.org/cpython/rev/433cff92d565 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 02:01:23 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 12 Oct 2016 06:01:23 +0000 Subject: [issue28417] va_end twice in PyUnicode_FromFormatV In-Reply-To: <1476202778.52.0.223163614953.issue28417@psf.upfronthosting.co.za> Message-ID: <20161012060119.17279.75563.22F982D9@psf.io> Roundup Robot added the comment: New changeset 6a6ac890db78 by Benjamin Peterson in branch '3.6': va_end vargs2 once (closes #28417) https://hg.python.org/cpython/rev/6a6ac890db78 New changeset 439427ffbba1 by Benjamin Peterson in branch 'default': merge 3.6 (#28417) https://hg.python.org/cpython/rev/439427ffbba1 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 03:36:42 2016 From: report at bugs.python.org (Takashi Matsuzawa) Date: Wed, 12 Oct 2016 07:36:42 +0000 Subject: [issue28421] lib/distutils/sysconfig.py fails to pick up Py_ENABLE_SHARED value Message-ID: <1476257802.16.0.0608575453753.issue28421@psf.upfronthosting.co.za> New submission from Takashi Matsuzawa: I have been debugging for a couple of days to now why my extension module build fails with my Yocto 2.0 cross-build environment. (python version is 2.7, host is x86_64 and target is qemux86). The symptom is that LD flags -L and -lpython27 are not being passed cross gcc and linker fails. The direct cause of this is that lib/distutils/sysconfig.py not picking up Py_ENABLE_SHARED value (it should be 1 since I am linking against shared libpython2.7). In lib/distutils/sysconfig.py:parse_config_h(), the code is reading the file pointer line by line, and only doing string match against #define and #under. No other type of lines are meaningful to this code. However, the pyconfig.h I have is like this: (sysroots/qemux86/user/include/python2.7/pyconfig.h) >>>> /* * Copyright (C) 2005-2011 by Wind River Systems, Inc. * .... #ifdef _MIPS_SIM ... #else /* _MIPS_SIM is not defined */ #include #endif ... <<<< So, parse_config_h() fails to get anything from there. In particular, it fails to get the following in pyconfig-32.h and I fail to build extension module using this configuration of python. #define Py_ENABLE_SHARED 1 I have looked into the master branch, but the parse_config_h() code is the same as what I have on my PC. I am not sure which of the below is true 1) pyconfig.h should be flat, no #ifdef's, so that parse_config_h() does its job sucessfully. 2) parse_config_h() should be flexible to allow ordinal header file syntax including #ifdef's and #includes (or pyconfig.h should be preprocessed before it is read by parse_config_h()). ---------- components: Cross-Build messages: 278518 nosy: Alex.Willmer, tmatsuzawa priority: normal severity: normal status: open title: lib/distutils/sysconfig.py fails to pick up Py_ENABLE_SHARED value type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 04:07:12 2016 From: report at bugs.python.org (Anton Sychugov) Date: Wed, 12 Oct 2016 08:07:12 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1476259632.75.0.445458500969.issue28414@psf.upfronthosting.co.za> Anton Sychugov added the comment: Christian, thanks a lot for your comment and for patch you provide. It becomes much clearer. I'll be watching for #17305. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 04:25:49 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Wed, 12 Oct 2016 08:25:49 +0000 Subject: [issue28421] lib/distutils/sysconfig.py fails to pick up Py_ENABLE_SHARED value In-Reply-To: <1476257802.16.0.0608575453753.issue28421@psf.upfronthosting.co.za> Message-ID: <1476260749.13.0.831184944637.issue28421@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: How is sysroots/qemux86/user/include/python2.7/pyconfig.h generated? In normal cases, there's no #include in pyconfig.h. ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 04:48:06 2016 From: report at bugs.python.org (Takashi Matsuzawa) Date: Wed, 12 Oct 2016 08:48:06 +0000 Subject: [issue28421] lib/distutils/sysconfig.py fails to pick up Py_ENABLE_SHARED value In-Reply-To: <1476257802.16.0.0608575453753.issue28421@psf.upfronthosting.co.za> Message-ID: <1476262086.57.0.71816167455.issue28421@psf.upfronthosting.co.za> Takashi Matsuzawa added the comment: I further looked into my build environment. This particular pyconfig.h is generated by Yocto build toolchain, modifying the original flat pyconfig.h So, this issue may not be Pythons, but Yocto/OE's. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 05:53:42 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 12 Oct 2016 09:53:42 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1476266022.79.0.312830417372.issue21720@psf.upfronthosting.co.za> Berker Peksag added the comment: > Should we file a separate issue regarding the similarly vague error message from hasattr() itself? +1 from me. It would be good to show users a user friendly message :) > BytesWarning: Comparison between bytes and string How about raising a TypeError if ``all(isinstance(l, str) for l in fromlist)`` is False? That would make the exception message less clearer since we can't include the "[...] not 'bytes'" part though. ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 06:04:41 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 12 Oct 2016 10:04:41 +0000 Subject: [issue28421] lib/distutils/sysconfig.py fails to pick up Py_ENABLE_SHARED value In-Reply-To: <1476257802.16.0.0608575453753.issue28421@psf.upfronthosting.co.za> Message-ID: <1476266681.08.0.4581017327.issue28421@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> third party stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 06:22:15 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Oct 2016 10:22:15 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1476266022.79.0.312830417372.issue21720@psf.upfronthosting.co.za> Message-ID: <5294611.08LeiyhfGk@xarax> Serhiy Storchaka added the comment: > How about raising a TypeError if ``all(isinstance(l, str) for l in > fromlist)`` is False? That would make the exception message less clearer > since we can't include the "[...] not 'bytes'" part though. for l in fromlist: if not isinstance(l, str): raise TypeError(...) Note also that you can get an arbitrary error if fromlist is not a sequence. Actually this issue doesn't look very important for Python 3, since it is unlikely that non-string is passed in fromlist. Unlike to Python 2 where you can pass unicode if just use unicode_literals. Other solution for Python 2 is allowing unicode in fromlist. Perhaps this would increase compatibility with Python 3. ---------- title: "TypeError: Item in ``from list'' not a string" message -> "TypeError: Item in ``from list'' not a string" message _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 06:27:13 2016 From: report at bugs.python.org (Grzegorz Sikorski) Date: Wed, 12 Oct 2016 10:27:13 +0000 Subject: [issue28378] urllib2 does not handle cookies with `,` In-Reply-To: <1475766073.34.0.905667468742.issue28378@psf.upfronthosting.co.za> Message-ID: <1476268033.66.0.251585050026.issue28378@psf.upfronthosting.co.za> Grzegorz Sikorski added the comment: I was debugging this and found out that urllib2 works more-less correct. The only problem I would see is referring to the header by `res.headers['Set-Cookie']`, as it returns comma-separated string, which cannot be processed properly in case the cookie value includes the `,` (see attached example). IMO this should return a tuple instead of single string, but as I said is minor. More issues I found with actual `requests` library, as it does not send cookies if the server response with 302 (redirect). Again, this may not be related to the urllib at all. ---------- Added file: http://bugs.python.org/file45064/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 06:29:15 2016 From: report at bugs.python.org (Grzegorz Sikorski) Date: Wed, 12 Oct 2016 10:29:15 +0000 Subject: [issue28378] urllib2 does not handle cookies with `,` In-Reply-To: <1475766073.34.0.905667468742.issue28378@psf.upfronthosting.co.za> Message-ID: <1476268155.84.0.103684044639.issue28378@psf.upfronthosting.co.za> Grzegorz Sikorski added the comment: I attach example express/nodejs server which by default returns a cookie with the comma (see expiry time format). The output from the python test file I posted in previous message is: ``` python test.py cookie1=exampleCookie; Path=/, cookie2=cookie%20with%20comma; Max-Age=60; Path=/; Expires=Wed, 12 Oct 2016 10:24:06 GMT; HttpOnly; Secure ################### X-Powered-By: Express Set-Cookie: cookie1=exampleCookie; Path=/ Set-Cookie: cookie2=cookie%20with%20comma; Max-Age=60; Path=/; Expires=Wed, 12 Oct 2016 10:24:06 GMT; HttpOnly; Secure Date: Wed, 12 Oct 2016 10:23:06 GMT Connection: close Content-Length: 0 ``` ---------- Added file: http://bugs.python.org/file45065/test.js _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 06:38:50 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 12 Oct 2016 10:38:50 +0000 Subject: [issue28393] Update encoding lookup docs wrt #27938 In-Reply-To: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> Message-ID: <1476268730.05.0.0877052235324.issue28393@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: The names are indeed case-insensitive. However, something important is missing: the implementation details changed between Python 3.5 and 3.6. Please check the implementation for details and update the documentation with versionadded flags. Thanks. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 06:48:55 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 12 Oct 2016 10:48:55 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1476269335.08.0.693613646036.issue21720@psf.upfronthosting.co.za> Berker Peksag added the comment: Well, I find using a for loop is a bit verbose in this case :) In Python 3.2: >>> __import__('encodings', fromlist=[b'aliases']) Traceback (most recent call last): File "", line 1, in TypeError: Item in ``from list'' not a string BytesWarning is there since Python 3.3 and I couldn't find any report on the tracker. I'd be fine with either committing the current patch or using pre-importlib exception message from 3.2 in 3.5+ (assuming the chance of passing a non-str item is low in Python 3) > Other solution for Python 2 is allowing unicode in fromlist. My preference is to improve the exception message and move on. Accepting both str and unicode would make the code harder to maintain and it would be better to avoid potential regressions in 2.7 (note that we already introduced regressions in the previous bugfix releases :)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 08:36:08 2016 From: report at bugs.python.org (Antti Haapala) Date: Wed, 12 Oct 2016 12:36:08 +0000 Subject: [issue28415] PyUnicode_FromFromat interger format handling different from printf about zeropad In-Reply-To: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> Message-ID: <1476275768.11.0.379804163167.issue28415@psf.upfronthosting.co.za> Antti Haapala added the comment: To be more precise, C90, C99, C11 all say that ~"For d, i, o, u, x and X conversions, if a precision is specified, the 0 flag will be ignored." ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 09:03:47 2016 From: report at bugs.python.org (Vilnis Termanis) Date: Wed, 12 Oct 2016 13:03:47 +0000 Subject: [issue28422] multiprocessing Manager mutable type member access failure Message-ID: <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za> New submission from Vilnis Termanis: Accessing some Manager types (e.g. Lock) through a list, dict or Namespace proxy is not possible if both the mutable container (e.g. list) and contained type instance (e.g. Lock) have been created in the same process. Symptoms: In accessing process: multiprocessing.managers.RemoteError on access, e.g.: Unserializable message: ('#RETURN', ) .. and in underlying manager: _pickle.PicklingError: Can't pickle : attribute lookup lock on _thread failed The provided test script performs: 0) Initialise SyncManager (via multiprocessing.Manager()) 1) Create list proxy through manager 2) Insert another proxied type into the list (e.g. Lock) 3) Try to access type instance from (2) via container created in (1) Note: When step (2) is run in a child process, everything work as expected. When all steps execute in the same process, one gets the aforementioned exception. See also: https://mail.python.org/pipermail/python-list/2009-September/552988.html ---------- components: Library (Lib) files: manager_pickling.py messages: 278529 nosy: vilnis.termanis priority: normal severity: normal status: open title: multiprocessing Manager mutable type member access failure versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file45066/manager_pickling.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 09:04:47 2016 From: report at bugs.python.org (Vilnis Termanis) Date: Wed, 12 Oct 2016 13:04:47 +0000 Subject: [issue28422] multiprocessing Manager mutable type member access failure In-Reply-To: <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za> Message-ID: <1476277487.69.0.477530012432.issue28422@psf.upfronthosting.co.za> Changes by Vilnis Termanis : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 09:05:06 2016 From: report at bugs.python.org (Vilnis Termanis) Date: Wed, 12 Oct 2016 13:05:06 +0000 Subject: [issue28422] multiprocessing Manager mutable type member access failure In-Reply-To: <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za> Message-ID: <1476277506.77.0.101362096616.issue28422@psf.upfronthosting.co.za> Changes by Vilnis Termanis : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 10:49:42 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 12 Oct 2016 14:49:42 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1476283782.88.0.232291094622.issue21720@psf.upfronthosting.co.za> Nick Coghlan added the comment: Right, Python 2.7 import is what it is at this point - if folks want something more modern, they can take a look at importlib2 :) In this case, I think just reporting the first failing item is fine, and mentioning the type of that item in the error message is the most useful additional information we can provide to make things easier to debug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 11:11:00 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 12 Oct 2016 15:11:00 +0000 Subject: [issue26944] android: test_posix fails In-Reply-To: <1462348873.26.0.373017977506.issue26944@psf.upfronthosting.co.za> Message-ID: <1476285059.99.0.654014665241.issue26944@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Thanks for the patch David, see my comment in Rietveld. New patch based on David patch, just a bit simpler. ---------- stage: patch review -> commit review versions: +Python 3.7 Added file: http://bugs.python.org/file45067/test_getgroups_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 12:15:01 2016 From: report at bugs.python.org (Cory Benfield) Date: Wed, 12 Oct 2016 16:15:01 +0000 Subject: [issue17305] IDNA2008 encoding missing In-Reply-To: <1361928766.42.0.728949411958.issue17305@psf.upfronthosting.co.za> Message-ID: <1476288901.47.0.292994238489.issue17305@psf.upfronthosting.co.za> Changes by Cory Benfield : ---------- nosy: +Lukasa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 13:01:38 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 12 Oct 2016 17:01:38 +0000 Subject: [issue28378] urllib2 does not handle cookies with `,` In-Reply-To: <1475766073.34.0.905667468742.issue28378@psf.upfronthosting.co.za> Message-ID: <1476291698.89.0.119215934873.issue28378@psf.upfronthosting.co.za> SilentGhost added the comment: On python2 you should be able to use Cookie module to parse cookies, rather than doing that manually. Commas are handled correctly there. On python3 the same functionality can be found in http.cookies. The SimpleCookie.load could be used directly to have the header parsed. I cannot say much about requests's choices or decisions, but if you think their behaviour is not correct I can only point you to their bug tracker. All the behaviour of the stdlib modules seem correct to me, so I'm going to close this issue. ---------- resolution: -> not a bug stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 13:53:53 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 12 Oct 2016 17:53:53 +0000 Subject: [issue28279] setuptools failing to read from setup.cfg only in Python 3.6 In-Reply-To: <1474909538.67.0.328004494878.issue28279@psf.upfronthosting.co.za> Message-ID: <1476294833.36.0.0826971480485.issue28279@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 14:20:29 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 12 Oct 2016 18:20:29 +0000 Subject: [issue20766] reference leaks in pdb In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za> Message-ID: <20161012181931.1333.87797.72D07D20@psf.io> Roundup Robot added the comment: New changeset 31a2d270c0c3 by Xavier de Gaye in branch '3.5': Issue #20766: Fix references leaked by pdb in the handling of SIGINT handlers. https://hg.python.org/cpython/rev/31a2d270c0c3 New changeset 86a1905ea28d by Xavier de Gaye in branch '3.6': Issue #20766: Merge with 3.5. https://hg.python.org/cpython/rev/86a1905ea28d New changeset 8bb426d386a5 by Xavier de Gaye in branch 'default': Issue #20766: Merge with 3.6. https://hg.python.org/cpython/rev/8bb426d386a5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 14:24:37 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 12 Oct 2016 18:24:37 +0000 Subject: [issue20766] reference leaks in pdb In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za> Message-ID: <1476296677.67.0.855106662522.issue20766@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 14:25:07 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 12 Oct 2016 18:25:07 +0000 Subject: [issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented In-Reply-To: <1462743548.86.0.976035936413.issue26980@psf.upfronthosting.co.za> Message-ID: <1476296707.29.0.79524027027.issue26980@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. I'm marking this as an easy documentation issue. BaseEventLoop is now AbstractEventLoop (87e3a58ed3c3) and the documentation of AbstractEventLoop.create_unix_connection() can be found in Doc/library/asyncio-eventloop.rst. Guido already explained what it means in msg266111 so what we need is to convert Guido's answer to a proper patch. ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch type: -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 14:25:25 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 12 Oct 2016 18:25:25 +0000 Subject: [issue20766] reference leaks in pdb In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za> Message-ID: <1476296725.76.0.509044616845.issue20766@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 14:26:52 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 12 Oct 2016 18:26:52 +0000 Subject: [issue22502] after continue in pdb stops in signal.py In-Reply-To: <1411807239.7.0.969118354208.issue22502@psf.upfronthosting.co.za> Message-ID: <1476296812.01.0.771559142953.issue22502@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Fixed in issue 20766. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 14:34:18 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 12 Oct 2016 18:34:18 +0000 Subject: =?utf-8?q?=5Bissue23297=5D_Clarify_error_when_=E2=80=98tokenize=2Edetect?= =?utf-8?q?=5Fencoding=E2=80=99_receives_text?= In-Reply-To: <1421901626.89.0.392776519963.issue23297@psf.upfronthosting.co.za> Message-ID: <1476297258.73.0.916705500017.issue23297@psf.upfronthosting.co.za> Berker Peksag added the comment: It looks like this can also be fixed by issue 12486. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 14:57:57 2016 From: report at bugs.python.org (Skye) Date: Wed, 12 Oct 2016 18:57:57 +0000 Subject: [issue26631] Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1458771798.71.0.333968276616.issue26631@psf.upfronthosting.co.za> Message-ID: <1476298677.23.0.816857650842.issue26631@psf.upfronthosting.co.za> Skye added the comment: I am having the same issue. Currently do not have Python on my computer. Tried to fix by doing Method 1 here, no success: http://www.techpayee.com/failed-to-install-msi-package/ ---------- nosy: +SHarris _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 15:35:23 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Wed, 12 Oct 2016 19:35:23 +0000 Subject: [issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented In-Reply-To: <1462743548.86.0.976035936413.issue26980@psf.upfronthosting.co.za> Message-ID: <1476300923.03.0.266705445597.issue26980@psf.upfronthosting.co.za> ???? ????????? added the comment: It will be nice if someone also adds if abstract UNIX sockets are supported. And also about bytes/str path support. ---------- nosy: +mmarkk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 15:37:11 2016 From: report at bugs.python.org (Ben Finney) Date: Wed, 12 Oct 2016 19:37:11 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1476283782.88.0.232291094622.issue21720@psf.upfronthosting.co.za> Message-ID: <20161012193108.eunreofyblrb2nys@benfinney.id.au> Ben Finney added the comment: On 12-Oct-2016, Nick Coghlan wrote: > In this case, I think just reporting the first failing item is fine, > and mentioning the type of that item in the error message is the > most useful additional information we can provide to make things > easier to debug. Yes; also, the type expected, so the user knows what's different from expected. That is, the error message should say exactly what type is expected *and* exactly what type failed that check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 15:41:49 2016 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgS8Ohcm9seWk=?=) Date: Wed, 12 Oct 2016 19:41:49 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1476301309.87.0.563002303877.issue18378@psf.upfronthosting.co.za> L?szl? K?rolyi added the comment: OSX Sierra + Python, the bug still exists. subscribing ---------- nosy: +karolyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 17:46:33 2016 From: report at bugs.python.org (stephen) Date: Wed, 12 Oct 2016 21:46:33 +0000 Subject: [issue28423] list.insert(-1,value) is wrong! Message-ID: <1476308793.35.0.934703472079.issue28423@psf.upfronthosting.co.za> New submission from stephen: python3.4.3 on linux mint 17.3 interactive mode on terminal >>> fred=[0,1,2,3,4] >>> fred.insert(-1,9) >>> fred [0, 1, 2, 3, 9, 4] We should get [0,1,2,3,4,9]. Embarrassing error! ---------- messages: 278541 nosy: unklestephen priority: normal severity: normal status: open title: list.insert(-1,value) is wrong! type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 18:01:43 2016 From: report at bugs.python.org (Tim Peters) Date: Wed, 12 Oct 2016 22:01:43 +0000 Subject: [issue28423] list.insert(-1,value) is wrong! In-Reply-To: <1476308793.35.0.934703472079.issue28423@psf.upfronthosting.co.za> Message-ID: <1476309703.25.0.808160734193.issue28423@psf.upfronthosting.co.za> Tim Peters added the comment: It's fine. Read the docs. "s.insert(i, x) inserts x into s at the index given by i (same as s[i:i] = [x])" Note that: >>> fred[-1:] [4] So the empty slice s[-1:-1] is _between_ 3 and 4 in `fred`. If you're not surprised by >>> fred[-1] 4 then you shouldn't be surprised by what `fred.insert(-1, whatever)` does either ;-) ---------- nosy: +tim.peters resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 19:36:00 2016 From: report at bugs.python.org (Douglas Greiman) Date: Wed, 12 Oct 2016 23:36:00 +0000 Subject: [issue28424] pkgutil.get_data() doesn't work with namespace packages Message-ID: <1476315360.41.0.557766587306.issue28424@psf.upfronthosting.co.za> New submission from Douglas Greiman: pkg_util.get_data('mypackage', 'resourcename') returns None if 'mypackage' is a namespace package, because the package object has no __file__ attribute. A shell script is attached to reproduce this. This is either a bug to be fixed (my preference) or behavior to be documented. If there is equivalent, working functionality in the new importlib, that would also be a good to document. ---------- components: Library (Lib) files: namespace_package_get_data.sh messages: 278543 nosy: dgreiman priority: normal severity: normal status: open title: pkgutil.get_data() doesn't work with namespace packages type: behavior versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file45068/namespace_package_get_data.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 20:18:53 2016 From: report at bugs.python.org (Douglas Greiman) Date: Thu, 13 Oct 2016 00:18:53 +0000 Subject: [issue28425] Python3 ignores __init__.py that are links to /dev/null Message-ID: <1476317932.87.0.807629965942.issue28425@psf.upfronthosting.co.za> New submission from Douglas Greiman: This manifests in the following way: A package directory containing an __init__.py that is a symlink to /dev/null is treated as a namespace package instead of a regular package. The Bazel build tool creates many __init__.py files in this way, which is how I even ran into this. Symlinks to regular files seem fine. ---------- components: Interpreter Core files: namespace_package_dev_null.sh messages: 278544 nosy: dgreiman priority: normal severity: normal status: open title: Python3 ignores __init__.py that are links to /dev/null type: behavior versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file45069/namespace_package_dev_null.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 00:30:06 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 13 Oct 2016 04:30:06 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now Message-ID: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> New submission from Xiang Zhang: PyUnicode_AsDecodedObject was added in f46d49e2e0f0 and became an API in 2284fa89ab08. It seems its intention is to return a Python object. But during evolution, with commits 5f11621a6f51 and 123f2dc08b3e, it can only return unicode now, becoming another version of PyUnicode_AsDecodedUnicode. Is this the wanted behaviour? ---------- components: Interpreter Core messages: 278545 nosy: haypo, lemburg, xiang.zhang priority: normal severity: normal status: open title: PyUnicode_AsDecodedObject can only return unicode now type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 01:50:12 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Oct 2016 05:50:12 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1476337812.57.0.551061582722.issue28426@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed. The only difference is that PyUnicode_AsDecodedUnicode fails for most encodings (except rot13), but PyUnicode_AsDecodedObject just crashes in debug build. It seems to me that these functions (as well as PyUnicode_AsEncodedUnicode) shouldn't exist it Python 3. None of these functions are documented. PyUnicode_AsDecodedObject emits Py3k warning in 2.7. PyUnicode_AsDecodedUnicode and PyUnicode_AsEncodedUnicode were added in Python 3 (2284fa89ab08), and the purpose of this is not clear to me. They work only with rot13, but general PyCodec_Decode and PyCodec_Encode can be used instead. Could you please explain Marc-Andr?? ---------- nosy: +benjamin.peterson, ezio.melotti, ncoghlan, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 02:46:00 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 13 Oct 2016 06:46:00 +0000 Subject: [issue28425] Python3 ignores __init__.py that are links to /dev/null In-Reply-To: <1476317932.87.0.807629965942.issue28425@psf.upfronthosting.co.za> Message-ID: <1476341160.4.0.775070873581.issue28425@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Linking __init__.py to /dev/null is very odd. Do you know bazel does that? ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 02:46:24 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 13 Oct 2016 06:46:24 +0000 Subject: [issue28425] Python3 ignores __init__.py that are links to /dev/null In-Reply-To: <1476317932.87.0.807629965942.issue28425@psf.upfronthosting.co.za> Message-ID: <1476341184.45.0.666171773897.issue28425@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I wanted to ask, Do you know why bazel does that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 03:50:49 2016 From: report at bugs.python.org (Antti Haapala) Date: Thu, 13 Oct 2016 07:50:49 +0000 Subject: [issue28425] Python3 ignores __init__.py that are links to /dev/null In-Reply-To: <1476317932.87.0.807629965942.issue28425@psf.upfronthosting.co.za> Message-ID: <1476345049.27.0.657324854045.issue28425@psf.upfronthosting.co.za> Antti Haapala added the comment: One question is why doesn't it just try to `open`, but wants to stat first, when the python principle has always been EAFP. ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 04:02:15 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 13 Oct 2016 08:02:15 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1476345735.1.0.264775958349.issue28426@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: PyUnicode_AsDecodedObject() and PyUnicode_AsEncodedObject() were meant as C API implementations of the unicode.decode() and unicode.encode() methods in Python2. Not having PyUnicode_AsDecodedObject() documented was likely an oversight on my part. In Python2, unicode.decode() and unicode.encode() were more or less direct interfaces to the codec registry. In Python 2.7 this was changed to issue a warning for porting to Python 3. In Python3, the methods were changed to only return unicode objects and to reflect this change without breaking the C API, the new PyUnicode_AsDecodedUnicode() and PyUnicode_AsEncodedUnicode() were added. I guess the more recent changes simply didn't pay attention to this difference anymore and put restrictions on the output of PyUnicode_AsDecodedObject() and PyUnicode_AsEncodedObject() which were not originally intended, hence the crash you are seeing, Serhiy. Going forward, C extensions in Python3 could indeed use the PyCodec_*() APIs directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 04:10:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Oct 2016 08:10:21 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1476346221.15.0.496435555399.issue28426@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Shouldn't all these function be deprecated in favour of PyCodec_*() APIs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 04:22:18 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 13 Oct 2016 08:22:18 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476346221.15.0.496435555399.issue28426@psf.upfronthosting.co.za> Message-ID: <57FF4432.1050202@egenix.com> Marc-Andre Lemburg added the comment: On 13.10.2016 10:10, Serhiy Storchaka wrote: > Shouldn't all these function be deprecated in favour of PyCodec_*() APIs? Not all of them, since you still want to have a C API for unicode.encode(). PyUnicode_AsEncodedUnicode() would have to stay. As for the others, I don't know how much use they get. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 05:49:10 2016 From: report at bugs.python.org (orban) Date: Thu, 13 Oct 2016 09:49:10 +0000 Subject: [issue28291] urllib/urllib2 AbstractDigestAuthHandler locked to retried count of 5 In-Reply-To: <1475011388.29.0.32013326397.issue28291@psf.upfronthosting.co.za> Message-ID: <1476352150.15.0.256972937204.issue28291@psf.upfronthosting.co.za> orban added the comment: Just checked (for my first contribution at cpython) this patch. For me this patch could be merge. ---------- nosy: +matorban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 05:59:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Oct 2016 09:59:55 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1476352795.11.0.833566804993.issue28426@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I propose following: 1) Fix a crash in PyUnicode_AsDecodedObject by removing unicode_result() in all maintained 3.x versions (starting from 3.4? or 3.3?). 2) Deprecate PyUnicode_AsDecodedObject, PyUnicode_AsDecodedUnicode and PyUnicode_AsEncodedUnicode in 3.6, make they always failing in 3.7 and remove them in future versions. They shouldn't be widely used since they are not documented, PyUnicode_AsDecodedObject already is deprecated in 2.7, and the only supported standard encoding is rot13. ---------- keywords: +patch nosy: +larry stage: -> patch review versions: +Python 3.4 Added file: http://bugs.python.org/file45070/PyUnicode_AsDecodedObject-crash.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 06:00:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Oct 2016 10:00:21 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1476352821.31.0.406118857111.issue28426@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45071/deprecate-str-to-str-coding-unicode-api.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 06:36:29 2016 From: report at bugs.python.org (Armin Rigo) Date: Thu, 13 Oct 2016 10:36:29 +0000 Subject: [issue28427] WeakValueDictionary next bug (with multithreading) Message-ID: <1476354989.22.0.575160455599.issue28427@psf.upfronthosting.co.za> New submission from Armin Rigo: Follow-up on http://bugs.python.org/issue19542. Another crash of using WeakValueDictionary() in a thread-local fashion inside a multi-threaded program. I must admit I'm not exactly sure why this occurs, but it is definitely showing an issue: two threads independently create their own WeakValueDictionary() and try to set one item in it. The problem I get is that the "assert 42 in d" sometimes fails, even though 42 was set in that WeakValueDictionary on the previous line and the value is still alive. This only occurs if there is a cycle of references involving the value. See attached file. Reproduced on Python 2.7, 3.3, 3.5, 3.6-debug. ---------- files: test.py messages: 278555 nosy: arigo priority: normal severity: normal status: open title: WeakValueDictionary next bug (with multithreading) type: behavior versions: Python 2.7, Python 3.3, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file45072/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:05:17 2016 From: report at bugs.python.org (Robin Becker) Date: Thu, 13 Oct 2016 11:05:17 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476356717.39.0.445889547174.issue28092@psf.upfronthosting.co.za> Robin Becker added the comment: Don't want to add too much noise, but this issue also affects the manylinux project build compiler (gcc 4.8.2). ---------- nosy: +rgbecker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:06:08 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Oct 2016 11:06:08 +0000 Subject: [issue28291] urllib/urllib2 AbstractDigestAuthHandler locked to retried count of 5 In-Reply-To: <1475011388.29.0.32013326397.issue28291@psf.upfronthosting.co.za> Message-ID: <1476356768.51.0.67181956465.issue28291@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:09:37 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Oct 2016 11:09:37 +0000 Subject: [issue24381] Got warning when compiling ffi.c on Mac In-Reply-To: <1433429045.53.0.896226238413.issue24381@psf.upfronthosting.co.za> Message-ID: <1476356977.18.0.173967549065.issue24381@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:12:50 2016 From: report at bugs.python.org (Harmandeep Singh) Date: Thu, 13 Oct 2016 11:12:50 +0000 Subject: [issue13927] Extra spaces in the output of time.ctime In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1476357170.09.0.0429518884282.issue13927@psf.upfronthosting.co.za> Harmandeep Singh added the comment: I was bored, I generated a patch for this. Hope this helps :) ---------- hgrepos: +360 keywords: +patch nosy: +harman786 Added file: http://bugs.python.org/file45073/ctime-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:16:02 2016 From: report at bugs.python.org (Harmandeep Singh) Date: Thu, 13 Oct 2016 11:16:02 +0000 Subject: [issue13927] Extra spaces in the output of time.ctime In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1476357362.85.0.921698248845.issue13927@psf.upfronthosting.co.za> Changes by Harmandeep Singh : ---------- hgrepos: -360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:20:36 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 13 Oct 2016 11:20:36 +0000 Subject: [issue28428] Rename _futures module to _asyncio Message-ID: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> New submission from INADA Naoki: Before adding more speedup functions for asyncio, I want to rename the module. Attached patch is tested on Mac 10.11. I'll test it on Windows later. ---------- files: asyncio-speedups.patch keywords: patch messages: 278558 nosy: inada.naoki, yselivanov priority: normal severity: normal stage: patch review status: open title: Rename _futures module to _asyncio type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45074/asyncio-speedups.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:29:20 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Oct 2016 11:29:20 +0000 Subject: [issue24381] Got warning when compiling ffi.c on Mac In-Reply-To: <1433429045.53.0.896226238413.issue24381@psf.upfronthosting.co.za> Message-ID: <1476358160.98.0.985958660912.issue24381@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have reviewed the patch, the first "#if defined" was not complete. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:33:52 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Oct 2016 11:33:52 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476358432.31.0.17994150692.issue28428@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Why do you need to rename the module ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:43:06 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 13 Oct 2016 11:43:06 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476358986.01.0.7283373353.issue28428@psf.upfronthosting.co.za> INADA Naoki added the comment: Because: * The "futures" name is used in concurrent.futures too. This module is for asyncio. * Currently, this module has only Future class. But there are several ideas about adding C speedup to improve asyncio performance. (e.g. buffer slicing and Task class). See also: http://bugs.python.org/issue26081#msg278368 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:46:05 2016 From: report at bugs.python.org (Cassaigne) Date: Thu, 13 Oct 2016 11:46:05 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476359165.55.0.655876359059.issue22635@psf.upfronthosting.co.za> Cassaigne added the comment: I correct the doc concerning subprocess.getstatusoutput(cmd) function. More specifically the part on examples and I add a quick explanation about how are manage the return code. ---------- keywords: +patch nosy: +acassaigne versions: +Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45075/issue22635.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:51:20 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Oct 2016 11:51:20 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476359480.47.0.602422187563.issue28428@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have read and tested your patch (with the tests) and you can merge it. But I can't review it via retvield. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:56:47 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Oct 2016 11:56:47 +0000 Subject: [issue17182] signal.default_int_handler should set signal number on the raised exception In-Reply-To: <1360591190.95.0.210480467275.issue17182@psf.upfronthosting.co.za> Message-ID: <1476359807.46.0.443964886205.issue17182@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Antoine and Mark, What's the interest of this "feature" ? Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:58:04 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 13 Oct 2016 11:58:04 +0000 Subject: [issue17182] signal.default_int_handler should set signal number on the raised exception In-Reply-To: <1360591190.95.0.210480467275.issue17182@psf.upfronthosting.co.za> Message-ID: <1476359884.98.0.303765844132.issue17182@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Basically it allows you to call sys.exit() with the right error code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 08:11:56 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 13 Oct 2016 12:11:56 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476360715.99.0.0685742792618.issue28428@psf.upfronthosting.co.za> INADA Naoki added the comment: Since this patch renames file, I used --git option of hg diff. But Rietvelt seems doesn't accept git format patch. Attached patch is same to previous, but generated without --git option. ---------- Added file: http://bugs.python.org/file45076/asyncio-speedups2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 08:12:18 2016 From: report at bugs.python.org (Glandos) Date: Thu, 13 Oct 2016 12:12:18 +0000 Subject: [issue28429] ctypes fails to import with grsecurity's TPE Message-ID: <1476360738.57.0.800770600157.issue28429@psf.upfronthosting.co.za> New submission from Glandos: When using a grsecurity kernel with TPE enabled, the following happens with an untrusted user: Python 3.5.2+ (default, Sep 22 2016, 12:18:14) [GCC 6.2.0 20160914] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import CDLL Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/ctypes/__init__.py", line 537, in _reset_cache() File "/usr/lib/python3.5/ctypes/__init__.py", line 276, in _reset_cache CFUNCTYPE(c_int)(lambda: None) MemoryError And grsecurity complains: oct. 13 13:52:27 belette64 kernel: grsec: From XX.XX.XX.XX: denied untrusted exec (due to not being in trusted group and file in world-writable directory) of /tmp/#38928416 by /usr/bin/python3.5[python3:19125] uid/euid:1000/1000 gid/egid:1000/1000, parent /usr/bin/fish[fish:17716] uid/euid:1000/1000 gid/egid:1000/1000 oct. 13 13:52:27 belette64 kernel: grsec: From XX.XX.XX.XX: denied untrusted exec (due to not being in trusted group and file in world-writable directory) of /var/tmp/#15073678 by /usr/bin/python3.5[python3:19125] uid/euid:1000/1000 gid/egid:1000/1000, parent /usr/bin/fish[fish:17716] uid/euid:1000/1000 gid/egid:1000/1000 oct. 13 13:52:27 belette64 kernel: grsec: From XX.XX.XX.XX: denied untrusted exec (due to not being in trusted group and file in world-writable directory) of /dev/shm/#4422450 by /usr/bin/python3.5[python3:19125] uid/euid:1000/1000 gid/egid:1000/1000, parent /usr/bin/fish[fish:17716] uid/euid:1000/1000 gid/egid:1000/1000 oct. 13 13:52:27 belette64 kernel: grsec: From XX.XX.XX.XX: denied untrusted exec (due to not being in trusted group and file in world-writable directory) of /dev/shm/#4422452 by /usr/bin/python3.5[python3:19125] uid/euid:1000/1000 gid/egid:1000/1000, parent /usr/bin/fish[fish:17716] uid/euid:1000/1000 gid/egid:1000/1000 oct. 13 13:52:29 belette64 kernel: grsec: From XX.XX.XX.XX: denied untrusted exec (due to not being in trusted group and file in world-writable directory) of /dev/shm/#4425509 by /usr/bin/python3.5[python3:19125] uid/euid:1000/1000 gid/egid:1000/1000, parent /usr/bin/fish[fish:17716] uid/euid:1000/1000 gid/egid:1000/1000 However, even if the solution should be to put the user in the trusted group, it seems that the involved call is just a workaround for Win64 platforms. The program I used is using ctypes through the xattr package, which never used CFUNCTYPE. Is it possible to wrap this "fake call" into a try block? ---------- components: ctypes messages: 278567 nosy: Glandos priority: normal severity: normal status: open title: ctypes fails to import with grsecurity's TPE type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 08:24:54 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Oct 2016 12:24:54 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476361494.78.0.833552998948.issue28092@psf.upfronthosting.co.za> STINNER Victor added the comment: > Don't want to add too much noise, but this issue also affects the manylinux project build compiler (gcc 4.8.2). Would it be possible to upgrade the "manylinux" compiler (take a more recent GCC version)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 08:39:02 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Oct 2016 12:39:02 +0000 Subject: [issue28427] WeakValueDictionary next bug (with multithreading) In-Reply-To: <1476354989.22.0.575160455599.issue28427@psf.upfronthosting.co.za> Message-ID: <1476362342.0.0.809067637861.issue28427@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +fdrake, serhiy.storchaka versions: +Python 3.7 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 08:43:15 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 13 Oct 2016 12:43:15 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail Message-ID: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> New submission from INADA Naoki: https://travis-ci.org/tornadoweb/tornado/jobs/167252979 ---------- assignee: inada.naoki components: asyncio messages: 278569 nosy: gvanrossum, inada.naoki, yselivanov priority: high severity: normal status: open title: asyncio: C implemeted Future cause Tornado test fail type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 08:50:21 2016 From: report at bugs.python.org (Cassaigne) Date: Thu, 13 Oct 2016 12:50:21 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476363021.07.0.185212160448.issue22635@psf.upfronthosting.co.za> Cassaigne added the comment: I improve the patch a little bit, following the recommendations of the Stinner's review. I replace "status" mention by "exit code". ---------- Added file: http://bugs.python.org/file45077/issue22635-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 08:53:39 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Oct 2016 12:53:39 +0000 Subject: [issue28291] urllib/urllib2 AbstractDigestAuthHandler locked to retried count of 5 In-Reply-To: <1475011388.29.0.32013326397.issue28291@psf.upfronthosting.co.za> Message-ID: <1476363219.94.0.783563879413.issue28291@psf.upfronthosting.co.za> R. David Murray added the comment: Well, it's missing doc changes and tests, so even if it is still applicable it isn't ready for merge yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 08:54:07 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Oct 2016 12:54:07 +0000 Subject: [issue28291] urllib/urllib2 AbstractDigestAuthHandler locked to retried count of 5 In-Reply-To: <1475011388.29.0.32013326397.issue28291@psf.upfronthosting.co.za> Message-ID: <1476363247.75.0.0581487774519.issue28291@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 08:58:31 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Oct 2016 12:58:31 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476363511.1.0.51789659412.issue28428@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have reviewed your patch, seems to be fine. And thank you for your new patch without the --git flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 08:58:39 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Oct 2016 12:58:39 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476363519.09.0.3835546987.issue28428@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 09:13:03 2016 From: report at bugs.python.org (Cassaigne) Date: Thu, 13 Oct 2016 13:13:03 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476364383.09.0.0756058050256.issue22635@psf.upfronthosting.co.za> Cassaigne added the comment: According to the Victor's review, I remove "Pay attention" words and change exit code by returncode. ---------- Added file: http://bugs.python.org/file45078/issue22635-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 09:15:09 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Oct 2016 13:15:09 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476364509.66.0.450429355688.issue22635@psf.upfronthosting.co.za> R. David Murray added the comment: I disagree with Victor. The name of the function is "getstatusoutput". I think the docs should continue to use (status, output) as the names for the return values. The clarification is that 'status' is now the raw return code, not the shifted return code that it formerly returned. Also, the patch should include a new test that checks the actual return code value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 09:21:51 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Oct 2016 13:21:51 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476364911.04.0.385256201407.issue22635@psf.upfronthosting.co.za> STINNER Victor added the comment: issue22635-3.diff: LGTM. R. David Murray: "I disagree with Victor. The name of the function is "getstatusoutput". I think the docs should continue to use (status, output) as the names for the return values." In Python, we use "exitcode" or "returncode" names for the exit code, but "status" for the thing that should be parsed with os.WEXITSTATUS(status). Just to contradict me, the manual page of the exit() function uses the "status" term: "void _exit(int status);", not "code". "The clarification is that 'status' is now the raw return code, not the shifted return code that it formerly returned." Sorry, I'm confused by this sentence :-) getstatusoutput() returns an exit code, the parameter of exit(), no more the annoying "status" thing that should be passed to os.WEXITSTATUS(status) to get a regular exit code. "Also, the patch should include a new test that checks the actual return code value." FYI acassaigne is a newcomer currently in a sprint and this issue is tagged as Documentation. I suggest to first push a doc change and then add an unit test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 09:32:20 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Oct 2016 13:32:20 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476365540.34.0.851935201688.issue22635@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I see. So the function's name is wrong now, too :(. OK, I guess using exitcode is more accurate then. Surprising that the original docs did not link to os.WEXITSTATUS. Maybe we could make a crosslink in the versionchanged entry to os.WEXITSTATUS in the way of explanation of what the difference between 'status' and 'exitcode' is? Otherwise the versionchanged sentence doesn't seem to tell the reader anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 09:51:57 2016 From: report at bugs.python.org (Scott Leerssen) Date: Thu, 13 Oct 2016 13:51:57 +0000 Subject: [issue26513] platform.win32_ver() broken in 2.7.11 In-Reply-To: <1457473293.66.0.928061603359.issue26513@psf.upfronthosting.co.za> Message-ID: <1476366717.66.0.391671143277.issue26513@psf.upfronthosting.co.za> Scott Leerssen added the comment: It looks like there may still be an issue in Python 2.7.12 on Windows 2008 R2 (Datacenter Edition). On an Amazon instance (tried t2.micro and m4.large) we are seeing the following: In 2.7.11 (correct) C:\Users\Administrator>python Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> >>> import platform >>> platform.win32_ver() ('2008ServerR2', '6.1.7601', 'SP1', u'Multiprocessor Free') >>> In 2.7.12 (incorrect) C:\Users\Administrator>python Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.win32_ver() ('7', '6.1.7601', 'SP1', u'Multiprocessor Free') >>> ---------- nosy: +Scott.Leerssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 10:00:56 2016 From: report at bugs.python.org (Sam Whited) Date: Thu, 13 Oct 2016 14:00:56 +0000 Subject: [issue17305] IDNA2008 encoding missing In-Reply-To: <1361928766.42.0.728949411958.issue17305@psf.upfronthosting.co.za> Message-ID: <1476367256.38.0.689697867701.issue17305@psf.upfronthosting.co.za> Changes by Sam Whited : ---------- nosy: +SamWhited _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 10:32:30 2016 From: report at bugs.python.org (Bar Harel) Date: Thu, 13 Oct 2016 14:32:30 +0000 Subject: [issue27141] Fix collections.UserList shallow copy In-Reply-To: <1464384542.41.0.303372176211.issue27141@psf.upfronthosting.co.za> Message-ID: <1476369150.93.0.0764876263078.issue27141@psf.upfronthosting.co.za> Bar Harel added the comment: Bumposaurus Rex ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 10:53:21 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Oct 2016 14:53:21 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1476370401.42.0.467526949068.issue8376@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 11:06:29 2016 From: report at bugs.python.org (Cassaigne) Date: Thu, 13 Oct 2016 15:06:29 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476371189.88.0.760313600957.issue22635@psf.upfronthosting.co.za> Cassaigne added the comment: I add a crosslink to WEXITSTATUS function. According David Murray advices. ---------- Added file: http://bugs.python.org/file45079/issue22635-4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 11:12:28 2016 From: report at bugs.python.org (Nick Carboni) Date: Thu, 13 Oct 2016 15:12:28 +0000 Subject: [issue28431] socket gethostbyaddr returns IPv6 names for 127.0.0.1 Message-ID: <1476371548.7.0.723704893045.issue28431@psf.upfronthosting.co.za> New submission from Nick Carboni: socket.gethostbyaddr seems to be equating loopback addresses regardless of IP protocol version. In both versions tested (2.7.5 and 3.4.3) the ordering of the entries in my /etc/hosts file determines the result I get, rather than what address I'm querying for. For example: /etc/hosts: ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 result: >>> import socket >>> socket.gethostbyaddr("127.0.0.1") ('localhost', ['localhost.localdomain', 'localhost6', 'localhost6.localdomain6'], ['127.0.0.1']) Then if I change the ordering of the entries in /etc/hosts as follows: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 result: >>> import socket >>> socket.gethostbyaddr("127.0.0.1") ('localhost', ['localhost.localdomain', 'localhost4', 'localhost4.localdomain4'], ['127.0.0.1']) I would expect gethostbyaddr to return only the hostnames associated with the given address regardless of the ordering of the entries in /etc/hosts. ---------- messages: 278580 nosy: carbonin priority: normal severity: normal status: open title: socket gethostbyaddr returns IPv6 names for 127.0.0.1 type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 11:23:52 2016 From: report at bugs.python.org (orban) Date: Thu, 13 Oct 2016 15:23:52 +0000 Subject: [issue21081] missing vietnamese codec TCVN 5712:1993 in Python In-Reply-To: <1395970721.88.0.828263715521.issue21081@psf.upfronthosting.co.za> Message-ID: <1476372232.71.0.154944406807.issue21081@psf.upfronthosting.co.za> orban added the comment: Here this is a patch to added vietnamese codec tcvn. I am not sure about the name of the codecs...tcvn5712, tcvn5712_3 ? test_xml_etree, test_codesc, test_unicode is running. Is it enough for the doc? ---------- keywords: +patch nosy: +matorban Added file: http://bugs.python.org/file45080/issue21081.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 11:24:53 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Oct 2016 15:24:53 +0000 Subject: [issue28431] socket gethostbyaddr returns IPv6 names for 127.0.0.1 In-Reply-To: <1476371548.7.0.723704893045.issue28431@psf.upfronthosting.co.za> Message-ID: <1476372293.55.0.32089775815.issue28431@psf.upfronthosting.co.za> R. David Murray added the comment: I believe that you will find that the same thing happens if you call gethostbyaddr from C. So this either isn't a bug, or it isn't a bug in Python :) (Correct me if I'm wrong; I don't have time to actually test it myself, but gethostbyaddr is a fairly thing wrapper.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 13:03:18 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 13 Oct 2016 17:03:18 +0000 Subject: [issue28432] Fix doc of PyUnicode_EncodeLocale Message-ID: <1476378197.99.0.847074605857.issue28432@psf.upfronthosting.co.za> New submission from Xiang Zhang: The doc of PyUnicode_EncodeLocale conflicts between signature and content. In content, it should be *unicode* not *str*. ---------- assignee: docs at python components: Documentation files: PyUnicode_EncodeLocale_doc.patch keywords: patch messages: 278583 nosy: docs at python, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Fix doc of PyUnicode_EncodeLocale versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45081/PyUnicode_EncodeLocale_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 13:45:59 2016 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 13 Oct 2016 17:45:59 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476380759.41.0.225322875342.issue28092@psf.upfronthosting.co.za> Nathaniel Smith added the comment: > Would it be possible to upgrade the "manylinux" compiler (take a more recent GCC version)? No, it's possible :-(. 4.8.2 is the very most modern version of GCC you can use if you want to build binaries to run on CentOS/RHEL 5. (And "binaries should run on CentOS/RHEL 5" is the definition of manylinux1.) I am a bit confused that gcc 4.8.2 is having trouble with cpython 3.6.0b2, though -- supposedly anything newer than gcc 4.3 should be fine with it. And yet. One possibility is that something funny is going on inside the build scripts Robin's using and that Python's ./configure is somehow finding and using the platform compiler (gcc 4.1) even though the first "gcc" in $PATH is 4.8.2, which would make this a false alarm. ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:08:09 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Oct 2016 18:08:09 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1476382089.76.0.774105022941.issue24452@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, this seems to work for me. I'm, applying this to 3.5, 3.6 and 3.7 (default). ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:15:42 2016 From: report at bugs.python.org (thewtex) Date: Thu, 13 Oct 2016 18:15:42 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476382542.97.0.694313731095.issue28092@psf.upfronthosting.co.za> Changes by thewtex : ---------- nosy: +thewtex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:21:37 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 13 Oct 2016 18:21:37 +0000 Subject: [issue28433] Add sorted (ordered) containers Message-ID: <1476382897.32.0.459857278334.issue28433@psf.upfronthosting.co.za> New submission from ???? ?????????: I mean mutable containers that are always sorted when iterating over them. i.e. * SortedSet (sorted unique elements, implemented using (rb?)tree instead of hash) * SortedList (sorted elements, the same as SortedSet, but without uniquiness constraint) - actually a (rb?)tree, not a list (i.e. not an array) * SortedDict (sorted by key when interating) - like C++'s ordered_map There are many implementations in the net, like: https://bitbucket.org/bcsaller/rbtree/ http://newcenturycomputers.net/projects/rbtree.html https://sourceforge.net/projects/pyavl/ http://www.grantjenks.com/docs/sortedcontainers/ and also in pip: pip3 search sorted | grep -Ei '[^a-z]sorted' I think it should be one standardized implementation of such containers in CPython. For example, C++ has both ordered_map and unorderd_map. P.S. Did not found if such issue was raised earlier. ---------- components: Library (Lib) messages: 278586 nosy: mmarkk priority: normal severity: normal status: open title: Add sorted (ordered) containers type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:22:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Oct 2016 18:22:38 +0000 Subject: [issue28427] WeakValueDictionary next bug (with multithreading) In-Reply-To: <1476354989.22.0.575160455599.issue28427@psf.upfronthosting.co.za> Message-ID: <1476382958.75.0.0676893732159.issue28427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is simpler reproducer for Python 3. One thread updates WeakValueDictionary in a loop, other threads runs garbage collecting in a loop. Values are collected asynchronously and this can cause removing new value by old key. Following patch fixes this example (or at least makes race condition much less likely). But it doesn't fix the entire issue. If add list(d) after setting a new value, the example fails again. ---------- Added file: http://bugs.python.org/file45082/issue28427.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:23:02 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 18:23:02 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <20161013182259.15562.79448.9406252F@psf.io> Roundup Robot added the comment: New changeset bd0f502c5eea by Guido van Rossum in branch '3.5': Issue #24452: Make webbrowser support Chrome on Mac OS X. https://hg.python.org/cpython/rev/bd0f502c5eea New changeset 64a38f9aee21 by Guido van Rossum in branch '3.6': Issue #24452: Make webbrowser support Chrome on Mac OS X (merge 3.5->3.6) https://hg.python.org/cpython/rev/64a38f9aee21 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:24:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Oct 2016 18:24:07 +0000 Subject: [issue28427] WeakValueDictionary next bug (with multithreading) In-Reply-To: <1476354989.22.0.575160455599.issue28427@psf.upfronthosting.co.za> Message-ID: <1476383047.38.0.634874761043.issue28427@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch Added file: http://bugs.python.org/file45083/issue28427.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:25:35 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 18:25:35 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <20161013182532.17296.57617.53A02A49@psf.io> Roundup Robot added the comment: New changeset 4e2cce65e522 by Guido van Rossum in branch 'default': Issue #24452: Make webbrowser support Chrome on Mac OS X (merge 3.6->3.7) https://hg.python.org/cpython/rev/4e2cce65e522 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:29:17 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Oct 2016 18:29:17 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1476383357.3.0.349258661329.issue24452@psf.upfronthosting.co.za> Guido van Rossum added the comment: I applied this to 3.5, 3.6 and 3.7. I'm not sure we should also apply this to 2.7 -- optinions? Bug or feature? ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:32:06 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Oct 2016 18:32:06 +0000 Subject: [issue28433] Add sorted (ordered) containers In-Reply-To: <1476382897.32.0.459857278334.issue28433@psf.upfronthosting.co.za> Message-ID: <1476383526.76.0.106034050444.issue28433@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +abarnert, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:40:27 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 13 Oct 2016 18:40:27 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1476384027.16.0.291583896104.issue24452@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: The documentation seems to indicate that chrome MacOS is supposed to work in 2.7, which makes this a bug. https://docs.python.org/2.7/library/webbrowser.html?highlight=webbrowser#module-webbrowser But... it could also be a documentation bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:42:56 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 13 Oct 2016 18:42:56 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1476383357.3.0.349258661329.issue24452@psf.upfronthosting.co.za> Message-ID: Senthil Kumaran added the comment: Applying on 2.7 seems alright. Bug fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 14:58:35 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 13 Oct 2016 18:58:35 +0000 Subject: [issue28433] Add sorted (ordered) containers In-Reply-To: <1476382897.32.0.459857278334.issue28433@psf.upfronthosting.co.za> Message-ID: <1476385115.64.0.327722451138.issue28433@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 15:25:59 2016 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 13 Oct 2016 19:25:59 +0000 Subject: [issue12660] test_gdb fails when installed In-Reply-To: <1312038409.05.0.274432685937.issue12660@psf.upfronthosting.co.za> Message-ID: <1476386759.08.0.641243087086.issue12660@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 15:26:35 2016 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 13 Oct 2016 19:26:35 +0000 Subject: [issue11429] ctypes is highly eclectic in its raw-memory support In-Reply-To: <1299484141.33.0.394671210882.issue11429@psf.upfronthosting.co.za> Message-ID: <1476386795.62.0.0114001667319.issue11429@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 15:27:50 2016 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 13 Oct 2016 19:27:50 +0000 Subject: [issue17182] signal.default_int_handler should set signal number on the raised exception In-Reply-To: <1360591190.95.0.210480467275.issue17182@psf.upfronthosting.co.za> Message-ID: <1476386870.91.0.26163340503.issue17182@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 15:35:05 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 13 Oct 2016 19:35:05 +0000 Subject: [issue28433] Add sorted (ordered) containers In-Reply-To: <1476382897.32.0.459857278334.issue28433@psf.upfronthosting.co.za> Message-ID: <1476387305.48.0.313179464047.issue28433@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm sure this has been discussed before and rejected. I suggest you search the python-ideas mailing list archives, and if you do not find something in the archives, raise the issue on python-ideas. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 15:36:03 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 13 Oct 2016 19:36:03 +0000 Subject: [issue28425] Python3 ignores __init__.py that are links to /dev/null In-Reply-To: <1476317932.87.0.807629965942.issue28425@psf.upfronthosting.co.za> Message-ID: <1476387363.28.0.129285013847.issue28425@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 15:36:56 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 13 Oct 2016 19:36:56 +0000 Subject: [issue28424] pkgutil.get_data() doesn't work with namespace packages In-Reply-To: <1476315360.41.0.557766587306.issue28424@psf.upfronthosting.co.za> Message-ID: <1476387416.06.0.415276173247.issue28424@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 15:47:14 2016 From: report at bugs.python.org (Mark Shoulson) Date: Thu, 13 Oct 2016 19:47:14 +0000 Subject: [issue28434] U+1F441 EYE Missing in unicodedata Message-ID: <1476388034.81.0.0881168624488.issue28434@psf.upfronthosting.co.za> New submission from Mark Shoulson: Python3.4 does not appear to know about the Unicode character U+1F441 EYE, although it does know about nearby characters which were added to Unicode at the same time: >>> "\N{EYES}" # This is character U+1F440 '?' >>> "\N{NOSE}" # This is U+1F442 '?' >>> "\N{EYE}" File "", line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-6: unknown Unicode character name >>> import unicodedata >>> unicodedata.lookup("EYES") '?' >>> unicodedata.lookup("EYE") Traceback (most recent call last): File "", line 1, in KeyError: "undefined character name 'EYE'" >>> unicodedata.name('?') 'EYES' >>> unicodedata.name('?') Traceback (most recent call last): File "", line 1, in ValueError: no such name >>> ---------- components: Unicode messages: 278594 nosy: Mark Shoulson, ezio.melotti, haypo priority: normal severity: normal status: open title: U+1F441 EYE Missing in unicodedata type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 15:50:15 2016 From: report at bugs.python.org (Mark Shoulson) Date: Thu, 13 Oct 2016 19:50:15 +0000 Subject: [issue28434] U+1F441 EYE Missing in unicodedata In-Reply-To: <1476388034.81.0.0881168624488.issue28434@psf.upfronthosting.co.za> Message-ID: <1476388215.1.0.335837526265.issue28434@psf.upfronthosting.co.za> Mark Shoulson added the comment: Sorry, NOSE is U+1F443; I should have used EAR which is U+1F442. The result is the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 15:56:22 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Oct 2016 19:56:22 +0000 Subject: [issue28434] U+1F441 EYE Missing in unicodedata In-Reply-To: <1476388034.81.0.0881168624488.issue28434@psf.upfronthosting.co.za> Message-ID: <1476388582.97.0.661613351482.issue28434@psf.upfronthosting.co.za> Ned Deily added the comment: The EYE code point was added in Unicode 7.0 which was first supported in Python 3.5.0. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:02:34 2016 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Oct 2016 20:02:34 +0000 Subject: [issue26513] platform.win32_ver() broken in 2.7.11 In-Reply-To: <1457473293.66.0.928061603359.issue26513@psf.upfronthosting.co.za> Message-ID: <1476388954.0.0.786395013002.issue26513@psf.upfronthosting.co.za> Steve Dower added the comment: Did you get the fixed version from what will become 2.7.13? It doesn't get magically fixed in existing releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:03:37 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Oct 2016 20:03:37 +0000 Subject: [issue28433] Add sorted (ordered) containers In-Reply-To: <1476382897.32.0.459857278334.issue28433@psf.upfronthosting.co.za> Message-ID: <1476389017.2.0.0040031027465.issue28433@psf.upfronthosting.co.za> R. David Murray added the comment: I'm going to close it as rejected. If you surprise us and get a positive response on python-ideas we can always reopen. But, adding a btree would probably require a PEP anyway. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:05:22 2016 From: report at bugs.python.org (Robin Becker) Date: Thu, 13 Oct 2016 20:05:22 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476389122.76.0.452752314711.issue28092@psf.upfronthosting.co.za> Robin Becker added the comment: I executed gcc --version (&cc --version) in the do_cpython_build function immediately prior to the make -j2 that builds python noth show 4.8.2. I see the exact same errors as in the initial report. If the makefile or the configure is doing something special then I guess I have to work around that. A possibility is that the CFLAGS="-Wformat" in the environment or the configure argument --disable-shared is having some effect. I have made very few changes to the build scripts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:07:06 2016 From: report at bugs.python.org (Stefan Prawda) Date: Thu, 13 Oct 2016 20:07:06 +0000 Subject: [issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env Message-ID: <1476389226.43.0.0474537923373.issue28435@psf.upfronthosting.co.za> New submission from Stefan Prawda: test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env set: NO_PROXY=localhost,127.0.0.0/8,::1 no_proxy=localhost,127.0.0.0/8,::1 Patch attached. Run: ./python -m unittest test.test_urllib2_localnet.ProxyAuthTests -v test_proxy_qop_auth_int_works_or_throws_urlerror (test.test_urllib2_localnet.ProxyAuthTests) ... ok test_proxy_qop_auth_works (test.test_urllib2_localnet.ProxyAuthTests) ... ERROR test_proxy_with_bad_password_raises_httperror (test.test_urllib2_localnet.ProxyAuthTests) ... ERROR test_proxy_with_no_password_raises_httperror (test.test_urllib2_localnet.ProxyAuthTests) ... ERROR ====================================================================== ERROR: test_proxy_qop_auth_works (test.test_urllib2_localnet.ProxyAuthTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 1318, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1026, in _send_output self.send(msg) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 964, in send self.connect() File "/home/d0han/cpython/cpython/Lib/http/client.py", line 936, in connect (self.host,self.port), self.timeout, self.source_address) File "/home/d0han/cpython/cpython/Lib/socket.py", line 722, in create_connection raise err File "/home/d0han/cpython/cpython/Lib/socket.py", line 713, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/d0han/cpython/cpython/Lib/test/test_urllib2_localnet.py", line 372, in test_proxy_qop_auth_works result = self.opener.open(self.URL) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 526, in open response = self._open(req, data) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 544, in _open '_open', req) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 504, in _call_chain result = func(*args) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 1346, in http_open return self.do_open(http.client.HTTPConnection, req) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 1320, in do_open raise URLError(err) urllib.error.URLError: ====================================================================== ERROR: test_proxy_with_bad_password_raises_httperror (test.test_urllib2_localnet.ProxyAuthTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 1318, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1026, in _send_output self.send(msg) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 964, in send self.connect() File "/home/d0han/cpython/cpython/Lib/http/client.py", line 936, in connect (self.host,self.port), self.timeout, self.source_address) File "/home/d0han/cpython/cpython/Lib/socket.py", line 722, in create_connection raise err File "/home/d0han/cpython/cpython/Lib/socket.py", line 713, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/d0han/cpython/cpython/Lib/test/test_urllib2_localnet.py", line 360, in test_proxy_with_bad_password_raises_httperror self.URL) File "/home/d0han/cpython/cpython/Lib/unittest/case.py", line 728, in assertRaises return context.handle('assertRaises', args, kwargs) File "/home/d0han/cpython/cpython/Lib/unittest/case.py", line 177, in handle callable_obj(*args, **kwargs) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 526, in open response = self._open(req, data) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 544, in _open '_open', req) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 504, in _call_chain result = func(*args) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 1346, in http_open return self.do_open(http.client.HTTPConnection, req) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 1320, in do_open raise URLError(err) urllib.error.URLError: ====================================================================== ERROR: test_proxy_with_no_password_raises_httperror (test.test_urllib2_localnet.ProxyAuthTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 1318, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 1026, in _send_output self.send(msg) File "/home/d0han/cpython/cpython/Lib/http/client.py", line 964, in send self.connect() File "/home/d0han/cpython/cpython/Lib/http/client.py", line 936, in connect (self.host,self.port), self.timeout, self.source_address) File "/home/d0han/cpython/cpython/Lib/socket.py", line 722, in create_connection raise err File "/home/d0han/cpython/cpython/Lib/socket.py", line 713, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/d0han/cpython/cpython/Lib/test/test_urllib2_localnet.py", line 366, in test_proxy_with_no_password_raises_httperror self.URL) File "/home/d0han/cpython/cpython/Lib/unittest/case.py", line 728, in assertRaises return context.handle('assertRaises', args, kwargs) File "/home/d0han/cpython/cpython/Lib/unittest/case.py", line 177, in handle callable_obj(*args, **kwargs) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 526, in open response = self._open(req, data) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 544, in _open '_open', req) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 504, in _call_chain result = func(*args) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 1346, in http_open return self.do_open(http.client.HTTPConnection, req) File "/home/d0han/cpython/cpython/Lib/urllib/request.py", line 1320, in do_open raise URLError(err) urllib.error.URLError: ---------------------------------------------------------------------- Ran 4 tests in 3.024s FAILED (errors=3) ---------- components: Tests files: cpython.diff keywords: patch messages: 278600 nosy: Stefan Prawda priority: normal severity: normal status: open title: test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45084/cpython.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:08:39 2016 From: report at bugs.python.org (Stefan Prawda) Date: Thu, 13 Oct 2016 20:08:39 +0000 Subject: [issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env In-Reply-To: <1476389226.43.0.0474537923373.issue28435@psf.upfronthosting.co.za> Message-ID: <1476389319.85.0.716088959731.issue28435@psf.upfronthosting.co.za> Changes by Stefan Prawda : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:15:20 2016 From: report at bugs.python.org (Scott Leerssen) Date: Thu, 13 Oct 2016 20:15:20 +0000 Subject: [issue26513] platform.win32_ver() broken in 2.7.11 In-Reply-To: <1457473293.66.0.928061603359.issue26513@psf.upfronthosting.co.za> Message-ID: <1476389720.35.0.468790882133.issue26513@psf.upfronthosting.co.za> Scott Leerssen added the comment: I just assumed it was fixed based on the 2.7.12 release notes. I missed the comment on msg277117 which describes the same problem, so clearly this is a known issue and I'll look forward to seeing the fix in 2.7.13. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:16:05 2016 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 13 Oct 2016 20:16:05 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476389765.62.0.946620723469.issue28092@psf.upfronthosting.co.za> Nathaniel Smith added the comment: @rgbecker: Are you able to pull out the config.log generated by running python's ./configure script, and post that somewhere? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:22:15 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 13 Oct 2016 20:22:15 +0000 Subject: [issue28433] Add sorted (ordered) containers In-Reply-To: <1476382897.32.0.459857278334.issue28433@psf.upfronthosting.co.za> Message-ID: <1476390135.68.0.359149828847.issue28433@psf.upfronthosting.co.za> ???? ????????? added the comment: https://groups.google.com/forum/#!searchin/python-ideas/sorted|sort:relevance/python-ideas/dy3Thu-PXSM/mTqEduXE4GYJ ? @serhiy.storchaka did not rejected idea. Anyway, I still can not find message in python-ideas which describe why such idea may be rejected. Well, I will try to get answer at python-ideas... Maybe someone can say why this idea is broken in that issue ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:26:34 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 13 Oct 2016 20:26:34 +0000 Subject: [issue28433] Add sorted (ordered) containers In-Reply-To: <1476382897.32.0.459857278334.issue28433@psf.upfronthosting.co.za> Message-ID: <1476390394.3.0.523954593564.issue28433@psf.upfronthosting.co.za> ???? ????????? added the comment: Well, I created discussion at https://groups.google.com/forum/#!topic/python-ideas/CoRe1gThnd8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:28:12 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Oct 2016 20:28:12 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1476390492.5.0.755168378217.issue24452@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK will do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:29:24 2016 From: report at bugs.python.org (Evgeny Kapun) Date: Thu, 13 Oct 2016 20:29:24 +0000 Subject: [issue28436] GzipFile doesn't properly handle short reads and writes on the underlying stream Message-ID: <1476390564.38.0.787956404388.issue28436@psf.upfronthosting.co.za> New submission from Evgeny Kapun: GzipFile's underlying stream can be a raw stream (such as FileIO), and such streams can return short reads and writes at any time (e.g. due to signals). The correct behavior in case of short read or write is to retry the call to read or write the remaining data. GzipFile doesn't do this. This program demonstrates the problem with reading: import io, gzip class MyFileIO(io.FileIO): def read(self, n): # Emulate short read return super().read(1) raw = MyFileIO('test.gz', 'rb') gzf = gzip.open(raw, 'rb') gzf.read() Output: $ gzip -c /dev/null > test.gz $ python3 test.py Traceback (most recent call last): File "test.py", line 10, in gzf.read() File "/usr/lib/python3.5/gzip.py", line 274, in read return self._buffer.read(size) File "/usr/lib/python3.5/gzip.py", line 461, in read if not self._read_gzip_header(): File "/usr/lib/python3.5/gzip.py", line 409, in _read_gzip_header raise OSError('Not a gzipped file (%r)' % magic) OSError: Not a gzipped file (b'\x1f') And this shows the problem with writing: import io, gzip class MyIO(io.RawIOBase): def write(self, data): print(data) # Emulate short write return 1 raw = MyIO() gzf = gzip.open(raw, 'wb') gzf.close() Output: $ python3 test.py b'\x1f\x8b' b'\x08' b'\x00' b'\xb9\xea\xffW' b'\x02' b'\xff' b'\x03\x00' b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' It can be seen that there is no attempt to write all the data. Indeed, the return value of write() method is completely ignored. I think that either gzip module should be changed to handle short reads and writes properly, or its documentation should reflect the fact that it cannot be used with raw streams. ---------- components: Library (Lib) messages: 278606 nosy: abacabadabacaba priority: normal severity: normal status: open title: GzipFile doesn't properly handle short reads and writes on the underlying stream type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:30:28 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 20:30:28 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <20161013203025.10809.61910.5F2D61FE@psf.io> Roundup Robot added the comment: New changeset bc8a4b121aec by Guido van Rossum in branch '2.7': Issue #24452: Make webbrowser support Chrome on Mac OS X (backport to 2.7) https://hg.python.org/cpython/rev/bc8a4b121aec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:31:18 2016 From: report at bugs.python.org (Evgeny Kapun) Date: Thu, 13 Oct 2016 20:31:18 +0000 Subject: [issue15994] memoryview to freed memory can cause segfault In-Reply-To: <1348173441.91.0.841080415833.issue15994@psf.upfronthosting.co.za> Message-ID: <1476390678.25.0.669088153143.issue15994@psf.upfronthosting.co.za> Changes by Evgeny Kapun : ---------- nosy: +abacabadabacaba _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:31:28 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Oct 2016 20:31:28 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1476390688.12.0.143439318761.issue24452@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks everyone! Applied to 2.7, so closing as fixed now. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:38:16 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 13 Oct 2016 20:38:16 +0000 Subject: [issue28436] GzipFile doesn't properly handle short reads and writes on the underlying stream In-Reply-To: <1476390564.38.0.787956404388.issue28436@psf.upfronthosting.co.za> Message-ID: <1476391096.2.0.456766663574.issue28436@psf.upfronthosting.co.za> ???? ????????? added the comment: Also see issue16859 ---------- nosy: +mmarkk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:39:53 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 13 Oct 2016 20:39:53 +0000 Subject: [issue28436] GzipFile doesn't properly handle short reads and writes on the underlying stream In-Reply-To: <1476390564.38.0.787956404388.issue28436@psf.upfronthosting.co.za> Message-ID: <1476391193.57.0.283939882626.issue28436@psf.upfronthosting.co.za> ???? ????????? added the comment: And also issue26877 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:44:05 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Oct 2016 20:44:05 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476391445.94.0.346142739438.issue28092@psf.upfronthosting.co.za> STINNER Victor added the comment: "Don't want to add too much noise, but this issue also affects the manylinux project build compiler (gcc 4.8.2)." Can you elaborate on these issues? Are you getting the same errors than the error described in the initial message with GCC 4.2? If not, you may open a new issue to track compilation issues of Python 3.6 on GCC 4.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:47:40 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Thu, 13 Oct 2016 20:47:40 +0000 Subject: [issue28393] Update encoding lookup docs wrt #27938 In-Reply-To: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> Message-ID: <1476391660.83.0.531466923874.issue28393@psf.upfronthosting.co.za> Ville Skytt? added the comment: codecs-doc-3 contains a versionadded note about us-ascii. I think that's the only end user visible change in the new implementation. ---------- Added file: http://bugs.python.org/file45085/codecs-doc-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:48:50 2016 From: report at bugs.python.org (=?utf-8?q?Maciej_Urba=C5=84ski?=) Date: Thu, 13 Oct 2016 20:48:50 +0000 Subject: [issue15013] smtplib: add low-level APIs to doc? In-Reply-To: <1338968663.18.0.754320203153.issue15013@psf.upfronthosting.co.za> Message-ID: <1476391730.37.0.903263581561.issue15013@psf.upfronthosting.co.za> Maciej Urba?ski added the comment: I guess documenting `data` method may still be needed after all. For now I followed the suggestions from comments to best of my ability. Please see attached patch. ---------- keywords: +patch nosy: +rooter Added file: http://bugs.python.org/file45086/issue15013.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:54:06 2016 From: report at bugs.python.org (Douglas Greiman) Date: Thu, 13 Oct 2016 20:54:06 +0000 Subject: [issue28425] Python3 ignores __init__.py that are links to /dev/null In-Reply-To: <1476317932.87.0.807629965942.issue28425@psf.upfronthosting.co.za> Message-ID: <1476392046.94.0.775836513669.issue28425@psf.upfronthosting.co.za> Douglas Greiman added the comment: See associated bug filed against Bazel: https://github.com/bazelbuild/bazel/issues/1458 As for why Bazel does that, it's related to the sandboxing implementation but I don't know any details beyond that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:57:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 20:57:56 +0000 Subject: [issue21443] asyncio logging documentation clarifications In-Reply-To: <1399321197.68.0.955361534546.issue21443@psf.upfronthosting.co.za> Message-ID: <20161013205752.43839.1821.5BD24754@psf.io> Roundup Robot added the comment: New changeset e68b1b2515e9 by Guido van Rossum in branch '3.5': Issue #21443: Show how to change log level for asyncio. https://hg.python.org/cpython/rev/e68b1b2515e9 New changeset 660058d76788 by Guido van Rossum in branch '3.6': Issue #21443: Show how to change log level for asyncio. (Merge 3.5->3.6) https://hg.python.org/cpython/rev/660058d76788 New changeset 861d22bd852d by Guido van Rossum in branch 'default': Issue #21443: Show how to change log level for asyncio. (Merge 3.6->3.7) https://hg.python.org/cpython/rev/861d22bd852d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:58:53 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Oct 2016 20:58:53 +0000 Subject: [issue21443] asyncio logging documentation clarifications In-Reply-To: <1399321197.68.0.955361534546.issue21443@psf.upfronthosting.co.za> Message-ID: <1476392333.7.0.96887174842.issue21443@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks! Applied to 3.5, 3.6, 3.7. (We don't change 3.4 any more except for security fixes.) ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:03:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Oct 2016 21:03:27 +0000 Subject: [issue28436] GzipFile doesn't properly handle short reads and writes on the underlying stream In-Reply-To: <1476390564.38.0.787956404388.issue28436@psf.upfronthosting.co.za> Message-ID: <1476392607.02.0.0650514816385.issue28436@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:07:14 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 13 Oct 2016 21:07:14 +0000 Subject: [issue28393] Update encoding lookup docs wrt #27938 In-Reply-To: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> Message-ID: <1476392834.72.0.0468034392001.issue28393@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Thanks, Ville. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:24:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 21:24:56 +0000 Subject: [issue26869] unittest longMessage docs In-Reply-To: <1461743267.94.0.620093650485.issue26869@psf.upfronthosting.co.za> Message-ID: <20161013212453.82506.28966.DFCF3836@psf.io> Roundup Robot added the comment: New changeset 7eb4fe57492f by Guido van Rossum in branch '3.5': Issue #26869: Document unittest.TestCase.longMessage. (Mariatta) https://hg.python.org/cpython/rev/7eb4fe57492f New changeset d7279d803d1d by Guido van Rossum in branch '3.6': Issue #26869: Document unittest.TestCase.longMessage. (Mariatta) (3.5->3.6) https://hg.python.org/cpython/rev/d7279d803d1d New changeset c7c428350578 by Guido van Rossum in branch 'default': Issue #26869: Document unittest.TestCase.longMessage. (Mariatta) (3.6->3.7) https://hg.python.org/cpython/rev/c7c428350578 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:25:38 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Oct 2016 21:25:38 +0000 Subject: [issue26869] unittest longMessage docs In-Reply-To: <1461743267.94.0.620093650485.issue26869@psf.upfronthosting.co.za> Message-ID: <1476393938.38.0.830982219064.issue26869@psf.upfronthosting.co.za> Guido van Rossum added the comment: Done. Thanks! ---------- nosy: +gvanrossum resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:32:03 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Oct 2016 21:32:03 +0000 Subject: [issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env In-Reply-To: <1476389226.43.0.0474537923373.issue28435@psf.upfronthosting.co.za> Message-ID: <1476394323.77.0.460828336405.issue28435@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +orsenthil stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:33:03 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 21:33:03 +0000 Subject: [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <20161013213300.1758.85765.1B9C41B8@psf.io> Roundup Robot added the comment: New changeset e05c546062a1 by Guido van Rossum in branch '3.5': Issue #18789: Update XML vulnerability table to use Safe/Vulnerable instead of No/Yes. https://hg.python.org/cpython/rev/e05c546062a1 New changeset beed43d7dc46 by Guido van Rossum in branch '3.6': Issue #18789: Update XML vulnerability table to use Safe/Vulnerable instead of No/Yes. (3.5->3.6) https://hg.python.org/cpython/rev/beed43d7dc46 New changeset 9513fac97ddd by Guido van Rossum in branch 'default': Issue #18789: Update XML vulnerability table to use Safe/Vulnerable instead of No/Yes. (3.6->3.7) https://hg.python.org/cpython/rev/9513fac97ddd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:33:31 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Oct 2016 21:33:31 +0000 Subject: [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <1476394411.21.0.972778004458.issue18789@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks again! ---------- nosy: +gvanrossum resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:35:36 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 21:35:36 +0000 Subject: [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <20161013213533.5114.44488.B2F8D6EF@psf.io> Roundup Robot added the comment: New changeset 760403522d6b by Guido van Rossum in branch '2.7': Issue #18789: Update XML vulnerability table to use Safe/Vulnerable instead of No/Yes. (backport to 2.7) https://hg.python.org/cpython/rev/760403522d6b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:46:41 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Oct 2016 21:46:41 +0000 Subject: [issue28422] multiprocessing Manager mutable type member access failure In-Reply-To: <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za> Message-ID: <1476395201.12.0.790223379587.issue28422@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:52:39 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Oct 2016 21:52:39 +0000 Subject: [issue28291] urllib/urllib2 AbstractDigestAuthHandler locked to retried count of 5 In-Reply-To: <1475011388.29.0.32013326397.issue28291@psf.upfronthosting.co.za> Message-ID: <1476395559.21.0.917699910254.issue28291@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:59:00 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Oct 2016 21:59:00 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476395940.96.0.230300500402.issue28428@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 18:58:13 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Oct 2016 22:58:13 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1476399493.45.0.383186564985.issue28087@psf.upfronthosting.co.za> Ned Deily added the comment: (From https://github.com/curl/curl/issues/1057, the curl project has also seen this and opened an issue with Apple against macOS 10.12, RADAR 28372390.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 19:04:07 2016 From: report at bugs.python.org (Eryk Sun) Date: Thu, 13 Oct 2016 23:04:07 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1476399847.37.0.470889592901.issue28333@psf.upfronthosting.co.za> Eryk Sun added the comment: MultibyteToWideChar includes the trailing NUL when it gets the string length, so the WriteConsoleW call needs to use (wlen - 1). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 19:50:59 2016 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 13 Oct 2016 23:50:59 +0000 Subject: [issue28437] Class definition is not consistent with types.new_class Message-ID: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> New submission from Neil Girdhar: Minimum working example: class MyMetaclass(type): pass class OtherMetaclass(type): pass def metaclass_callable(name, bases, namespace): return OtherMetaclass(name, bases, namespace) class MyClass(metaclass=MyMetaclass): pass try: class MyDerived(MyClass, metaclass=metaclass_callable): pass except: print("Gotcha!") from types import new_class MyDerived = new_class("MyDerived", (), dict(metaclass=metaclass_callable)) print(type(MyDerived)) This is because something happened along the way and Objects/typeobject.c:type_new no longer coincides with Lib/types.py:new_class. The Python version conditionally calls _calculate_meta whereas the C version calls it unconditionally. I consider the C implementation to be the "correct" version. I suggest that * the Python version be made to coincide with the C version. * the documentation be made to coincide with the C version. Specifically, section 3.3.3.2 should read: "The metaclass of a class definition is selected from the explicitly specified metaclass (if any) and the metaclasses (i.e. type(cls)) of all specified base classes. The selected metaclass is the one which is a subtype of all of these candidate metaclasses. If none of the candidate metaclasses meets that criterion, then the class definition will fail with TypeError. If provided, the explicit metaclass must be a callable accepting the positional arguments (name, bases, _dict) as in the three argument form of the built-in type function." ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 278625 nosy: docs at python, neil.g priority: normal severity: normal status: open title: Class definition is not consistent with types.new_class type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 20:14:00 2016 From: report at bugs.python.org (Steve Dower) Date: Fri, 14 Oct 2016 00:14:00 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476404040.87.0.90991776912.issue28428@psf.upfronthosting.co.za> Steve Dower added the comment: Any reason why this module doesn't use argument clinic? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 22:22:57 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 14 Oct 2016 02:22:57 +0000 Subject: [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476411777.06.0.509767865029.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: Oops, I meant: MyDerived = new_class("MyDerived", (MyClass,), dict(metaclass=metaclass_callable)) Nevertheless, the exception line number is totally off because it's tripping in the C code rather than in the Python code of the types library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 23:11:04 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 03:11:04 +0000 Subject: [issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env In-Reply-To: <1476389226.43.0.0474537923373.issue28435@psf.upfronthosting.co.za> Message-ID: <1476414664.96.0.748404857759.issue28435@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 23:23:46 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 03:23:46 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1476415426.84.0.0469551081091.issue28426@psf.upfronthosting.co.za> Xiang Zhang added the comment: +1 for 2). Patch looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 00:06:25 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 04:06:25 +0000 Subject: [issue28424] pkgutil.get_data() doesn't work with namespace packages In-Reply-To: <1476315360.41.0.557766587306.issue28424@psf.upfronthosting.co.za> Message-ID: <1476417985.85.0.215707770383.issue28424@psf.upfronthosting.co.za> Xiang Zhang added the comment: The doc says: "If the package cannot be located or loaded, or it uses a loader which does not support get_data(), then None is returned". Namespace package gets a ``None`` loader and then does not support get_data. ---------- nosy: +brett.cannon, eric.snow, ncoghlan, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 00:14:11 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 14 Oct 2016 04:14:11 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476418451.5.0.293641110675.issue28428@psf.upfronthosting.co.za> INADA Naoki added the comment: > Any reason why this module doesn't use argument clinic? No reason. But I don't want to do in this issue, since I don't know how to generate good patch file for file rename + change in file. I'll do it in future issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 00:14:26 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 04:14:26 +0000 Subject: [issue28438] Wrong link in pkgutil.get_data doc Message-ID: <1476418466.2.0.122595119446.issue28438@psf.upfronthosting.co.za> New submission from Xiang Zhang: The get_data link in pkgutil.get_data doc refers to itself which does not help reading. I think it's better for it to refer to importlib.abc.ResourceLoader.get_data. ---------- assignee: docs at python components: Documentation files: pkgutil.get_data_doc.patch keywords: patch messages: 278631 nosy: docs at python, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Wrong link in pkgutil.get_data doc versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45087/pkgutil.get_data_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 01:08:40 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 14 Oct 2016 05:08:40 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476421720.73.0.832032717079.issue28428@psf.upfronthosting.co.za> INADA Naoki added the comment: I hit this issue27705, and I have no time to reinstall Visual Studio 2015 Community today. I'll try test on Windows later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 01:20:09 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Oct 2016 05:20:09 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <20161014052005.83811.70550.EB9301AC@psf.io> Roundup Robot added the comment: New changeset d4e715e725ef by Raymond Hettinger in branch '3.6': Issue #18844: Add more tests https://hg.python.org/cpython/rev/d4e715e725ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 01:53:28 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 14 Oct 2016 05:53:28 +0000 Subject: [issue28438] Wrong link in pkgutil.get_data doc In-Reply-To: <1476418466.2.0.122595119446.issue28438@psf.upfronthosting.co.za> Message-ID: <1476424408.24.0.71765661583.issue28438@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The patch looks good to me. Thank you, Xiang. I will apply it. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 02:00:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Oct 2016 06:00:56 +0000 Subject: [issue28438] Wrong link in pkgutil.get_data doc In-Reply-To: <1476418466.2.0.122595119446.issue28438@psf.upfronthosting.co.za> Message-ID: <20161014060044.15383.54650.1DD29F1D@psf.io> Roundup Robot added the comment: New changeset 7fb90c4ae643 by Senthil Kumaran in branch '3.5': Issue28438 - Fix the link for pkgutil.get_data doc. Patch contributed by Xiang Zhang. https://hg.python.org/cpython/rev/7fb90c4ae643 New changeset f2110f41012e by Senthil Kumaran in branch '3.6': [merge from 3.5] Issue28438 - Fix the link for pkgutil.get_data doc. https://hg.python.org/cpython/rev/f2110f41012e New changeset 897fe8fa14b5 by Senthil Kumaran in branch 'default': [merge from 3.6] Issue28438 - Fix the link for pkgutil.get_data doc. https://hg.python.org/cpython/rev/897fe8fa14b5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 02:01:17 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 14 Oct 2016 06:01:17 +0000 Subject: [issue28438] Wrong link in pkgutil.get_data doc In-Reply-To: <1476418466.2.0.122595119446.issue28438@psf.upfronthosting.co.za> Message-ID: <1476424877.65.0.482036606215.issue28438@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 02:02:17 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 06:02:17 +0000 Subject: [issue28438] Wrong link in pkgutil.get_data doc In-Reply-To: <1476418466.2.0.122595119446.issue28438@psf.upfronthosting.co.za> Message-ID: <1476424937.75.0.436174436199.issue28438@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks Senthil. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 02:50:50 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 14 Oct 2016 06:50:50 +0000 Subject: [issue28432] Fix doc of PyUnicode_EncodeLocale In-Reply-To: <1476378197.99.0.847074605857.issue28432@psf.upfronthosting.co.za> Message-ID: <1476427850.86.0.0582035697105.issue28432@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 03:23:00 2016 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 14 Oct 2016 07:23:00 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1476429780.61.0.946053556225.issue15873@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 03:57:22 2016 From: report at bugs.python.org (Armin Rigo) Date: Fri, 14 Oct 2016 07:57:22 +0000 Subject: [issue28427] WeakValueDictionary next bug (with multithreading) In-Reply-To: <1476354989.22.0.575160455599.issue28427@psf.upfronthosting.co.za> Message-ID: <1476431842.37.0.109626227385.issue28427@psf.upfronthosting.co.za> Armin Rigo added the comment: I'll admit I don't know how to properly fix this issue. What I came up with so far would need an atomic compare_and_delete operation on the dictionary self.data, so that we can do atomically: + elif self.data[wr.key] is wr: del self.data[wr.key] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 05:04:37 2016 From: report at bugs.python.org (Usui) Date: Fri, 14 Oct 2016 09:04:37 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1476435877.32.0.850378433248.issue8376@psf.upfronthosting.co.za> Usui added the comment: My proposal for this documentation point is to get rid off the word "most" and to replace it with "built-in". Since it will remove the misleading idea that this paragraph can explain how you can write a containers. ---------- keywords: +patch nosy: +Usui Added file: http://bugs.python.org/file45088/issue8376.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 05:20:30 2016 From: report at bugs.python.org (Robin Becker) Date: Fri, 14 Oct 2016 09:20:30 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476436830.41.0.868313809455.issue28092@psf.upfronthosting.co.za> Robin Becker added the comment: Hi njs, my manylinux diffs https://www.reportlab.com/media/manylinux-diff.txt full output of the docker command docker build -f Dockerfile-x86_64 -t rl/manylinux-x86_64 . &> ~/tmp/ttt https://www.reportlab.com/media/manylinux-docker-run-output.txt the end showing the 3.6b2 config and the failure https://www.reportlab.com/media/manylinux-docker-run-python-3.6b2.txt ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 05:28:48 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 09:28:48 +0000 Subject: [issue28439] Remove redundant checks in PyUnicode_EncodeLocale Message-ID: <1476437328.02.0.48418447078.issue28439@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- components: Interpreter Core files: PyUnicode_EncodeLocale.patch keywords: patch nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Remove redundant checks in PyUnicode_EncodeLocale type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45089/PyUnicode_EncodeLocale.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 05:35:05 2016 From: report at bugs.python.org (Anders Kaseorg) Date: Fri, 14 Oct 2016 09:35:05 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1476437705.98.0.105204627717.issue8376@psf.upfronthosting.co.za> Anders Kaseorg added the comment: Usui, this is a tutorial intended for beginners. Even if the change from ?most? to ?built-in? were a relevant one (and I don?t see how it is), beginners cannot possibly be expected to parse that level of meaning out of a single word. The difference between iterators and containers deserves at least a couple of sentences and preferably an example that includes both, as I proposed in http://bugs.python.org/issue8376#msg102966. Do you disapprove of that proposal? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 05:58:30 2016 From: report at bugs.python.org (loic rowe) Date: Fri, 14 Oct 2016 09:58:30 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1476439110.03.0.612334795405.issue8376@psf.upfronthosting.co.za> loic rowe added the comment: I don't disapprove the proposal on the need to have an explanation on the difference between a container and an iterator. But I was unable to found in the documentation a proper definition of a container. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 06:13:27 2016 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 14 Oct 2016 10:13:27 +0000 Subject: [issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env In-Reply-To: <1476389226.43.0.0474537923373.issue28435@psf.upfronthosting.co.za> Message-ID: <1476440007.44.0.728498321664.issue28435@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 07:27:28 2016 From: report at bugs.python.org (Frens Jan Rumph) Date: Fri, 14 Oct 2016 11:27:28 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1476444448.67.0.542462337521.issue26617@psf.upfronthosting.co.za> Frens Jan Rumph added the comment: Would be nice if 3.4 could also be patched, not just 3.5 and 3.6, since python in EPEL currently is python34-3.4.3-7.el7.x86_64. The patch can be applied without conflict and resolves some serious cases of segfaults. ---------- nosy: +Frens Jan Rumph _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 07:46:02 2016 From: report at bugs.python.org (Wolfgang Langner) Date: Fri, 14 Oct 2016 11:46:02 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476445562.87.0.00677047350763.issue28092@psf.upfronthosting.co.za> Wolfgang Langner added the comment: Please check if you have enabled the compiler as default by enabling the devtoolset on CentOS 5. I have compiled Python 3.6b2 on Ubuntu 14.04 with gcc 4.8.4 without any problems. Therefore gcc 4.8.2 should not be that different. Also keep in mind the default gcc for CentOS 5 will fail because it is to old. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 08:13:12 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Oct 2016 12:13:12 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1476447192.77.0.599146011526.issue26617@psf.upfronthosting.co.za> STINNER Victor added the comment: > Would be nice if 3.4 could also be patched, not just 3.5 and 3.6, since python in EPEL currently is python34-3.4.3-7.el7.x86_64. The patch can be applied without conflict and resolves some serious cases of segfaults. Sorry but Python 3.4 is not more supported upstream: https://docs.python.org/devguide/#status-of-python-branches You should ask for a downstream backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 08:18:31 2016 From: report at bugs.python.org (Wolfgang Langner) Date: Fri, 14 Oct 2016 12:18:31 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476447511.13.0.799810732312.issue28092@psf.upfronthosting.co.za> Wolfgang Langner added the comment: Also verified on CentOS 6.8 with devtoolset2 installed, gcc 4.8.2 Python 3.6b2 builds fine, all unittest ok. This is the same devtoolset as used on CentOS 5 manylinux1. Have no CentOS 5 VM available to do more tests. But gcc 4.8 is able to build Python 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 08:30:15 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Oct 2016 12:30:15 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1476448215.59.0.341200910931.issue26617@psf.upfronthosting.co.za> STINNER Victor added the comment: > You should ask for a downstream backport. I created the issue: https://bugzilla.redhat.com/show_bug.cgi?id=1384957 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 08:41:16 2016 From: report at bugs.python.org (Robin Becker) Date: Fri, 14 Oct 2016 12:41:16 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476448876.6.0.404361696799.issue28092@psf.upfronthosting.co.za> Robin Becker added the comment: tds333, the config says that 4.8.2 is being used, configure:3902: gcc --version >&5 gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15) Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. but perhaps the make is doing something else or the build goes wrong because shared is disabled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 08:41:51 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 14 Oct 2016 12:41:51 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476448911.28.0.613651084144.issue28428@psf.upfronthosting.co.za> INADA Naoki added the comment: I found _futures module is not used on Windows for now (without this patch). Because `{"_future", PyInit__future},` is not in PC/config.c But, when it added, test_windows_events cause infinite loop. This should be another issue. With this (asyncio-speedups2.patch), build on Windows succeeds, and test succeeds (without speedup enabled). I want to apply this patch before fixing the issue and adding _asyncio to PC/config.c Is it OK? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 09:09:00 2016 From: report at bugs.python.org (Marc Culler) Date: Fri, 14 Oct 2016 13:09:00 +0000 Subject: [issue28440] pip failures on macOS Sierra Message-ID: <1476450540.6.0.486887198503.issue28440@psf.upfronthosting.co.za> New submission from Marc Culler: Changes made to /Library/Python on macOSX Sierra cause the --with-ensurepip compiler flag to fail, and lead to failures of pip after installing Python. The new file that causes the problem on Sierra is: /Library/Python/2.7/site-packages/Extras.pth The current version of site.py reads that .pth file, which results in sys.path containing the path: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python The latter directory (which is protected by SIP) contains many Python 2.7 packages, including easy_install, setuptools, six, py2app, numpy, pylab and pyOpenSSL. The effect of including this SIP-protected path in sys.path is this: installing or upgrade a package in /Library/Frameworks/Python.framework which is also installed as an "Extra" in the /System/Frameworks/Python.framework will cause pip to attempt to delete the "old" package from its SIP-protected directory, leading to a "Permission Denied" exception and a failed install. Given that Apple has now tied /Library/Python to the system Python in this way, thereby making a separate Python framework in /Library/Frameworks unusable, the natural solution to this problem would be to stop including any /Library/Python paths in sys.path. I am attaching a patch that removes the block of code in site.py which adds these paths. ---------- files: pipfails.patch keywords: patch messages: 278649 nosy: Marc.Culler priority: normal severity: normal status: open title: pip failures on macOS Sierra type: compile error Added file: http://bugs.python.org/file45090/pipfails.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 09:16:02 2016 From: report at bugs.python.org (Steve Dower) Date: Fri, 14 Oct 2016 13:16:02 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476450962.54.0.189528119523.issue28428@psf.upfronthosting.co.za> Steve Dower added the comment: Sure. The build-specific changes for Windows look fine to me. There is also an argument that this should not be a built-in module but should be separate (like _ctypes). I don't know if that is just a Windows decision or not, but I'm guessing you weren't the one who made that decision originally. Issue for another time ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 09:34:45 2016 From: report at bugs.python.org (Erik Bray) Date: Fri, 14 Oct 2016 13:34:45 +0000 Subject: [issue28441] sys.executable is ambiguous on Cygwin without .exe suffix Message-ID: <1476452085.73.0.180033377767.issue28441@psf.upfronthosting.co.za> New submission from Erik Bray: This actually came up previously in #1543469 in the context of test_subprocess, but it's a more general issue that I thought was worth addressing somehow. The issue here is that as Cygwin tries to provide a "UNIX-like" experience, any system interfaces that take the path to an executable as an argument allow the .exe extension to be left off. This is particularly convenient for the shell experience, so that one can run, for example "python" or "ls" without typing "python.exe" or "ls.exe" (this is of course true of the Windows cmd shell as well). In the case of ambiguity however--such as when there is both a "python" and a "python.exe" in the same path, one must explicitly add the ".exe", otherwise the path without the exe is assumed. This is made even worse when you factor in case-insensitivity. Thus, this becomes a real annoyance when developing Python on Cygwin because you get both a "python.exe" and the "Python" directory in your source tree. This isn't so much of a problem, except that sys.executable leaves off the ".exe" (in UNIX-y fashion), so any test that calls Popen([sys.executable]) errors out because it thinks you're trying to execute a directory (Python/). I think the only reasonable fix is to take the patch suggested at #1543469, and ensure that the ".exe" suffix is appended to sys.executable on Cygwin. I think that sys.executable should be as unambiguous as possible, and that's the only way to make it reasonably unambiguous on Cygwin. I've attached a patch adapted from the one in #1543469 which solves the issue for me. ---------- files: cygwin-sys-executable.patch keywords: needs review, patch messages: 278651 nosy: erik.bray, masamoto, zach.ware priority: normal severity: normal status: open title: sys.executable is ambiguous on Cygwin without .exe suffix type: behavior versions: Python 3.7 Added file: http://bugs.python.org/file45091/cygwin-sys-executable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 10:35:11 2016 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 14 Oct 2016 14:35:11 +0000 Subject: [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476455711.15.0.822341930125.issue28437@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 10:35:39 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 14 Oct 2016 14:35:39 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail In-Reply-To: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> Message-ID: <1476455739.83.0.540846398638.issue28430@psf.upfronthosting.co.za> Changes by ???? ????????? : ---------- nosy: +mmarkk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:02:39 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 14 Oct 2016 15:02:39 +0000 Subject: [issue28442] tuple(a list subclass) does not iterate through the list In-Reply-To: <1476457296.79.0.655261011887.issue28442@psf.upfronthosting.co.za> Message-ID: <1476457359.27.0.93202975663.issue28442@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:07:42 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Oct 2016 15:07:42 +0000 Subject: [issue28440] pip failures on macOS Sierra In-Reply-To: <1476450540.6.0.486887198503.issue28440@psf.upfronthosting.co.za> Message-ID: <1476457662.77.0.471876145851.issue28440@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +Macintosh nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:01:36 2016 From: report at bugs.python.org (Siming Yuan) Date: Fri, 14 Oct 2016 15:01:36 +0000 Subject: [issue28442] tuple(a list subclass) does not iterate through the list Message-ID: <1476457296.79.0.655261011887.issue28442@psf.upfronthosting.co.za> New submission from Siming Yuan: if you subclass a list, and cast it to tuple, the casting does not iterate through the list. (casing to list does) for example, i needed a WeakList where the list only internally contains WeakReferences that gets deleted as soon as the object ref count goes to zero.. so: import weakref class WeakList(list): def __init__(self, items = ()): super(WeakList, self).__init__([weakref.ref(i, self.remove) for i in items]) def __contains__(self, item): return super(WeakList, self).__contains__(weakref.ref(item)) def __getitem__(self, index): if isinstance(index, slice): return [i() for i in super(WeakList, self).__getitem__(index)] else: return super(WeakList, self).__getitem__(index)() def __setitem__(self, index, item): if isinstance(index, slice): item = [weakref.ref(i, self.remove) for i in item] else: item = weakref.ref(item, self.remove) return super(WeakList, self).__setitem__(index, item) def __iter__(self): for i in list(super(WeakList, self).__iter__()): yield i() def remove(self, item): if isinstance(item, weakref.ReferenceType): super(WeakList, self).remove(item) else: super(WeakList, self).remove(weakref.ref(item)) def append(self, item): return super(WeakList, self).append(weakref.ref(item, self.remove)) # write some test code: class Dummy(): pass a = Dummy() b = Dummy() l = WeakList() l.append(a) l.append(b) print(a) <__main__.Dummy instance at 0x7f29993f4ab8> print(b) <__main__.Dummy instance at 0x7f29993f4b00> print(l) [, ] print([i for i in l]) [<__main__.Dummy instance at 0x7f29993f4ab8>, <__main__.Dummy instance at 0x7f29993f4b00>] print(list(l)) [<__main__.Dummy instance at 0x7f29993f4ab8>, <__main__.Dummy instance at 0x7f29993f4b00>] print(tuple(l)) (, ) ^ notice how you are getting weak references back instead of tuples. ---------- messages: 278652 nosy: siming85 priority: normal severity: normal status: open title: tuple(a list subclass) does not iterate through the list type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:09:14 2016 From: report at bugs.python.org (Jordan Brennan) Date: Fri, 14 Oct 2016 15:09:14 +0000 Subject: [issue28443] Logger methods never use kwargs Message-ID: <1476457754.13.0.399529764318.issue28443@psf.upfronthosting.co.za> New submission from Jordan Brennan: The methods on the Logger class e.g. logger.debug all accept **kwargs, these are passed to the _log method but they are never used. If _log attached them as an attribute to the LogRecord object, it would allow for creation of more powerful Filter objects to be created. You would then be able to filter log lines based on arbitrary keyword arguments. I've attached a patch along with tests that I think would be a sensible addition and I think that this shouldn't impact existing users of the module. ---------- components: Argument Clinic files: loggingkwargs.patch keywords: patch messages: 278653 nosy: jb098, larry priority: normal severity: normal status: open title: Logger methods never use kwargs type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45092/loggingkwargs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:16:07 2016 From: report at bugs.python.org (Jordan Brennan) Date: Fri, 14 Oct 2016 15:16:07 +0000 Subject: [issue28443] Logger methods never use kwargs In-Reply-To: <1476457754.13.0.399529764318.issue28443@psf.upfronthosting.co.za> Message-ID: <1476458167.26.0.284472415364.issue28443@psf.upfronthosting.co.za> Changes by Jordan Brennan : ---------- components: -Argument Clinic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:12:15 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Oct 2016 15:12:15 +0000 Subject: [issue28443] Logger methods never use kwargs In-Reply-To: <1476457754.13.0.399529764318.issue28443@psf.upfronthosting.co.za> Message-ID: <1476457935.43.0.0323361506298.issue28443@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:02:24 2016 From: report at bugs.python.org (Siming Yuan) Date: Fri, 14 Oct 2016 15:02:24 +0000 Subject: [issue28442] tuple(a list subclass) does not iterate through the list In-Reply-To: <1476457296.79.0.655261011887.issue28442@psf.upfronthosting.co.za> Message-ID: <1476457344.21.0.99112618383.issue28442@psf.upfronthosting.co.za> Changes by Siming Yuan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:26:35 2016 From: report at bugs.python.org (Jordan Brennan) Date: Fri, 14 Oct 2016 15:26:35 +0000 Subject: [issue28443] Logger methods never use kwargs In-Reply-To: <1476457754.13.0.399529764318.issue28443@psf.upfronthosting.co.za> Message-ID: <1476458795.79.0.442720372238.issue28443@psf.upfronthosting.co.za> Changes by Jordan Brennan : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:34:43 2016 From: report at bugs.python.org (Benny K J) Date: Fri, 14 Oct 2016 15:34:43 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux Message-ID: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> New submission from Benny K J: When cross compiling Python for ARM many of the extension modules are not build However when compiling for the native platform the extension modules are properly build. Cross Compilation Steps ======================= CONFIG_SITE=config.site CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib READELF=arm-linux-gnueabihf-readelf ./configure --enable-shared --host=arm-linux --build=x86_64-linux-gnu --disable-ipv6 --prefix=/opt/python3 make sudo PATH=/home/benny/workspace/projects/webshield/src/dntl_ws/sw/toolchain/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/bin:$PATH make install Extension Modules Built when cross compiled =========================================== building '_ctypes_test' extension building 'cmath' extension building '_json' extension building '_testcapi' extension building '_testbuffer' extension building '_testimportmultiple' extension building '_testmultiphase' extension building '_lsprof' extension building '_opcode' extension building 'parser' extension building 'mmap' extension building 'audioop' extension building '_crypt' extension building '_csv' extension building 'termios' extension building 'resource' extension building 'nis' extension building '_multibytecodec' extension building '_codecs_kr' extension building '_codecs_jp' extension building '_codecs_cn' extension building '_codecs_tw' extension building '_codecs_hk' extension building '_codecs_iso2022' extension building '_decimal' extension building '_multiprocessing' extension building 'ossaudiodev' extension building 'xxlimited' extension building '_ctypes' extension Compilation Steps on x86 Machine ================================ CONFIG_SITE=config.site ./configure --enable-shared --disable-ipv6 --prefix=/opt/python3 make sudo make install Extension Modules Built when natively compiled =========================================== building '_struct' extension building '_ctypes_test' extension building 'array' extension building 'cmath' extension building 'math' extension building '_datetime' extension building '_random' extension building '_bisect' extension building '_heapq' extension building '_pickle' extension building '_json' extension building '_testcapi' extension building '_testbuffer' extension building '_testimportmultiple' extension building '_testmultiphase' extension building '_lsprof' extension building 'unicodedata' extension building '_opcode' extension building 'fcntl' extension building 'grp' extension building 'spwd' extension building 'select' extension building 'parser' extension building 'mmap' extension building 'syslog' extension building 'audioop' extension building 'readline' extension building '_crypt' extension building '_csv' extension building '_posixsubprocess' extension building '_socket' extension building '_sha256' extension building '_sha512' extension building '_md5' extension building '_sha1' extension building 'termios' extension building 'resource' extension building 'nis' extension building 'binascii' extension building 'pyexpat' extension building '_elementtree' extension building '_multibytecodec' extension building '_codecs_kr' extension building '_codecs_jp' extension building '_codecs_cn' extension building '_codecs_tw' extension building '_codecs_hk' extension building '_codecs_iso2022' extension building '_decimal' extension building '_multiprocessing' extension building 'ossaudiodev' extension building 'xxlimited' extension building '_ctypes' extension I've further tried building for ARM natively on ARM machine and the extensions was build successfully. Tool chain used for cross compilation ======================================= Using built-in specs. COLLECT_GCC=arm-linux-gnueabihf-gcc COLLECT_LTO_WRAPPER=/home/benny/workspace/projects/webshield/src/dntl_ws/sw/toolchain/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/bin/../libexec/gcc/arm-linux-gnueabihf/4.9.4/lto-wrapper Target: arm-linux-gnueabihf Configured with: /home/tcwg-buildslave/workspace/tcwg-make-release/label/tcwg-x86_64-ex40/target/arm-linux-gnueabihf/snapshots/gcc-linaro-4.9-2016.02/configure SHELL=/bin/bash --with-bugurl=https://bugs.linaro.org --with-mpc=/home/tcwg-buildslave/workspace/tcwg-make-release/label/tcwg-x86_64-ex40/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/home/tcwg-buildslave/workspace/tcwg-make-release/label/tcwg-x86_64-ex40/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/home/tcwg-buildslave/workspace/tcwg-make-release/label/tcwg-x86_64-ex40/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libstdcxx-pch --disable-libmudflap --with-cloog=no --with-ppl=no --with-isl=no --disable-nls --enable-c99 --with-tune=cortex-a9 --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-multilib --enable-multiarch --with-build-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release/label/tcwg-x86_64-ex40/target/arm-linux-gnueabihf/_build/sysroots/arm-linux-gnueabihf --enable-lto --enable-linker-build-id --enable-long-long --enable-shared --with-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release/label/tcwg-x86_64-ex40/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/libc --enable-languages=c,c++,fortran,lto --enable-checking=release --disable-bootstrap --with-bugurl=https://bugs.linaro.org --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabihf --prefix=/home/tcwg-buildslave/workspace/tcwg-make-release/label/tcwg-x86_64-ex40/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu Thread model: posix gcc version 4.9.4 20151028 (prerelease) (Linaro GCC 4.9-2016.02) Host Machine ============= Ubuntu 16.04.1 LTS Linux whachamacallit 4.4.0-42-generic #62-Ubuntu SMP Fri Oct 7 23:11:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux ---------- components: Cross-Build, Extension Modules files: python_x86_host_arm_target_config.log messages: 278654 nosy: Alex.Willmer, bennykj priority: normal severity: normal status: open title: Missing extensions modules when cross compiling python 3.5.2 for arm on Linux versions: Python 3.5 Added file: http://bugs.python.org/file45093/python_x86_host_arm_target_config.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:36:35 2016 From: report at bugs.python.org (Benny K J) Date: Fri, 14 Oct 2016 15:36:35 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476459395.79.0.888607846719.issue28444@psf.upfronthosting.co.za> Changes by Benny K J : ---------- type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:37:08 2016 From: report at bugs.python.org (Evgeny Kapun) Date: Fri, 14 Oct 2016 15:37:08 +0000 Subject: [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1476459428.59.0.0915668033718.issue13322@psf.upfronthosting.co.za> Changes by Evgeny Kapun : ---------- nosy: +abacabadabacaba _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:45:59 2016 From: report at bugs.python.org (Julien Muchembled) Date: Fri, 14 Oct 2016 15:45:59 +0000 Subject: [issue15100] Race conditions in shutil.copy, shutil.copy2 and shutil.copyfile In-Reply-To: <1340020668.92.0.801725909503.issue15100@psf.upfronthosting.co.za> Message-ID: <1476459959.96.0.255519510953.issue15100@psf.upfronthosting.co.za> Changes by Julien Muchembled : ---------- nosy: +jm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 12:47:48 2016 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 14 Oct 2016 16:47:48 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476463668.63.0.414964480668.issue28092@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Yeah, the config.log there clearly shows that configure is using gcc 4.8.2 on the failed builds. Very odd. Stepping back for a moment, is there any point in continuing to debug this? Given Benjamin's comment up-thread: > I mainly converted them to see if it would cause problems My impression is that restricting inline functions to 'static inline' only is the best plan for 3.6 anyway, since AFAIK that really does work on all the compilers that people are likely to run into, while non-static inline has problems with the default compilers on both CentOS 5 and OS X. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 12:53:42 2016 From: report at bugs.python.org (Evgeny Kapun) Date: Fri, 14 Oct 2016 16:53:42 +0000 Subject: [issue28445] Wrong documentation for GzipFile.peek Message-ID: <1476464022.39.0.651124050997.issue28445@psf.upfronthosting.co.za> New submission from Evgeny Kapun: >From the documentation for GzipFile.peek(): At most one single read on the compressed stream is done to satisfy the call. If "compressed stream" means the underlying file object, then this is not true. The method tries to return at least one byte, unless the stream is at EOF. It is possible to create arbitrarily long compressed stream that would decompress to nothing, and the implementation would read the entire stream in this case. Because the length of the stream is not known in advance, several reads may be required for this. Perhaps the documentation for GzipFile.peek() should be made the same as that for BZ2File.peek() and LZMAFile.peek(). ---------- assignee: docs at python components: Documentation messages: 278656 nosy: abacabadabacaba, docs at python priority: normal severity: normal status: open title: Wrong documentation for GzipFile.peek versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 12:54:39 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 14 Oct 2016 16:54:39 +0000 Subject: [issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x In-Reply-To: <1476450540.6.0.486887198503.issue28440@psf.upfronthosting.co.za> Message-ID: <1476464079.45.0.826713465548.issue28440@psf.upfronthosting.co.za> Ned Deily added the comment: This also affects the -m ensurepip installation of pip itself: the pip install fails trying to upgrade the Apple-supplied version of setuptools. The behavior of adding the system Python's site-packages directory to the search path of all framework-build Pythons was deliberately added as a result of Issue4865. I think experience has shown this was not a good idea because of the coupling it introduced between separate Python installations and some third-party distributors of Python on OS X already patch this code out. It's currently only an issue for 2.7.x since Apple has not yet shipped versions of Python 3.x but the code should be removed there, too. ---------- assignee: -> ned.deily nosy: +benjamin.peterson priority: normal -> release blocker stage: -> patch review title: pip failures on macOS Sierra -> ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x type: compile error -> versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 13:20:37 2016 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 14 Oct 2016 17:20:37 +0000 Subject: [issue28443] Logger methods never use kwargs In-Reply-To: <1476457754.13.0.399529764318.issue28443@psf.upfronthosting.co.za> Message-ID: <1476465637.22.0.690864122476.issue28443@psf.upfronthosting.co.za> Vinay Sajip added the comment: Those signatures have **kwargs for potential extension of the logging API itself (without extending the existing argument list), not for passing arguments to filters. You can already filter completely flexibly by passing additional values in the "extra" parameter, which writes those to the LogRecord. This can be inspected by filters in the same way as you propose, so there seems no reason to provide another way of doing this. N.B. Removed larry from the nosy list, as he was apparently added by accident when the "Argument Clinic" component was selected in error. ---------- nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 13:22:08 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 14 Oct 2016 17:22:08 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476465728.67.0.0441529051442.issue28092@psf.upfronthosting.co.za> Ned Deily added the comment: "while non-static inline has problems with the default compilers on both CentOS 5 and OS X." The changes introduced in 3.6 prevent compilation with gcc4.0 which was the default Apple-supplied compiler on Mac OS X 10.4 (Tiger). 3.6 currently compiles correctly with gcc4.2, the default on Mac OS X 10.5 (Leopard). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 13:24:04 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Oct 2016 17:24:04 +0000 Subject: [issue28445] Wrong documentation for GzipFile.peek In-Reply-To: <1476464022.39.0.651124050997.issue28445@psf.upfronthosting.co.za> Message-ID: <1476465844.28.0.836882743309.issue28445@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 13:46:47 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 17:46:47 +0000 Subject: [issue28445] Wrong documentation for GzipFile.peek In-Reply-To: <1476464022.39.0.651124050997.issue28445@psf.upfronthosting.co.za> Message-ID: <1476467207.41.0.346252286194.issue28445@psf.upfronthosting.co.za> Xiang Zhang added the comment: The "compressed stream" is not the underlying file object but _GzipReader. And actually the "at most one single reader" is the characteristic of io.BufferedReader.peek, you can see it in the doc. Maybe it needs multiple reads on the file object in a single peek, but they are all encapsulated in the _GzipReader.read. So at the point of GzipFile.peek, it's still a single read. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 14:08:02 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 18:08:02 +0000 Subject: [issue28442] tuple(a list subclass) does not iterate through the list In-Reply-To: <1476457296.79.0.655261011887.issue28442@psf.upfronthosting.co.za> Message-ID: <1476468482.82.0.548672082583.issue28442@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 14:25:39 2016 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 14 Oct 2016 18:25:39 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476469539.29.0.583276689739.issue28092@psf.upfronthosting.co.za> Nathaniel Smith added the comment: > 3.6 currently compiles correctly with gcc4.2, the default on Mac OS X 10.5 (Leopard). So to summarize our current understanding: gcc 4.3 added support for C99 inline, which explains why gcc 4.2 works and gcc 4.8 doesn't. WTF is going on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 14:39:58 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 14 Oct 2016 18:39:58 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476470398.42.0.511736504913.issue28444@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Please upload the output of make, this is where the error messages are printed when extension modules fail to build. Where is set the root directory for arm headers and libraries in the configure command line ? ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 15:54:49 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Oct 2016 19:54:49 +0000 Subject: [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1476474889.07.0.596273559757.issue25152@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: docs at python -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 16:00:31 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Oct 2016 20:00:31 +0000 Subject: [issue28424] pkgutil.get_data() doesn't work with namespace packages In-Reply-To: <1476315360.41.0.557766587306.issue28424@psf.upfronthosting.co.za> Message-ID: <1476475231.93.0.278965713816.issue28424@psf.upfronthosting.co.za> Brett Cannon added the comment: Xiang is right about why this doesn't work. If you would like to propose a patch to update the wording of the docs, Douglas, we could then consider applying it. It could be as simple as just adding "(e.g. the load for namespace packages does not implement get_data())". And there is no equivalent feature in importlib (yet; it's on my todo list). ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 16:04:25 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Oct 2016 20:04:25 +0000 Subject: [issue28411] Eliminate PyInterpreterState.modules. In-Reply-To: <1476138783.81.0.661524291989.issue28411@psf.upfronthosting.co.za> Message-ID: <1476475465.75.0.876484816524.issue28411@psf.upfronthosting.co.za> Brett Cannon added the comment: As Nick pointed out, PyInterpreterState's fields are private so do what you want. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 17:06:22 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Oct 2016 21:06:22 +0000 Subject: [issue28403] Porting guide: disabling & warning on implicit unicode conversions In-Reply-To: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> Message-ID: <1476479182.65.0.597518716661.issue28403@psf.upfronthosting.co.za> Brett Cannon added the comment: If a new codec gets added to 2.7 then I'm fine with the proposed change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 17:21:57 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Oct 2016 21:21:57 +0000 Subject: [issue28415] PyUnicode_FromFromat interger format handling different from printf about zeropad In-Reply-To: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> Message-ID: <1476480117.21.0.0894749103572.issue28415@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I presume that PyUnicode_FromFormat is responsible for the first of the following: >>> '%010.5d' % 100 '0000000100' >>> b'%010.5d' % 100 b'0000000100' I am strongly of the opinion that the behavior should be left alone and the C-API doc changed by either 1) replacing 'exactly' with 'nearly' or 2) adding the following: "except that a 0 conversion flag is not ignored when a precision is given for d, i, o, u, x and X conversion types" (and other exceptions as discovered). I took the terms 'conversion flag' and 'conversion type' from https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting https://docs.python.org/3/library/stdtypes.html#printf-style-bytes-formatting I consider the Python behavior to be superior. The '0' conversion flag, the '.' precision indicator, and the int conversion types are literal characters. If one does not want the '0' conversion, one should omit it and not write it to be ignored. >>> '%10.5d' % 100 ' 00100' And I consider the abolition of int 'precision', inr {} formatting even better. >>> '{:010.5d}'.format(100) Traceback (most recent call last): File "", line 1, in '{:010.5d}'.format(100) ValueError: Precision not allowed in integer format specifier It has always been a source of confusion, and there is hardly any real-world use case for a partial 0 fill. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, eric.smith, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 17:26:21 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Oct 2016 21:26:21 +0000 Subject: [issue28425] Python3 ignores __init__.py that are links to /dev/null In-Reply-To: <1476317932.87.0.807629965942.issue28425@psf.upfronthosting.co.za> Message-ID: <1476480381.94.0.226072241372.issue28425@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> test needed versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 17:34:58 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 14 Oct 2016 21:34:58 +0000 Subject: [issue28436] GzipFile doesn't properly handle short reads and writes on the underlying stream In-Reply-To: <1476390564.38.0.787956404388.issue28436@psf.upfronthosting.co.za> Message-ID: <1476480898.19.0.084113970308.issue28436@psf.upfronthosting.co.za> Martin Panter added the comment: I would fix the documentation to say the underlying stream should do ?exact? reads and writes, e.g. one that implements io.BufferedIOBase.read(size) or write(). In my experience, most APIs in Python?s library assume or require this, rather than the ?raw? behaviour. Is it likely that people are passing raw FileIO or similar objects to GzipFile, or is this just a theoretical problem? Also related: In Issue 24291 and Issue 26721, we realized that all the servers based on socketserver could unexpectedly do short writes, which was a practical bug (not just theoretical). I changed socketserver over to doing exact writes, and added a workaround in the wsgiref module to handle partial writes. See for the altered documentation. Other APIs that come to mind are shutil.copyfileobj() (documentation proposed in Issue 24291), and io.TextIOWrapper (documented as requiring BufferedIOBase). Also, the bzip and LZMA modules seem equally affected as gzip. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python stage: -> needs patch versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 17:36:25 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Oct 2016 21:36:25 +0000 Subject: [issue28425] Python3 ignores __init__.py that are links to /dev/null In-Reply-To: <1476317932.87.0.807629965942.issue28425@psf.upfronthosting.co.za> Message-ID: <1476480985.22.0.23218719088.issue28425@psf.upfronthosting.co.za> Brett Cannon added the comment: Since /dev/null is not a file according to os.path.isfile(), I'm going to close this as not a bug. And to answer Antti's question, it's because the semantics come from the original C code where EAFP is not pleasant. ---------- nosy: +brett.cannon resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 17:37:27 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Oct 2016 21:37:27 +0000 Subject: [issue28396] Remove *.pyo references from man page Message-ID: <1476481047.43.0.417931922217.issue28396@psf.upfronthosting.co.za> New submission from Brett Cannon: The patch LGTM. ---------- assignee: docs at python -> brett.cannon nosy: +brett.cannon versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 18:14:16 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 14 Oct 2016 22:14:16 +0000 Subject: [issue28443] Logger methods never use kwargs In-Reply-To: <1476457754.13.0.399529764318.issue28443@psf.upfronthosting.co.za> Message-ID: <1476483256.89.0.143548270426.issue28443@psf.upfronthosting.co.za> St?phane Wirtel added the comment: In your patch, there is an assignation to self.kwargs = kwargs but you don't use it into your code. Maybe with inheritance ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 18:20:07 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 14 Oct 2016 22:20:07 +0000 Subject: [issue28445] Wrong documentation for GzipFile.peek In-Reply-To: <1476464022.39.0.651124050997.issue28445@psf.upfronthosting.co.za> Message-ID: <1476483607.81.0.253601012195.issue28445@psf.upfronthosting.co.za> Martin Panter added the comment: The peek() method was originally added by Issue 9962, where Antoine was trying to imitate the BufferedReader.peek() API. However because ?the number of bytes returned may be more or less than requested?, I never understood what this methods were good for; see also Issue 5811. I think we could at least remove the claim about ?at most one single read?. That is just describing an internal detail. The documentation for bzip and LZMA is slightly more useful IMO because it says ?at least one byte of data will be returned, unless EOF has been reached?. This guarantee is actually missing from the underlying BufferedReader.peek() documentation, though I think both io and _pyio implement it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 18:28:06 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 14 Oct 2016 22:28:06 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1476484086.58.0.425292960195.issue24658@psf.upfronthosting.co.za> St?phane Wirtel added the comment: ping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 18:57:58 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Oct 2016 22:57:58 +0000 Subject: [issue28442] tuple(a list subclass) does not iterate through the list In-Reply-To: <1476457296.79.0.655261011887.issue28442@psf.upfronthosting.co.za> Message-ID: <1476485878.26.0.96298130622.issue28442@psf.upfronthosting.co.za> Terry J. Reedy added the comment: (Siming, when you post a mixture of code and output, please comment out output with # so the example can be run as is.) I cannot reproduce the difference reported. I added #s and ran the cut and pasted code (uploaded) on 2.7, 3.5, and 3.6 installed on Win 10. For 3.6, Python 3.6.0b2 (default, Oct 10 2016, 21:15:32) [MSC v.1900 64 bit (AMD64)] on win32 For me, the tuple output is exactly the same as the list output, except for '()' versus '[]'. In 3.5+, 'instance' is changed to 'object' for both list and tuple. (<__main__.Dummy object at 0x000001839C1F32E8>, <__main__.Dummy object at 0x000001839C384DA0>) Siming, please cut and paste the interactive splash line, like the above, that tells us the binary and OS you used. ---------- nosy: +terry.reedy Added file: http://bugs.python.org/file45094/tem.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 18:58:18 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Oct 2016 22:58:18 +0000 Subject: [issue28442] tuple(a list subclass) does not iterate through the list In-Reply-To: <1476457296.79.0.655261011887.issue28442@psf.upfronthosting.co.za> Message-ID: <1476485898.68.0.0785390889405.issue28442@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 19:23:25 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 14 Oct 2016 23:23:25 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1476487405.79.0.520118321388.issue18235@psf.upfronthosting.co.za> Martin Panter added the comment: This is my understanding: We are talking about the code at that switches the values of LDSHARED and/or BLDSHARED. Yes, Michael H. was suggesting to both move and change (revert) back to overwriting LDSHARED with the value of BLDSHARED. Since he is moving the code into _init_posix(), which I think only gets called at run time, the state of _PYTHON_BUILD won?t affect the value of LDSHARED saved in the installed config file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 19:46:31 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 14 Oct 2016 23:46:31 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1476488791.18.0.0720917715176.issue26439@psf.upfronthosting.co.za> Martin Panter added the comment: Just some minor comments on aix-library.161004.patch: Instead of _util.py, I wonder if the new file should have a different name, like _util_common.py, to avoid being too similar to util.py. +def get_shared(input): + """Internal support function: examine the get_dumpH() output and + return a list of all shareable objects indicated in the output the + character "[" is used to strip off the path information. Needs a newline or new sentance to separate ?output? and ?the character?. +def get_legacy(members): + [. . .] + # shr.o is the preffered name so we look for shr.o first Spelling: preferred [single F, double R] +def get_version(name, members): + """[. . .] + Before the GNU convention became the standard scheme regardless of + binary size AIX packagers used GNU convention "as-is" for 32-bit + archive members but used an "distinguishing" name for 64-bit members. Should be: a "distinguishing" [not ?an?] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 20:53:08 2016 From: report at bugs.python.org (Alex Regueiro) Date: Sat, 15 Oct 2016 00:53:08 +0000 Subject: [issue28446] pyvenv generates malformed hashbangs for scripts Message-ID: <1476492788.48.0.267846160291.issue28446@psf.upfronthosting.co.za> New submission from Alex Regueiro: Quotes around hashbangs are not recognised and are considered invalid syntax, at least on Bash on OS X 10.12. There's really no workaround (that I'm aware of) for paths containing spaces, except maybe symlinking the directory in the path the contains the space. Maybe a warning message about this would be best. To reproduce this issue, simply run the following from an empty directory that has a space in its path: ``` pyenv venv/ source ./venv/bin/activate pip ``` The result should be something like: ``` -bash: /Users/me/dir with space/foo/venv/bin/pip: "/Users/me/dir: bad interpreter: No such file or directory ``` ---------- messages: 278676 nosy: alexreg priority: normal severity: normal status: open title: pyvenv generates malformed hashbangs for scripts type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 20:54:00 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Oct 2016 00:54:00 +0000 Subject: [issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env In-Reply-To: <1476389226.43.0.0474537923373.issue28435@psf.upfronthosting.co.za> Message-ID: <1476492840.65.0.837027696828.issue28435@psf.upfronthosting.co.za> Martin Panter added the comment: The test tries using ProxyHandler directly. It looks like that handler intentionally ignores the request if it matches no_proxies (Issue 6894), so I think Piotr?s approach of adjusting the tests is correct. The patch looks good to me, though I would drop that blank line in test_proxy_qop_auth_works(). It looks like setting a temporary environment variable should disable any settings from Windows registry or OS X config, so this patch should even help in those cases. ---------- versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 21:05:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Oct 2016 01:05:11 +0000 Subject: [issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted In-Reply-To: <1421153299.35.0.701583632763.issue23231@psf.upfronthosting.co.za> Message-ID: <20161015010508.20766.13705.1006D1B3@psf.io> Roundup Robot added the comment: New changeset 402eba63650c by Martin Panter in branch '3.5': Issue #23231: Document codecs.iterencode(), iterdecode() shortcomings https://hg.python.org/cpython/rev/402eba63650c New changeset 0837940bcb9f by Martin Panter in branch '3.6': Issue #23231: Merge codecs doc from 3.5 into 3.6 https://hg.python.org/cpython/rev/0837940bcb9f New changeset 1955dcc27332 by Martin Panter in branch 'default': Issue #23231: Merge codecs doc from 3.6 https://hg.python.org/cpython/rev/1955dcc27332 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 21:13:17 2016 From: report at bugs.python.org (George,Y) Date: Sat, 15 Oct 2016 01:13:17 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection Message-ID: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> New submission from George,Y: I need to know the IP address on the other side of a broken TCP/IP connection. "socket.getpeername()" fails to do the job sometimes because the connection has been closed, and Windows Error 10038 tells the connection is no longer a socket so that the method getpeername is wrongly used. Here goes the code in main thread: ----------- mailbox = queue.Queue() read_sockets, write_sockets, error_sockets = select.select(active_socks,[],[],TIMEOUT) for sock in read_sockets: ...... except: mailbox.put( (("sock_err",sock), 'localhost') ) ========= The sub thread get this message from mailbox and try to analyze the broken socket, to simplify I put the code and output together: ------------- print(sock)>>> sock.getpeername()>>> OS.Error[WinError10038]an operation was attempted on something that is not a socket ======= Surprisingly, this kind of error happen occasionally - sometimes the socket object is normal and getpeername() works fine. So once a connection is broken, there is no way to tell the address to whom it connected? ---------- components: Library (Lib) files: socket?????.png messages: 278679 nosy: George,Y priority: normal severity: normal status: open title: socket.getpeername() failure on broken TCP/IP connection type: crash versions: Python 3.4 Added file: http://bugs.python.org/file45095/socket?????.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 21:31:39 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Oct 2016 01:31:39 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476495099.4.0.146030903407.issue28447@psf.upfronthosting.co.za> Martin Panter added the comment: The getpeername() method is just a wrapper around the OS function, so it is not going to work if the socket file descriptor is closed or invalid (-1). You haven?t provided enough code or information for someone else to reproduce the problem. But it sounds like you may be closing the socket in one thread, and trying to use it in another thread. This is going to be unreliable and racy, depending on which thread acts on the socket first. Perhaps you should save the peer address in the same thread that closes it, so you can guarantee when it is open and when it is closed. Or use something else to synchronize the two threads and ensure the socket is always closed after getpeername() is called. BTW it looks like I have to remove George?s username from the nosy list because it contains a comma! ---------- nosy: +martin.panter -George,Y resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 21:37:37 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Oct 2016 01:37:37 +0000 Subject: [issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted In-Reply-To: <1421153299.35.0.701583632763.issue23231@psf.upfronthosting.co.za> Message-ID: <1476495457.0.0.776624159995.issue23231@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 21:41:52 2016 From: report at bugs.python.org (Siming Yuan) Date: Sat, 15 Oct 2016 01:41:52 +0000 Subject: [issue28442] tuple(a list subclass) does not iterate through the list In-Reply-To: <1476457296.79.0.655261011887.issue28442@psf.upfronthosting.co.za> Message-ID: <1476495712.66.0.172752316743.issue28442@psf.upfronthosting.co.za> Siming Yuan added the comment: my apologies, was in a rush to get it posted. attached a better version of the file. i can reproduce this in python 3.4.1 and python 2.7.8 (both 32 and 64 bit) on RHEL 6.6 however after verifying again - this doesn't seem to be an issue in 3.4.5 (did not verify earlier versions), so it is indeed already fixed. closing. time to upgrade! ---------- resolution: -> fixed status: open -> closed versions: +Python 3.4 -Python 3.5 Added file: http://bugs.python.org/file45096/weak_list.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 21:45:34 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Oct 2016 01:45:34 +0000 Subject: [issue27800] Regular expressions with multiple repeat codes In-Reply-To: <1471608420.14.0.872966965651.issue27800@psf.upfronthosting.co.za> Message-ID: <20161015014531.5225.64213.87C2509E@psf.io> Roundup Robot added the comment: New changeset 5f7d7e079e39 by Martin Panter in branch '3.5': Issue #27800: Document limitation and workaround for multiple RE repetitions https://hg.python.org/cpython/rev/5f7d7e079e39 New changeset 1f2ca7e4b64e by Martin Panter in branch '3.6': Issue #27800: Merge RE repetition doc from 3.5 into 3.6 https://hg.python.org/cpython/rev/1f2ca7e4b64e New changeset 98456ab88ab0 by Martin Panter in branch 'default': Issue #27800: Merge RE repetition doc from 3.6 https://hg.python.org/cpython/rev/98456ab88ab0 New changeset 94f02193f00f by Martin Panter in branch '2.7': Issue #27800: Document limitation and workaround for multiple RE repetitions https://hg.python.org/cpython/rev/94f02193f00f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 21:49:13 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 15 Oct 2016 01:49:13 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476496153.95.0.298219549159.issue28428@psf.upfronthosting.co.za> INADA Naoki added the comment: > There is also an argument that this should not be a built-in module but should be separate (like _ctypes). I don't know if that is just a Windows decision or not, but I'm guessing you weren't the one who made that decision originally. Issue for another time Since _overlapped is separated extension, I think _future should be too. I'll try it after fixing issue on windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 21:58:49 2016 From: report at bugs.python.org (Georgey) Date: Sat, 15 Oct 2016 01:58:49 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476496729.05.0.92191875347.issue28447@psf.upfronthosting.co.za> Georgey added the comment: I have changed my Username, thanks martin. " But it sounds like you may be closing the socket in one thread, and trying to use it in another thread" -- I do not attempt to "close" it in main thread. Main only detect the connection failure and report the socket object to the sub thread. sub thread tries to identify the socket object (retrieve the IP address) before closing it. The question is - once the TCP connection is broken (e.g. client's program get a crash), how can I get to know the original address of that connection? It seems like once someone(socket) dies, I am not allowed to know the name(address)! ---------- nosy: +GeorgeY resolution: not a bug -> remind _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 22:09:28 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 15 Oct 2016 02:09:28 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows Message-ID: <1476497368.18.0.628065389536.issue28448@psf.upfronthosting.co.za> New submission from INADA Naoki: _WaitCancelFuture in windows_events.py overrides _schedule_callbacks. C implemented Future should allow overriding _schedule_callbacks. Since `{"_future", PyInit__future},` is not in PC/config.c, _future is not registered as builtin module. So Python 3.6b2 doesn't use it. Instead of registering it, we should try make it split extension module (.pyd file). ---------- assignee: inada.naoki components: asyncio messages: 278685 nosy: gvanrossum, inada.naoki, yselivanov priority: normal severity: normal stage: needs patch status: open title: C implemented Future doesn't work on Windows type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 22:11:45 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 15 Oct 2016 02:11:45 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail In-Reply-To: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> Message-ID: <1476497505.98.0.442104578415.issue28430@psf.upfronthosting.co.za> INADA Naoki added the comment: Another test failure is reported. > I have setup a 3.6 build on Travis of our project GNS3 and it seem to fail. > https://travis-ci.org/GNS3/gns3-server/builds/167703118 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 22:22:20 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Oct 2016 02:22:20 +0000 Subject: [issue27844] Python-3.6a4 build messages to stderr (on AIX and xlc compiler) In-Reply-To: <1471971686.29.0.126107373304.issue27844@psf.upfronthosting.co.za> Message-ID: <1476498140.93.0.313103723105.issue27844@psf.upfronthosting.co.za> Martin Panter added the comment: The warnings about platform-dependent libraries should be suppressed now thanks to Issue 27713. The warnings from Modules/_ctypes/_ctypes_test.c about bitfields are covered by Issue 27643. Can you help with developing the patch? The remaning warnings all seem to be duplicates of Issue 28290. ---------- nosy: +martin.panter resolution: -> duplicate status: open -> closed superseder: -> BETA report: Python-3.6 build messages to stderr: AIX and "not GCC" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 22:38:51 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 15 Oct 2016 02:38:51 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476499131.37.0.613443034875.issue28428@psf.upfronthosting.co.za> INADA Naoki added the comment: Can I commit this patch without NEWS entry? Only notable change is module name, but I don't expect no one import it directly. If it is required, it would be like: - Issue #28428: Rename _futures module to _asyncio. It will have more speedup functions or classes other than asyncio.Future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 23:18:49 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Oct 2016 03:18:49 +0000 Subject: [issue28290] BETA report: Python-3.6 build messages to stderr: AIX and "not GCC" In-Reply-To: <1475001330.34.0.107474417097.issue28290@psf.upfronthosting.co.za> Message-ID: <1476501529.18.0.864797074485.issue28290@psf.upfronthosting.co.za> Martin Panter added the comment: For the blake problem, I guess the structures may either get laid out incorrectly, or you might be lucky and they will get the desired packing by default. You might have to find if XLC has another way to enable struct packing. Or in the worst case, rewrite the code to pack data in a portable manner without using a struct. The feature test macros like _POSIX_C_SOURCE are also discussed in various bug reports, including Issue 17120. How are you invoking /usr/include/standards.h? Perhaps there is a compiler mode or buggy header file that is getting in the way? Regarding the data and function pointer confusion, this is a tricky case. I understand standard C (C99 etc) does not require function pointers to be compatible with void pointers. However, POSIX might require partial compatibility, at least for casting the void pointer from dlsym() to a function pointer: . Does AIX actually have incompatible (e.g. different size) function and void pointers, or can we safely ignore those warnings? I think it may be annoying to change Python?s PyType_Slot and PyModuleDef_Slot structures to be compatible with function pointers, though perhaps it could be done with anonymous unions or something. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 23:24:45 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Oct 2016 03:24:45 +0000 Subject: [issue27800] Regular expressions with multiple repeat codes In-Reply-To: <1471608420.14.0.872966965651.issue27800@psf.upfronthosting.co.za> Message-ID: <1476501885.95.0.99625237829.issue27800@psf.upfronthosting.co.za> Martin Panter added the comment: I committed my patch as it was. I understand Silent Ghost?s objection was mainly that they thought the new paragraph or its positioning wouldn?t be very useful, but hopefully it is better than nothing. Perhaps in the future, the documentation could be restructured with subsections for repetition qualifiers and other kinds of special codes, which may help. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 23:46:10 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Oct 2016 03:46:10 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476503170.31.0.780175579109.issue28447@psf.upfronthosting.co.za> Martin Panter added the comment: This indicated to me that the socket object has indeed been closed _before_ you call getpeername(): ------------- print(sock)>>> sock.getpeername()>>> OS.Error[WinError10038]an operation was attempted on something that is not a socket ======= In this case, I think ?[closed] fd=-1? means that both the Python-level socket object, and all objects returned by socket.makefile(), have been closed, so the OS-level socket has probably been closed. In any case, getpeername() is probably trying the invalid file descriptor -1. If there are no copies of the OS-level socket open (e.g. in other processes), then the TCP connection is probably also shut down, but I suspect the problem is the socket object, not the TCP connection. Without code or something demonstrating the bug, I?m pretty sure it is a bug in your program, not in Python. ---------- resolution: remind -> not a bug stage: -> test needed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 23:47:07 2016 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 15 Oct 2016 03:47:07 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476499131.37.0.613443034875.issue28428@psf.upfronthosting.co.za> Message-ID: Yury Selivanov added the comment: No news entry is necessary for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 00:41:51 2016 From: report at bugs.python.org (Georgey) Date: Sat, 15 Oct 2016 04:41:51 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476506511.45.0.00922630928789.issue28447@psf.upfronthosting.co.za> Georgey added the comment: "Without code or something demonstrating the bug, I?m pretty sure it is a bug in your program" Here is the main Thread ----------------------- mailbox = queue.Queue() while True: #print(addr_groups) unknown_clients=[] for key in yellow_page.keys(): if yellow_page[key][0] ==None: unknown_clients.append(key) print("\n", name_groups) if len(unknown_clients) >0: print("unknown from?"+str(unknown_clients)) print(time.strftime(ISOTIMEFORMAT, time.localtime(time.time())) + '\n') # Get the list sockets which are ready to be read through select read_sockets, write_sockets, error_sockets = select.select(active_socks,[],[],TIMEOUT) for sock in read_sockets: #New connection if sock ==server_sock: # New Client coming in clisock, addr = server_sock.accept() ip = addr[0] if ip in IPALLOWED: active_socks.append(clisock) yellow_page[addr] = [None,None,clisock] else: clisock.close() #Some incoming message from a client else: # Data recieved from client, process it try: data = sock.recv(BUFSIZ) if data: fromwhere = sock.getpeername() mail_s = data.split(SEG_) del mail_s[0] for mail_ in mail_s: mail = mail_.decode() except: mailbox.put( (("sock_err",sock), 'localhost') ) continue ===================== so the sub thread's job is to analyze the exception put into "mailbox" Here is the run function of sub thread ----------------------------------- def run(self): while True: msg, addr = mailbox.get() if msg[0] =="sock_err": print("sock_err @ ", msg[1]) #<< remind status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 00:44:37 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 15 Oct 2016 04:44:37 +0000 Subject: [issue27825] Make the documentation for statistics' data argument clearer. In-Reply-To: <1471813007.76.0.49945343113.issue27825@psf.upfronthosting.co.za> Message-ID: <1476506677.42.0.2296845996.issue27825@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Updated patch based on feedback. Steven, I removed the example of median_grouped using Fractions. Would you be able to suggest better examples to be added in the docs? I also noticed that there are more examples of median_grouped in the paragraph below. Thanks. ---------- Added file: http://bugs.python.org/file45097/issue27825v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 02:19:49 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 06:19:49 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476512389.16.0.760576156446.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: Thank you for the response. I'm not too sure how to set the root directory for arm headers and libraries in the configure command line. So I've tried the below, but still not all of the extensions modules was not build (e.g math, socket, select) export CROSS_PATH=/home/benny/workspace/projects/webshield/src/dntl_ws/sw/toolchain/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/bin/../arm-linux-gnueabihf/libc CONFIG_SITE=config.site CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib READELF=arm-linux-gnueabihf-readelf CFLAGS="-I${CROSS_PATH}/usr/include" LDFLAGS="-L${CROSS_PATH}/usr/lib" CPPFLAGS="-I${CROSS_PATH}/usr/include" ./configure --enable-shared --host=arm-linux --build=x86_64-linux-gnu --disable-ipv6 --prefix=/opt/python3 Attached please find the build log ---------- Added file: http://bugs.python.org/file45098/python3.5.2_x86_host_arm_target.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 02:26:01 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 15 Oct 2016 06:26:01 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476512761.12.0.463345209006.issue28092@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Any different results with CFLAGS="-fno-gnu89-inline"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 02:29:52 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 06:29:52 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476512992.81.0.176126233129.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: Could you please tell me if the decision to make the extension modules like math, socket, select etc taken in the configure step or is it left to the Makefile. Also could you please give me some hints on where to look for on how this decision is made (e.g file name / function name.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 02:41:27 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Oct 2016 06:41:27 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <20161015064117.1356.76894.8FCAEABB@psf.io> Roundup Robot added the comment: New changeset 9d06fdedae2b by INADA Naoki in branch '3.6': Issue #28428: Rename _futures module to _asyncio. https://hg.python.org/cpython/rev/9d06fdedae2b New changeset c2f3b7c56dff by INADA Naoki in branch 'default': Issue #28428: Rename _futures module to _asyncio. (merge from 3.6) https://hg.python.org/cpython/rev/c2f3b7c56dff ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 02:43:44 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 15 Oct 2016 06:43:44 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476513824.06.0.0950973068291.issue28428@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 02:55:15 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Oct 2016 06:55:15 +0000 Subject: [issue28424] pkgutil.get_data() doesn't work with namespace packages In-Reply-To: <1476315360.41.0.557766587306.issue28424@psf.upfronthosting.co.za> Message-ID: <1476514515.95.0.137073552812.issue28424@psf.upfronthosting.co.za> Nick Coghlan added the comment: For 3.4/5/6, I agree this is a documentation issue, where the data files need to be given a *non*-namespaced directory to live in. However, it's worth explicitly noting that subpackages of namespace packages can themselves be regular packages, so one possible solution is to do: pkg_util.get_data('my_namespace.my_package_data', 'resourcename') rather than storing the data directly at the namespace level. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:17:18 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 15 Oct 2016 07:17:18 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476515838.35.0.537975148966.issue28444@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Wierd. Modules like 'math', 'select' or '_socket' are added unconditionally in detect_modules() of setup.py. Did you disable modules in Modules/Setup.local or Modules/Setup or via the global variable `disabled_module_list` in setup.py? ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:22:39 2016 From: report at bugs.python.org (Robin Becker) Date: Sat, 15 Oct 2016 07:22:39 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476516159.46.0.797191235872.issue28092@psf.upfronthosting.co.za> Robin Becker added the comment: I'm not able to access my work computer, I'll try later today at home. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:29:42 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 07:29:42 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476516582.6.0.990372526756.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: Thank you for your response. Please note that I haven't touched the Modules/Setup.local or Modules/Setup or the global variable `disabled_module_list` in setup.py However I'm noticing that the math is commented in the Modules/Setup on both cross compiling on x86_64 for ARM as well as natively compiling on x86_64 for x86_64. But on the native build for x86_64 the math, socket, select are all build properly. Attached please find the modules/setup file ---------- Added file: http://bugs.python.org/file45099/setup_x86_arm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:30:46 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 07:30:46 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476516646.07.0.19480377502.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: Attaching the modules/set-up for natively building on x86_64 ---------- Added file: http://bugs.python.org/file45100/setup_x86_x86 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:49:01 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Oct 2016 07:49:01 +0000 Subject: [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476517741.09.0.266317624806.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm not clear on what discrepancy you're referring to, as I get the same (expected) exception for both the class statement and the dynamic type creation: >>> class MyDerived(MyClass, metaclass=metaclass_callable): ... pass ... Traceback (most recent call last): File "", line 1, in File "", line 2, in metaclass_callable TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases >>> MyDerivedDynamic = new_class("MyDerivedDynamic", (MyClass,), dict(metaclass=metaclass_callable)) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.5/types.py", line 57, in new_class return meta(name, bases, ns, **kwds) File "", line 2, in metaclass_callable TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases This is due to the fact that your custom metaclass function returns an instance of a subclass of type, so we end up in type_new to actually create the type, which fails the metaclass consistency check. One of the subtle intricacies here is that, for class statements, the logic that corresponds to types.prepare_class in the Python implementation is actually in the __build_class__ builtin for the C implementation - when there's a custom metaclass that *doesn't* return a subclass of type, we don't end up running type_new at all. As a result of this, *both* implementations include a conditional check for a more derived metaclass in their namespace preparation logic, as well as an unconditional call to that metaclass derivation logic from type_new if the calculated metaclass is either type itself, or a subclass that calls up to super().__new__. Most relevant issues and commit history: - last update to C implementation - http://bugs.python.org/issue1294232 - https://hg.python.org/cpython/rev/c2a89b509be4 - addition of pure Python implementation - http://bugs.python.org/issue14588 - https://hg.python.org/cpython/rev/befd56673c80 The test cases in those commits (particularly the first one) should help make it clear what is and isn't supported behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:50:19 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Oct 2016 07:50:19 +0000 Subject: [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476517819.16.0.962514217286.issue28437@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:50:46 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 15 Oct 2016 07:50:46 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476517846.31.0.382152286435.issue28428@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- stage: commit review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:53:12 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Oct 2016 07:53:12 +0000 Subject: [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476517992.47.0.408249549224.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note: I'd be open to suggestions for comments in the pure Python implementation that would have helped you find its CPython counterpart in bltinmodule.c - it isn't immediately obvious from the current code that the actual __build_class__ code invoked by CPython's class statement is somewhere else entirely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 04:01:29 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Oct 2016 08:01:29 +0000 Subject: [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476518489.44.0.425203542437.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: (I'll also note that my final comment there is rather different from my first draft, as I almost forgot myself that the namespace preparation logic lives in __build_class__ rather than type_new. Class definitions can actually bypass type entirely, even in Python 3: >>> def the_one_class(*args): ... return 1 ... >>> class TheOne(metaclass=the_one_class): pass ... >>> TheOne 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 04:49:27 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 15 Oct 2016 08:49:27 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476521367.24.0.733050808204.issue28444@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Your Setup file matches the one distributed with Python 3.5.2. Did you get the Python source from https://www.python.org/ ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 04:56:29 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 15 Oct 2016 08:56:29 +0000 Subject: [issue26851] android compilation and link flags In-Reply-To: <1461673211.54.0.945034926098.issue26851@psf.upfronthosting.co.za> Message-ID: <1476521789.94.0.629026297298.issue26851@psf.upfronthosting.co.za> Xavier de Gaye added the comment: See also the clang cross compilation documentation at http://clang.llvm.org/docs/CrossCompilation.html. ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 05:00:44 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 09:00:44 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476522044.31.0.00382387790537.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: Thank you for the response. Yes I've downloaded the XZ compressed source from python.org Based on your comment I've double checked the MD5 with https://www.python.org/downloads/release/python-352/ benny at whachamacallit:~/Downloads$ md5sum Python-3.5.2.tar.xz 8906efbacfcdc7c3c9198aeefafd159e Python-3.5.2.tar.xz ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 05:04:31 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 09:04:31 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476522271.85.0.622197949751.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: please let me know if there is any additional steps I need to follow when building from the source downloaded from python.org ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 05:07:44 2016 From: report at bugs.python.org (Silver Fox) Date: Sat, 15 Oct 2016 09:07:44 +0000 Subject: [issue28449] tarfile.open(mode = 'r:*', ignore_zeros = True) has 50% chance failed to open compressed tars? Message-ID: <1476522464.39.0.172513688494.issue28449@psf.upfronthosting.co.za> New submission from Silver Fox: Seems all `tarfile.open` will try all compress method(including `raw`) in random order, and `ignore_zeros` also hide the error during detecting compress method. So `raw` is used if tested before the rigth compress method, which is wrong. But there is no warning that the 2 args can not be used together in docs. ---------- components: Library (Lib) messages: 278711 nosy: Silver Fox priority: normal severity: normal status: open title: tarfile.open(mode = 'r:*', ignore_zeros = True) has 50% chance failed to open compressed tars? type: behavior versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 05:26:21 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 15 Oct 2016 09:26:21 +0000 Subject: [issue26851] android compilation and link flags In-Reply-To: <1461673211.54.0.945034926098.issue26851@psf.upfronthosting.co.za> Message-ID: <1476523581.53.0.529574615135.issue26851@psf.upfronthosting.co.za> Xavier de Gaye added the comment: This new patch fixes the following: * Use BASECFLAGS instead of CCSHARED. * '-march=armv7-a' is not set in BASECFLAGS anymore as this is redundant: this option is already set in the configure command line or is implicitly set by the the first component of the triple of the '-target' clang option. * Do not set '-mthumb' as this is optional and may be set for the armv7 arch as well. Also this option crashes Python on armv5te when built with clang, issue 27606. ---------- Added file: http://bugs.python.org/file45101/build-flags_5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 05:51:33 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Oct 2016 09:51:33 +0000 Subject: [issue28449] tarfile.open(mode = 'r:*', ignore_zeros = True) has 50% chance failed to open compressed tars? In-Reply-To: <1476522464.39.0.172513688494.issue28449@psf.upfronthosting.co.za> Message-ID: <1476525093.17.0.528741739671.issue28449@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +lars.gustaebel versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 06:30:07 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 15 Oct 2016 10:30:07 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476527407.74.0.558406769842.issue28444@psf.upfronthosting.co.za> Xavier de Gaye added the comment: I assume from your logs that a native (not the cross-built one) python3.5 already exists and is on your PATH. What is the value of sys.builtin_module_names as given by this native python3.5 interpreter ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 06:41:15 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 10:41:15 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476528075.74.0.521694319939.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: Thank you for your response Yes. There is a python 3.5 that is installed on the system (from apt-get) benny at whachamacallit:~$ which python3 /usr/bin/python3 benny at whachamacallit:~$ python3 Python 3.5.2 (default, Sep 10 2016, 08:21:44) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> >>> >>> import sys >>> >>> sys.builtin_module_names ('_ast', '_bisect', '_codecs', '_collections', '_datetime', '_elementtree', '_functools', '_heapq', '_imp', '_io', '_locale', '_md5', '_operator', '_pickle', '_posixsubprocess', '_random', '_sha1', '_sha256', '_sha512', '_signal', '_socket', '_sre', '_stat', '_string', '_struct', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'array', 'atexit', 'binascii', 'builtins', 'errno', 'faulthandler', 'fcntl', 'gc', 'grp', 'itertools', 'marshal', 'math', 'posix', 'pwd', 'pyexpat', 'select', 'spwd', 'sys', 'syslog', 'time', 'unicodedata', 'xxsubtype', 'zipimport', 'zlib') >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 06:43:15 2016 From: report at bugs.python.org (Robin Becker) Date: Sat, 15 Oct 2016 10:43:15 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476528195.26.0.358437221706.issue28092@psf.upfronthosting.co.za> Robin Becker added the comment: benjamin.peterson: I tried adding that option -fno-gnu89-inline conditionally for the 3.6.0b2 build, but it goes wrong in config with an error configure:3913: $? = 4 configure:3933: checking whether the C compiler works configure:3955: gcc -Wformat -fno-gnu89-inline conftest.c >&5 cc1: error: -fno-gnu89-inline is only supported in GNU99 or C99 mode The full docker output is here https://www.reportlab.com/media/manylinux-docker-run-output-2.txt ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 07:00:13 2016 From: report at bugs.python.org (Lele Gaifax) Date: Sat, 15 Oct 2016 11:00:13 +0000 Subject: [issue28450] Misleading/inaccurate documentation about unknown escape sequences Message-ID: <1476529213.17.0.132534478532.issue28450@psf.upfronthosting.co.za> New submission from Lele Gaifax: Python 3.6+ is stricter about escaped sequences in string literals. The documentation need some improvement to clarify the change: for example https://docs.python.org/3.6/library/re.html#re.sub first says that ?Unknown escapes such as \& are left alone? then, in the ?Changed in? section below, states that ?[in Py3.6] Unknown escapes consisting of '\' and an ASCII letter now are errors?. When such changes are made, usually the documentation reports the ?new?/?current? behaviour, and the history section mention when and how some detail changed. See this thread for details: https://mail.python.org/pipermail/python-list/2016-October/715462.html ---------- assignee: docs at python components: Documentation messages: 278716 nosy: docs at python, lelit priority: normal severity: normal status: open title: Misleading/inaccurate documentation about unknown escape sequences versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 07:13:36 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 15 Oct 2016 11:13:36 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476530016.5.0.365835629264.issue28444@psf.upfronthosting.co.za> Xavier de Gaye added the comment: So the problem is that setup.py in build_extensions() does not build the extensions that have been already built statically into the native Ubuntu interpreter. The solution is to build first natively from source python3.5 and set the PATH environment variable so that the newly built interpreter is fisrt on the PATH, before the one distributed by Ubuntu. And then to run the cross-build. I think that should be the standard procedure for cross-compilation: * Configure the python source, for example update Modules/Setup. * Build python natively out of the source tree [1]. * Set the new interpreter first on the PATH. * Cross-build python out of the same source tree, in another directory. Unless someone has a better idea to fix this problem, I will propose a patch so that extension modules that are removed by build_extensions(), are not removed anymore silently. [1] Out of the source tree: For example, assuming the source tree is at 'src' and the current working directory is its parent, to build python in the 'build' directory without modifying any file in the 'src' directory: $ mkdir build $ cd build $ $(cd ../src && pwd)/configure arg1 arg2 ... && make ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 07:15:42 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 15 Oct 2016 11:15:42 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476530142.36.0.278383077274.issue28444@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 07:50:43 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 11:50:43 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476532243.84.0.318293976944.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: To eliminate the issues introduced by the native python on the Ubuntu 16.04 host, I've set up a new Ubuntu Host with all the native python packages removed. But now when I try to build the make fails saying: arm-linux-gnueabihf-gcc -shared -L/home/ubuntu/workspace/toolchain/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/bin/../arm-linux-gnueabihf/libc/usr/lib -Wl,--no-as-needed -o libpython3.so -Wl,-hlibpython3.so libpython3.5m.so arm-linux-gnueabihf-gcc -L/home/ubuntu/workspace/toolchain/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/bin/../arm-linux-gnueabihf/libc/usr/lib -Xlinker -export-dynamic -o python Programs/python.o -L. -lpython3.5m -lpthread -ldl -lpthread -lutil -lm _PYTHON_PROJECT_BASE=/home/ubuntu/workspace/python/Python-3.5.2 _PYTHON_HOST_PLATFORM=linux-arm PYTHONPATH=./Lib:./Lib/plat-linux python -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi /bin/sh: 1: python: not found generate-posix-vars failed Makefile:598: recipe for target 'pybuilddir.txt' failed make: *** [pybuilddir.txt] Error 1 Looking at the configure.log it complains of missing python as well: python: not-found! cannot run $(srcdir)/Parser/asdl_c.py Could you please comment if it is not possible to build python3 without first installing a native python on the build machine? Maybe I have not set all the options to the ./configure correctly (e.g _PYTHON_HOST_PLATFORM). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 07:56:09 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 11:56:09 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476532569.36.0.437722527161.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: @Xavier de Gaye : Thanks a lot for helping. Unfortunately I didn't notice your last post (Date: 2016-10-15 11:13). Kindly ignore my last quires on the native Python. I'll follow your steps and report back the results asap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 08:01:12 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 15 Oct 2016 12:01:12 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476532872.41.0.709018655296.issue28444@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The cross-build uses a native python to run setup.py to build the extension modules, and to run 'python -S -m sysconfig --generate-posix-vars' and to byte compile the modules from the standard library. So you do need a native python. That is why you should first build it natively, set the PATH so that the cross-build can find it and use it, and then run the cross-build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 08:09:39 2016 From: report at bugs.python.org (Robin Becker) Date: Sat, 15 Oct 2016 12:09:39 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476533379.62.0.223420818497.issue28092@psf.upfronthosting.co.za> Robin Becker added the comment: After some searching I tried adding -std=gnu99 and the config goes through OK, but running make produces [root at d3cce9786c2e Python-3.6.0b2]# make -j2 gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wformat -fno-gnu89-inline -std=gnu99 -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wformat -fno-gnu89-inline -std=gnu99 -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -DPy_BUILD_CORE -o Parser/acceler.o Parser/acceler.c /tmp/cc3Mfloe.s: Assembler messages: /tmp/cc3Mfloe.s:1575: Error: symbol `stat64' is already defined /tmp/cc3Mfloe.s:1595: Error: symbol `lstat64' is already defined /tmp/cc3Mfloe.s:1615: Error: symbol `fstat64' is already defined /tmp/cc3Mfloe.s:1635: Error: symbol `fstatat64' is already defined make: *** [Programs/python.o] Error 1 make: *** Waiting for unfinished jobs.... /tmp/ccOoXPte.s: Assembler messages: /tmp/ccOoXPte.s:1575: Error: symbol `stat64' is already defined /tmp/ccOoXPte.s:1595: Error: symbol `lstat64' is already defined /tmp/ccOoXPte.s:1615: Error: symbol `fstat64' is already defined /tmp/ccOoXPte.s:1635: Error: symbol `fstatat64' is already defined make: *** [Parser/acceler.o] Error 1 [root at d3cce9786c2e Python-3.6.0b2]# ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 08:41:02 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 12:41:02 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476535262.82.0.607951112403.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: Thank you for the support and the detailed explanation on why the native python is necessary. I'm now able to successfully compile all the extension modules on an Ubuntu Machine where there isn't any Python packages installed. I'll go ahead and compile the python on the default Ubuntu 16.04 which has both python3 and python2.7. I'll update this thread with my results. The below steps has been followed: ----------------------------------------------------------- Building Python 3.5.2 natively for x86_64 HOST ----------------------------------------------------------- ./configure --enable-shared --disable-ipv6 --prefix=/opt/python3 make sudo make install export PATH=/opt/python3/bin:$PATH #this is a work around for the missing library error, needs to find a better solution sudo ln -sf /opt/python3/lib/libpython3.5m.so.1.0 /usr/lib/libpython3.5m.so.1.0 sudo ldconfig ----------------------------------------------------------- #Cros-compiling for ARM ----------------------------------------------------------- make distclean CONFIG_SITE=config.site CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib READELF=arm-linux-gnueabihf-readelf CFLAGS="-I${CROSS_PATH}/usr/include" LDFLAGS="-L${CROSS_PATH}/usr/lib" CPPFLAGS="-I${CROSS_PATH}/usr/include" ./configure --enable-shared --host=arm-linux --build=x86_64-linux-gnu --disable-ipv6 --prefix=/opt/arm-linux-gnueabihf-python make sudo PATH=/opt/python3/bin:$PATH make install It would be quite helpful if the extension modules are not removed silently. Unfortunately I do not have the know-how how to do this but would like to test it once someone makes available. Once again thanks a lot for the support all through out the day. I'll revert back with the results of my testing in a while. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 08:53:18 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 15 Oct 2016 12:53:18 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1446844426.01.0.118649403374.issue25571@psf.upfronthosting.co.za> Message-ID: <1476535998.34.0.506726946106.issue25571@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have to update my patch to python-3.7, I will provide a patch asap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 08:54:08 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 15 Oct 2016 12:54:08 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1476536048.88.0.963372113313.issue24658@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Ned Deily, I added you because you are in the expert for the OSX platform. ---------- assignee: -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 09:18:25 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 15 Oct 2016 13:18:25 +0000 Subject: [issue28442] tuple(a list subclass) does not iterate through the list In-Reply-To: <1476457296.79.0.655261011887.issue28442@psf.upfronthosting.co.za> Message-ID: <1476537505.02.0.308618165319.issue28442@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: fixed -> out of date stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 09:26:53 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 15 Oct 2016 13:26:53 +0000 Subject: [issue28428] Rename _futures module to _asyncio In-Reply-To: <1476357636.44.0.0358682428138.issue28428@psf.upfronthosting.co.za> Message-ID: <1476538013.13.0.0331992437883.issue28428@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 11:20:35 2016 From: report at bugs.python.org (Benny K J) Date: Sat, 15 Oct 2016 15:20:35 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476544835.55.0.229821669569.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: I've confirmed that the suggested steps works fine on Ubuntu 14.04 as well as 16.04 versions standard procedure for cross-compilation: * Configure the python source, for example update Modules/Setup. * Build python natively out of the source tree [1]. * Set the new interpreter first on the PATH. * Cross-build python out of the same source tree, in another directory. Thanks a lot for the support. Could you please comment if we could add these instructions to the README file under the Build Instructions. I'll make a a small patch for updating the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 12:14:10 2016 From: report at bugs.python.org (Joon-Kyu Park) Date: Sat, 15 Oct 2016 16:14:10 +0000 Subject: [issue28451] pydoc.safeimport() raises ErrorDuringImport() if __builtin__.__import__ is monkey patched Message-ID: <1476548049.89.0.842528131727.issue28451@psf.upfronthosting.co.za> New submission from Joon-Kyu Park: `pydoc.safeimport()` should return `None` if the module isn't found. If Python's default `__import__` is monkey patched, (e.g., by using gevent) the function misbehaves. According to the current implementation, the function returns `None` by checking the only last entry of the traceback if `ImportError` is thrown during calling `__import__()`. If `__import__` is monkey patched, extra entries can be mixed into the original traceback when `ImportError` is raised. In the case when the module is not found, `ErrorDuringImport` is being raised rather than returning `None` after failing checking the traceback because current implementation only checks the last traceback entry. The important thing is to check whether `ImportError` is raised inside `safeimport()`, I think it's okay to check the whole traceback entries instead of checking the only last item. Please check the attached patch which I suggest. Thank you. ---------- components: Library (Lib) files: pydoc.patch keywords: patch messages: 278726 nosy: Joon-Kyu Park priority: normal severity: normal status: open title: pydoc.safeimport() raises ErrorDuringImport() if __builtin__.__import__ is monkey patched type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file45102/pydoc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 13:49:51 2016 From: report at bugs.python.org (Neil Girdhar) Date: Sat, 15 Oct 2016 17:49:51 +0000 Subject: [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476553791.06.0.388958262018.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: The documentation suggests that you can have a metaclass that does is not the "most derived metaclass" provided you specify one that is not an instance of type. This doesn't work in CPython, so I would suggest fixing the documentation using the text I provided. After that, it should be clear that there's no reason for "if isinstance(meta, type):" in the code, and the Python code should be restructured. The point is that these two functions drifted apart somewhere around Python 3, and they need to be brought back together. I only discovered this because it was possible in Python 2 to have a non-type metaclass that is not the most derived metaclass. That has disappeared in CPython 3, except from the documentation and Lib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 13:52:56 2016 From: report at bugs.python.org (Neil Girdhar) Date: Sat, 15 Oct 2016 17:52:56 +0000 Subject: [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476553976.83.0.816177933831.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: >From your comment: >>> MyDerivedDynamic = new_class("MyDerivedDynamic", (MyClass,), dict(metaclass=metaclass_callable)) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.5/types.py", line 57, in new_class return meta(name, bases, ns, **kwds) File "", line 2, in metaclass_callable TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases This is in the wrong place. It should be tripping the exception you defined in Lib/types.py. (It will do that if you replace metaclass_callable with OtherMetaclass.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 13:56:05 2016 From: report at bugs.python.org (Neil Girdhar) Date: Sat, 15 Oct 2016 17:56:05 +0000 Subject: [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476554165.54.0.318433844064.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: "As a result of this, *both* implementations include a conditional check for a more derived metaclass in their namespace preparation logic, as well as an unconditional call to that metaclass derivation logic from type_new if the calculated metaclass is either type itself, or a subclass that calls up to super().__new__." I don't see why that's necessary. Either you should have the check in one place, or else have two equivalent checks. Right now, the Python library is confusingly checking a subset of cases (when isinstance(meta, type)). I suggest that you have the Python library check the entire set of cases so that the raised exception shows up in the right place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 15:19:47 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 15 Oct 2016 19:19:47 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476559187.61.0.787871700948.issue28444@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The attached patch fixes the problem and allows cross-building the extension modules independently of the configuration of the native interpreter that may have set some modules to be statically built. The patch also prints now the list of modules that are detected by setup.py and configured in one of the Setup files to be statically built into the interpreter. So you don't need to build from scratch a native interpreter anymore. Can you please test the patch using the Ubuntu interpreter for the cross-build and check that the extension modules are correctly built now. It's my turn to thank you for your reports and your tests and reactivity that are very helpful in fixing this problem :) ---------- keywords: +patch Added file: http://bugs.python.org/file45103/removed_modules.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 16:13:30 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 15 Oct 2016 20:13:30 +0000 Subject: [issue28452] Remove _asyncio._init_module function Message-ID: <1476562410.69.0.507034204748.issue28452@psf.upfronthosting.co.za> New submission from INADA Naoki: _asyncio._init_module() looks ugly. This patch imports external dependency when importing _asyncio. ---------- components: asyncio files: asyncio-speedup-refactoring.patch keywords: patch messages: 278731 nosy: gvanrossum, inada.naoki, yselivanov priority: normal severity: normal stage: patch review status: open title: Remove _asyncio._init_module function type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45104/asyncio-speedup-refactoring.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 17:04:16 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Oct 2016 21:04:16 +0000 Subject: [issue28143] ASDL compatibility with Python 3 system interpreter In-Reply-To: <1473843180.28.0.653391200015.issue28143@psf.upfronthosting.co.za> Message-ID: <1476565456.94.0.759780066567.issue28143@psf.upfronthosting.co.za> Martin Panter added the comment: Are you sure about adding the space after tab? I am no Python 2 expert, but I don?t see it: $ python2 -c 'print "\t", ""' | cat -A ^I$ Anyway, I?m not happy applying this patch unless it is clear that raising the Python version required to rebuild ASDL stuff is okay in the 2.7 branch. Maybe a query to the python-dev mail list might help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 17:21:23 2016 From: report at bugs.python.org (Malthe Borch) Date: Sat, 15 Oct 2016 21:21:23 +0000 Subject: [issue28143] ASDL compatibility with Python 3 system interpreter In-Reply-To: <1473843180.28.0.653391200015.issue28143@psf.upfronthosting.co.za> Message-ID: <1476566483.04.0.0134413373716.issue28143@psf.upfronthosting.co.za> Malthe Borch added the comment: You're right. The trailing comma just suppresses the newline. I updated the patch. ---------- Added file: http://bugs.python.org/file45105/0001-Allow-make-to-be-run-under-Python-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 17:23:35 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Oct 2016 21:23:35 +0000 Subject: [issue28143] ASDL compatibility with Python 3 system interpreter In-Reply-To: <1473843180.28.0.653391200015.issue28143@psf.upfronthosting.co.za> Message-ID: <1476566615.64.0.213370498878.issue28143@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: print in Python 2 doesn't add a space after whitespace characters except a space ('\t', '\n', '\r', etc). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 17:41:29 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Oct 2016 21:41:29 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476567689.8.0.9024763026.issue28447@psf.upfronthosting.co.za> Martin Panter added the comment: I still think something is closing your socket object. I cannot see what it is from the code you posted though. If you update the print() call, I expect you will see that it is closed, and the file descriptor is set to -1: print("sock_err @ ", msg[1], msg[1]._closed, msg[1].fileno()) # Expect True, -1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 17:43:41 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Sat, 15 Oct 2016 21:43:41 +0000 Subject: [issue28441] sys.executable is ambiguous on Cygwin without .exe suffix In-Reply-To: <1476452085.73.0.180033377767.issue28441@psf.upfronthosting.co.za> Message-ID: <1476567821.09.0.254744389529.issue28441@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: This patch has impact to end user, thus I don't agree to apply as far as Cygwin to avoid user surprise. I think to need a consistency between other platforms having executable suffix (e.g. MSYS2), and also the patch needs short documentation of changing behavior to description for sys.executable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 19:30:19 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Oct 2016 23:30:19 +0000 Subject: [issue27815] Make SSL suppress_ragged_eofs default more secure In-Reply-To: <1471699151.03.0.676654185488.issue27815@psf.upfronthosting.co.za> Message-ID: <1476574219.76.0.813969768472.issue27815@psf.upfronthosting.co.za> Martin Panter added the comment: Patch v2 also adds a new attribute to context objects. With this I can work around my Google server bug: context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH) context.suppress_ragged_eofs = True handler = urllib.request.HTTPSHandler(context=context) urlopen = urllib.request.build_opener(handler).open urlopen(Request(url="https://accounts.google.com/o/oauth2/token", ...)) ---------- Added file: http://bugs.python.org/file45106/ragged-eofs.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 19:43:46 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 15 Oct 2016 23:43:46 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1476575026.55.0.10870549308.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: Sorry for taking so long to come up with a patch.. ------------ proposed changes ------------ 1. in Python/getargs.c in seterror, the following patches: - add a parameter 'p_format_code' - a pointer to the format code whose conversion failed. - replace the error message of the OverflowError with '{fname}() argument out of range' in case all of the following are true: * PyErr_Occurred() and the exception is an OverflowError. * The PyArg_* function received a format ending with a ':' (i.e. seterror's fname argument is not NULL). * The error occurred during a conversion to a C integer type which might overflow, i.e. one of the format codes 'bhilLn'. With these patches, inconsistent messages could often be fixed by merely appending ':' to the format argument in a call to a PyArg_* function. Furthermore, Some inconsistent messages are actually fixed by these patches alone. That is because there are already many calls to PyArg_* functions with a format ending with ':'. Some of them are followed by more checks of the parsed arguments, which might result in raising an OverflowError/ValueError with an inconsistent error message. (e.g. in Modules/itertoolsmodule.c, product_new already calls PyArg_ParseTupleAndKeywords with the format "|n:product", so with these patches, in case we do 'itertools.product('a', repeat=1 << 1000)', the error message would be 'product() argument out of range'). Also, ISTM this patch is helpful, regardless of this issue (#15988). In case a PyArg_* function raises an OverflowError (because a conversion to some C integer type failed), knowing which function called the PyArg_* function would probably prove more helpful to a user (than knowing which C type Python failed to convert to, and whether the conversion failed because the number to convert was too large or too small). I decided to put the patch inside seterror, because (aside from its name,) it is always called after a failure of convertitem (which is the only caller of convertsimple). 2. in various files: - change some OverflowError/ValueError messages for more clarity, e.g. replace 'unsigned byte integer is greater than maximum' with 'Python int too large to convert to C unsigned char'. - add code to "catch" OverflowError/ValueError errors, to prevent raising inconsistent error messages - append ':' to formats passed to PyArg_* functions, to utilize the first proposed change (to automatically "catch" OverflowError/ValueError errors). 3. in Lib/tests - I was already writing tests for my patches, so I guessed I should add some of them (the basic boundary checks) to Lib/tests (in case they didn't already exist). I ran into some issues here: - test_pickle - I didn't manage to create an int large enough to test my patch for save_long in Modules/_pickle.c (and so I didn't add any test to test_pickle). - test_stat - I didn't find a way to determine the size of mode_t on the current platform, except for Windows (so the test I added is incomprehensive). 4. in Objects/longobject.c, make some messages more helpful (as mentioned in the last message I posted here). ------------ diff ------------ The proposed patches diff file is attached. ------------ tests ------------ I wrote an ugly script to test my patches, and ran it on my Windows 10 and Ubuntu 16.04 64-bit VM. The script is attached, but it might fail on another platform. - Note that the script I wrote has (among others) a test for 'select.devpoll'. I couldn't run it, as I don't have a Solaris machine, but the test is identical to that of 'select.poll', so it should run smoothly on a Solaris machine. Theoretically. (Each test in my script verifies the exception's error message, and not only which exception was raised, so ISTM these kind of tests don't fit in Lib/tests. Please let me know if you think otherwise.) In addition, I ran 'python_d.exe -m test -j0' (on my 64-bit Windows 10 and Ubuntu VM) with and without the patches, and got quite the same output. (That also means my new tests in various files in Lib/tests have passed.) ############################################################################## Note that the inconsistent messages my patches fix are only those I found while going over each 'PyExc_OverflowError' in the codebase (in *.h and *.c files). However, I would probably find another bunch of inconsistent messages when I go over each 'PyExc_ValueError' in the codebase. I would be happy to do that, but I am afraid I won't have time to (at least) until next June. ---------- keywords: +patch Added file: http://bugs.python.org/file45107/issue15988_ver1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 19:44:37 2016 From: report at bugs.python.org (Oren Milman) Date: Sat, 15 Oct 2016 23:44:37 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1476575077.31.0.956187144069.issue15988@psf.upfronthosting.co.za> Changes by Oren Milman : Added file: http://bugs.python.org/file45108/testPatches.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 20:36:44 2016 From: report at bugs.python.org (Ethan Smith) Date: Sun, 16 Oct 2016 00:36:44 +0000 Subject: [issue26865] Meta-issue: support of the android platform In-Reply-To: <1461685011.99.0.617135447086.issue26865@psf.upfronthosting.co.za> Message-ID: <1476578204.59.0.494597242885.issue26865@psf.upfronthosting.co.za> Changes by Ethan Smith : ---------- nosy: +Ethan Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 23:49:51 2016 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Sun, 16 Oct 2016 03:49:51 +0000 Subject: [issue28453] SSLObject.selected_alpn_protocol() not documented Message-ID: <1476589791.51.0.926571047111.issue28453@psf.upfronthosting.co.za> New submission from Alex Gr?nholm: the ssl.SSLObject class supports selected_alpn_protocol() like ssl.SSLSocket, but it is not mentioned on the list of supported methods. ---------- assignee: christian.heimes components: SSL messages: 278739 nosy: alex.gronholm, christian.heimes priority: normal severity: normal status: open title: SSLObject.selected_alpn_protocol() not documented versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 00:18:15 2016 From: report at bugs.python.org (Benny K J) Date: Sun, 16 Oct 2016 04:18:15 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476591495.14.0.66793241809.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: Thank you for the response and really appreciate the quick patch. The "removed_modules.patch" applied cleanly on the Python sources downloaded from: https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz and worked SUCCESSFULLY on HOST: Ubuntu 16.04 LTS Linux ip-172-31-16-99 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux for CROSS COMPILING Python 3.5.2 for ARM (armhf) using Toolchain: gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf attached please find the logs. I'll now go ahead and try it on the 3.6 sources and update this thread ---------- Added file: http://bugs.python.org/file45109/python_3_5_2_remove_modules.build.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 00:19:21 2016 From: report at bugs.python.org (Benny K J) Date: Sun, 16 Oct 2016 04:19:21 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476591561.21.0.334176525243.issue28444@psf.upfronthosting.co.za> Changes by Benny K J : Added file: http://bugs.python.org/file45110/python_3_5_2_remove_modules.config.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 01:27:25 2016 From: report at bugs.python.org (Benny K J) Date: Sun, 16 Oct 2016 05:27:25 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476595645.53.0.499697696251.issue28444@psf.upfronthosting.co.za> Benny K J added the comment: The "removed_modules.patch" applied cleanly on the Python 3.6.0b2 sources downloaded from: https://www.python.org/ftp/python/3.6.0/Python-3.6.0b2.tar.xz and worked SUCCESSFULLY The environment is the same as in my last post Attached please find the build logs and the config logs. Please let me know if there is any further tests that you would like me to perform. Thank you ---------- Added file: http://bugs.python.org/file45111/python_3_6_0b2_remove_modules.build.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 01:28:42 2016 From: report at bugs.python.org (Benny K J) Date: Sun, 16 Oct 2016 05:28:42 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476595722.65.0.920220899459.issue28444@psf.upfronthosting.co.za> Changes by Benny K J : Added file: http://bugs.python.org/file45112/python_3_6_0b2_remove_modules.config.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 02:08:34 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 06:08:34 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1476598114.55.0.404455372527.issue15988@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Oren. I'll make a detailed review in next few days. ---------- stage: needs patch -> patch review versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:04:33 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 16 Oct 2016 07:04:33 +0000 Subject: [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476601473.07.0.598731213956.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: Why should it trip the PEP 3115 namespace preparation exception? We only check for __prepare__ (and hence need to do an early most-derived metaclass resolution) on instances of "type", not on arbitrary callables used as a metaclass hint The checks are different in the two places because the rules are different in the two places. (One case that *can* be made is that we should be throwing different exceptions or chaining them to show which metaclass resolution failed, rather than re-using the same message in both places). This means that when you define a non-type metaclass hint, you're bypassing *all* of the PEP 3115 machinery, including the early metaclass resolution. However, if your metaclass hint still creates a type instance, you're not bypassing tp_new. If you're asking "Where is the bug in the presented example code?", it's here, in the definition of your metaclass hint: def metaclass_callable(name, bases, namespace): return OtherMetaclass(name, bases, namespace) Instantiating instances of "type" directly in Python 3 bypasses the PEP 3115 machinery - that's the entire reason that types.new_class was added. So if you want that metaclass hint to be PEP 3115 compliant, you need to explicitly write it that way: def metaclass_callable(name, bases, namespace): return types.new_class(name, bases, dict(metaclass=OtherMetaclass) ---------- resolution: not a bug -> stage: resolved -> status: closed -> open title: Class definition is not consistent with types.new_class -> Documentation for handling of non-type metaclass hints is unclear _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:22:48 2016 From: report at bugs.python.org (Neil Girdhar) Date: Sun, 16 Oct 2016 07:22:48 +0000 Subject: [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476602568.15.0.740217518653.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: Thanks for taking the time to explain, but it's still not working for me: from types import new_class class MyMetaclass(type): pass class OtherMetaclass(type): pass def metaclass_callable(name, bases, namespace): return new_class(name, bases, dict(metaclass=OtherMetaclass)) class MyClass(metaclass=MyMetaclass): pass try: class MyDerived(MyClass, metaclass=metaclass_callable): pass except: print("Gotcha!") try: MyDerived = new_class("MyDerived", (MyClass,), dict(metaclass=metaclass_callable)) except: print("Gotcha again!") So my questions are: 1. Why shouldn't Lib/types:new_class behave in exactly the same way as declaring a class using "class?" notation? 2. What's the point of checking if the metaclass is an instance of type? It seems to me that in Python 2, non-type metaclasses did not have to be the "most derived class" (that's what the documentation seems to suggest with the second rule). However, we no longer accept that in CPython 3 ??neither in the Lib/types, nor in a regular declaration. In fact, the exception is: "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); So why not just check that unconditionally in Lib/types.py? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:37:12 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 16 Oct 2016 07:37:12 +0000 Subject: [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476603432.33.0.261832836777.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: Because they're checking for different things: - types.prepare_class is only checking "How do I call __prepare__?". It only triggers type resolution at that point if the metaclass hint is an instance of type, otherwise it skips that process entirely and queries the metaclass hint directly. - type.__new__ is checking "Can I actually create a new instance of this metaclass with these bases?". It can only do that if either the metaclass being instantiated is a subclass of all the bases of the type being defined, or else such a metaclass exists amongst the bases. To be clear, your example isn't failing due to the way MyDerived is defined - it's failing because OtherMetaclass is itself an instance of type, and you're declaring it (directly or indirectly) as the metaclass of MyDerived, while inheriting from MyClass, which is an instance of MyMetaclass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:40:37 2016 From: report at bugs.python.org (Neil Girdhar) Date: Sun, 16 Oct 2016 07:40:37 +0000 Subject: [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476603637.87.0.528236304614.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: Okay, I understand what you're saying, but I it says in the documentation that "if an explicit metaclass is given and it is not an instance of type(), then it is used directly as the metaclass". My recent updated "metaclass_callable" is not an instance of type. Why should it raise an exception? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:45:35 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 16 Oct 2016 07:45:35 +0000 Subject: [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476603935.75.0.438679158092.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: Oops, couple of typos: "... only triggers metaclass resolution at that point ..." "... if either the metaclass being instantiated is a subclass of all the metaclasses of all of the bases ..." But the only way to bypass the "most derived metaclass" rule is for the the metaclass hint to be a callable that creates something that *isn't* a subclass of type. If you look at the tracebacks you're getting, you should see that the failure *isn't* in the class statement or the outer dynamic type, it's in "metaclass_callable", where the *inner* dynamic type creation is failing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:49:51 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 16 Oct 2016 07:49:51 +0000 Subject: [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476604191.94.0.290809803734.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: The "used directly as the metaclass" is a reference to https://docs.python.org/3/reference/datamodel.html#creating-the-class-object further down, and specifically the "metaclass(name, bases, namespace, **kwds)" call. It's not saying Python has a way to bypass that instantiation process. As a result, your code is consistently getting to that step just fine, but *that call* is throwing an exception. Hence my comment earlier that there's a case to be made that we should be better indicating where we were in the type creation process when the metaclass resolution failed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:04:14 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:04:14 +0000 Subject: [issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions In-Reply-To: <1476529213.17.0.132534478532.issue28450@psf.upfronthosting.co.za> Message-ID: <1476605054.96.0.78187728881.issue28450@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report Lele. Agreed, the documentation looks misleading. Do you want to provide more clear wording? ---------- nosy: +Rosuav, mrabarnett, nedbat, serhiy.storchaka stage: -> needs patch title: Misleading/inaccurate documentation about unknown escape sequences -> Misleading/inaccurate documentation about unknown escape sequences in regular expressions type: -> enhancement versions: +Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:09:34 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:09:34 +0000 Subject: [issue27471] sre_constants.error: bad escape \d In-Reply-To: <1468015027.73.0.234433787808.issue27471@psf.upfronthosting.co.za> Message-ID: <1476605374.55.0.553064737911.issue27471@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: All behaves as purposed. But the documentation is not accurate, and even misleading. It should be enhanced (issue28450). ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:12:09 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:12:09 +0000 Subject: [issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions In-Reply-To: <1476529213.17.0.132534478532.issue28450@psf.upfronthosting.co.za> Message-ID: <1476605529.43.0.673475630422.issue28450@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Regular Expressions nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:12:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:12:20 +0000 Subject: [issue24896] It is undocumented that re.UNICODE affects re.IGNORECASE In-Reply-To: <1439987891.31.0.547960058443.issue24896@psf.upfronthosting.co.za> Message-ID: <1476605540.36.0.614947749255.issue24896@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:19:33 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 16 Oct 2016 08:19:33 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476605973.13.0.384225388103.issue28444@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Thanks for the reports. The next step is having the patch reviewed by one of the Python build machinery experts. Nosying Martin, Zachary and Matthias. ---------- nosy: +doko, martin.panter, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:25:41 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:25:41 +0000 Subject: [issue25550] RecursionError in re with '(' * 500 In-Reply-To: <1446627776.2.0.048563717292.issue25550@psf.upfronthosting.co.za> Message-ID: <1476606341.33.0.414959015384.issue25550@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Closed as not a bug. Unlike to issue401612 this is not an infinite recursion. Raising RecursionError depends on the context (it is more likely in deeply nested call) and there is a common workaround -- just increase maximum recursion depth using sys.setrecursionlimit(). There is nothing specific to regular expressions. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:35:54 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:35:54 +0000 Subject: [issue25953] re fails to identify invalid numeric group references in replacement strings In-Reply-To: <1451072808.1.0.287523380704.issue25953@psf.upfronthosting.co.za> Message-ID: <1476606954.28.0.367380130255.issue25953@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:52:58 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:52:58 +0000 Subject: [issue22949] fnmatch.translate doesn't add ^ at the beginning In-Reply-To: <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za> Message-ID: <1476607978.34.0.430034480421.issue22949@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since issue22493 fnmatch.translate() uses scoped modifiers: r'(?s:%s)\Z' % res. Here is a patch that updates the documentation for fnmatch.translate(). ---------- stage: needs patch -> patch review versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:54:37 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:54:37 +0000 Subject: [issue23692] Undocumented feature prevents re module from finding certain matches In-Reply-To: <1426618184.57.0.811463464384.issue23692@psf.upfronthosting.co.za> Message-ID: <1476608077.77.0.944390862708.issue23692@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 05:02:54 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 09:02:54 +0000 Subject: [issue16007] Improved Error message for failing re expressions In-Reply-To: <1348416868.74.0.37879499143.issue16007@psf.upfronthosting.co.za> Message-ID: <1476608574.86.0.242857942225.issue16007@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since 3.5 (issue22578) the re.error exception has attributes that contain a pattern and the position of the error. Error message contains the position of the error. A pattern is not included in the error message for purpose: it can be too long. Usually the pattern is clear from the context, and you always can check the pattern attribute. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed superseder: -> Add additional attributes to re.error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 05:13:05 2016 From: report at bugs.python.org (SilentGhost) Date: Sun, 16 Oct 2016 09:13:05 +0000 Subject: [issue25953] re fails to identify invalid numeric group references in replacement strings In-Reply-To: <1451072808.1.0.287523380704.issue25953@psf.upfronthosting.co.za> Message-ID: <1476609185.01.0.376635707316.issue25953@psf.upfronthosting.co.za> SilentGhost added the comment: Here is the updated patch with fixes to the test suite. ---------- versions: +Python 3.7 Added file: http://bugs.python.org/file45113/25953_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 05:14:03 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 09:14:03 +0000 Subject: [issue14991] Option for regex groupdict() to show only matching names In-Reply-To: <1338742861.24.0.324062376049.issue14991@psf.upfronthosting.co.za> Message-ID: <1476609243.65.0.900598959793.issue14991@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Maybe start emitting FutureWarning when groupdict() is called without an argument? groupdict(None) returns the same result but without a warning. After 1 or 2 releases the behavior can be changed: groupdict() will return only matched groups. ---------- nosy: +serhiy.storchaka versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 05:37:12 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 16 Oct 2016 09:37:12 +0000 Subject: [issue28454] Spurious arguments to PyErr_Format in unicodeobject.c Message-ID: <1476610632.81.0.393973042235.issue28454@psf.upfronthosting.co.za> New submission from Xiang Zhang: In unicodeobject.c, there are some spurious arguments to PyErr_Format as the patch shows. ---------- components: Interpreter Core files: spurious_argument.patch keywords: patch messages: 278757 nosy: ncoghlan, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Spurious arguments to PyErr_Format in unicodeobject.c type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45114/spurious_argument.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 05:41:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 09:41:21 +0000 Subject: [issue28454] Spurious arguments to PyErr_Format in unicodeobject.c In-Reply-To: <1476610632.81.0.393973042235.issue28454@psf.upfronthosting.co.za> Message-ID: <1476610881.56.0.353922461197.issue28454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +serhiy.storchaka stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 05:49:58 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 16 Oct 2016 09:49:58 +0000 Subject: [issue26942] android: test_ctypes crashes on armv7 and aarch64 In-Reply-To: <1462290789.53.0.483745295219.issue26942@psf.upfronthosting.co.za> Message-ID: <1476611398.05.0.921898882205.issue26942@psf.upfronthosting.co.za> Xavier de Gaye added the comment: At least for non-Darwin POSIX builds: * Building _ctypes with the bundled copy of libffi is deprecated in 3.6 and the default is to use a system copy of libffi, issue 27976. * The bundled libffi is removed in 3.7, issue 27979. As this crash happens with the bundled libffi, closing this issue as won't fix. ---------- resolution: -> wont fix stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 05:51:17 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 16 Oct 2016 09:51:17 +0000 Subject: [issue26942] android: test_ctypes crashes on armv7 and aarch64 In-Reply-To: <1462290789.53.0.483745295219.issue26942@psf.upfronthosting.co.za> Message-ID: <1476611477.62.0.678487244886.issue26942@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Thanks Chi Hsuan Yen for your contributions with this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 05:54:15 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 16 Oct 2016 09:54:15 +0000 Subject: [issue26942] android: test_ctypes crashes on armv7 and aarch64 In-Reply-To: <1462290789.53.0.483745295219.issue26942@psf.upfronthosting.co.za> Message-ID: <1476611655.95.0.80830753812.issue26942@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 05:55:22 2016 From: report at bugs.python.org (Chun-Yu Tseng) Date: Sun, 16 Oct 2016 09:55:22 +0000 Subject: [issue26072] pdb fails to access variables closed over In-Reply-To: <1452402984.12.0.000738362264887.issue26072@psf.upfronthosting.co.za> Message-ID: <1476611722.77.0.915384152404.issue26072@psf.upfronthosting.co.za> Chun-Yu Tseng added the comment: Surrender. After digging into the implementation of how CPython handles closures, I am sure that it is impossible to solve this problem now correctly. What I can do is create a patch to let Pdb print enough information when the problem occurs. It would look like: (Pdb) ll 3 def f(): 4 x = 1 5 -> import pdb; pdb.set_trace() (Pdb) (lambda: x)() Pdb can not use the local variable 'x' to create a closure in your evaluation. Instead, it tries to use 'x' in globals(). This behavior is due to the limitation of dynamic interpretation within a debugger session. Hint: type 'help interact' to check 'interact' command. *** NameError: name 'x' is not defined I believe it would be helpful and less annoyed for those who encounters this problem. Call for maintainers review, please. PS. 1. Ruby does not have this problem. Whether it exists depends on how a programming language to implement closures. However, I think that what CPython do (by `PyCellObject`) is smart and efficient. 2. I tried to solve the problem by copying local variables to globals() (just like what `interact` command do), but it results in **more** problems. The most typical one is that if I eval `globals()` in such an affected environment, I will always get the wrong result. 3. I also tried to patch and evaluate again what user inputs when catching a closure-related `NameError`. Obviously, it is not a good idea due to side effects of evaluation. 4. The last possible solution I think of is import `ast` and do some hacking ... it's overkill, and it also brings up other side effects. ---------- keywords: +patch Added file: http://bugs.python.org/file45115/default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 05:58:32 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 16 Oct 2016 09:58:32 +0000 Subject: [issue27627] clang fails to build ctypes on Android armv7 In-Reply-To: <1469548804.03.0.253610844682.issue27627@psf.upfronthosting.co.za> Message-ID: <1476611912.78.0.438941514346.issue27627@psf.upfronthosting.co.za> Xavier de Gaye added the comment: As this problem occurs with the bundled libffi, closing this issue as won't fix for the same reasons as those listed in msg278759. ---------- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 06:26:55 2016 From: report at bugs.python.org (Christian Heimes) Date: Sun, 16 Oct 2016 10:26:55 +0000 Subject: [issue28453] SSLObject.selected_alpn_protocol() not documented In-Reply-To: <1476589791.51.0.926571047111.issue28453@psf.upfronthosting.co.za> Message-ID: <1476613615.18.0.962213062311.issue28453@psf.upfronthosting.co.za> Christian Heimes added the comment: Cory, does it make sense to document some examples? ---------- assignee: christian.heimes -> components: +Documentation nosy: +Lukasa type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 06:29:48 2016 From: report at bugs.python.org (Christian Heimes) Date: Sun, 16 Oct 2016 10:29:48 +0000 Subject: [issue28290] BETA report: Python-3.6 build messages to stderr: AIX and "not GCC" In-Reply-To: <1475001330.34.0.107474417097.issue28290@psf.upfronthosting.co.za> Message-ID: <1476613788.35.0.736555142693.issue28290@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm cautious about messing with crypto code. The problem should be fixed upstream. Please talk the blake2 issue to https://github.com/BLAKE2/BLAKE2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 06:38:36 2016 From: report at bugs.python.org (Cory Benfield) Date: Sun, 16 Oct 2016 10:38:36 +0000 Subject: [issue28453] SSLObject.selected_alpn_protocol() not documented In-Reply-To: <1476589791.51.0.926571047111.issue28453@psf.upfronthosting.co.za> Message-ID: <1476614316.7.0.0624626863169.issue28453@psf.upfronthosting.co.za> Cory Benfield added the comment: Yeah, probably! There aren't many protocols with defined ALPN identifiers, but we should still probably explain how this works. Do you want me to write them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 06:39:38 2016 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Sun, 16 Oct 2016 10:39:38 +0000 Subject: [issue28453] SSLObject.selected_alpn_protocol() not documented In-Reply-To: <1476589791.51.0.926571047111.issue28453@psf.upfronthosting.co.za> Message-ID: <1476614378.48.0.692272142501.issue28453@psf.upfronthosting.co.za> Alex Gr?nholm added the comment: HTTP/2 (h2) is kind of a biggie :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 08:36:04 2016 From: report at bugs.python.org (Roland Bogosi) Date: Sun, 16 Oct 2016 12:36:04 +0000 Subject: [issue28449] tarfile.open(mode = 'r:*', ignore_zeros = True) has 50% chance failed to open compressed tars? In-Reply-To: <1476522464.39.0.172513688494.issue28449@psf.upfronthosting.co.za> Message-ID: <1476621364.37.0.61570250298.issue28449@psf.upfronthosting.co.za> Roland Bogosi added the comment: For anyone finding this bug through Google before it is fixed, a workaround could be to monkeypatch the OPEN_METH dict with an OrderedDict: tarfile.TarFile.OPEN_METH = OrderedDict() tarfile.TarFile.OPEN_METH['gz'] = 'gzopen' tarfile.TarFile.OPEN_METH['bz2'] = 'bz2open' tarfile.TarFile.OPEN_METH['xz'] = 'xzopen' tarfile.TarFile.OPEN_METH['tar'] = 'taropen' ---------- nosy: +RoliSoft _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 08:52:35 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 12:52:35 +0000 Subject: [issue22949] fnmatch.translate doesn't add ^ at the beginning In-Reply-To: <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za> Message-ID: <1476622355.96.0.207349650787.issue22949@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch Added file: http://bugs.python.org/file45116/doc_fnmatch_translate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 10:23:54 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 16 Oct 2016 14:23:54 +0000 Subject: [issue28451] pydoc.safeimport() raises ErrorDuringImport() if __builtin__.__import__ is monkey patched In-Reply-To: <1476548049.89.0.842528131727.issue28451@psf.upfronthosting.co.za> Message-ID: <1476627834.31.0.0444734724406.issue28451@psf.upfronthosting.co.za> R. David Murray added the comment: Can you provide a test case that shows when this condition might occur? We'd want a test in any case if we accept the patch. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 11:38:49 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 15:38:49 +0000 Subject: [issue28115] Use argparse for the zipfile module In-Reply-To: <1473750423.74.0.95052105427.issue28115@psf.upfronthosting.co.za> Message-ID: <1476632329.92.0.254163738586.issue28115@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Proposed patch makes zipfile using argparse and adds tests for zipfile CLI. Originally it is based on tarfile code and tests (but reworked, especially tests). Basically the interface is not changed, but added support of long options, and exit code in case of calling without options is changed from 1 to 2 (the same as wrong option is specified). The format of help and usage info is changed of course. Tests are passed with old releases of Python (except supporting long options). They will be backported. ---------- Added file: http://bugs.python.org/file45117/zipfile_argparse.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 11:44:26 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 16 Oct 2016 15:44:26 +0000 Subject: [issue27659] Check for the existence of crypt() In-Reply-To: <1469948678.43.0.816389049938.issue27659@psf.upfronthosting.co.za> Message-ID: <1476632666.23.0.709720386569.issue27659@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Android does not have crypt, but the crypt module is cross-built nevertheless after this warning has been issued: warning: implicit declaration of function 'crypt' is invalid in C99 [-Wimplicit-function-declaration] And at runtime, importing the crypt module fails with: ImportError: dlopen failed: cannot locate symbol "crypt" referenced by "_crypt.cpython-37m-i686-linux-android.so" gcc and clang do not enforce the C99 rules and emit just a warning for implicit function declarations instead of the error that would be conforming to C99. This can be changed with the flag '-Werror=implicit-function-declaration' and the compilation of the crypt extension module rightly fails in that case. I think this issue should be fixed by adding this flag to the Makefile. Maybe in another issue. ---------- nosy: +benjamin.peterson, haypo, martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 12:19:41 2016 From: report at bugs.python.org (siccegge) Date: Sun, 16 Oct 2016 16:19:41 +0000 Subject: [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument Message-ID: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> New submission from siccegge: Hi! Both the 3.4 version and the current version of python documentation wrt the argparse module imply convert_arg_line_to_args replacements needs to accept two arguments while it acutally only works with one. (Not completely sure about details but documentation really could be clearer!) https://docs.python.org/3.4/library/argparse.html#argparse.ArgumentParser.convert_arg_line_to_args Example from documentation def convert_arg_line_to_args(self, arg_line): return arg_line.split() If codeparser = argparse.ArgumentParser actually does def convert_arg_line_to_args(self, arg_line): return arg_line.split() parser = argparse.ArgumentParser() parser.convert_arg_line_to_args = convert_arg_line_to_args The code fails File "/usr/lib/python3.5/argparse.py", line 1735, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib/python3.5/argparse.py", line 1767, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib/python3.5/argparse.py", line 1779, in _parse_known_args arg_strings = self._read_args_from_files(arg_strings) File "/usr/lib/python3.5/argparse.py", line 2037, in _read_args_from_files for arg in self.convert_arg_line_to_args(arg_line): TypeError: convert_arg_line_to_args() missing 1 required positional argument: 'arg_line' ---------- assignee: docs at python components: Documentation messages: 278771 nosy: docs at python, siccegge priority: normal severity: normal status: open title: argparse: convert_arg_line_to_args does not actually expect self argument type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 13:10:24 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 16 Oct 2016 17:10:24 +0000 Subject: [issue28439] Remove redundant checks in PyUnicode_EncodeLocale Message-ID: <1476637824.64.0.501377582496.issue28439@psf.upfronthosting.co.za> Changes by Xiang Zhang : Removed file: http://bugs.python.org/file45089/PyUnicode_EncodeLocale.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 13:12:21 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 16 Oct 2016 17:12:21 +0000 Subject: [issue28439] Remove redundant checks in PyUnicode_EncodeLocale and PyUnicode_DecodeLocaleAndSize Message-ID: <1476637941.95.0.64380427723.issue28439@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- title: Remove redundant checks in PyUnicode_EncodeLocale -> Remove redundant checks in PyUnicode_EncodeLocale and PyUnicode_DecodeLocaleAndSize Added file: http://bugs.python.org/file45118/issue28349.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 13:15:54 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Oct 2016 17:15:54 +0000 Subject: [issue27896] Allow passing sphinx options to Doc/Makefile In-Reply-To: <1472573019.01.0.777773652271.issue27896@psf.upfronthosting.co.za> Message-ID: <20161016171538.15637.87183.202B344E@psf.io> Roundup Robot added the comment: New changeset 3884a7e3df1c by Victor Stinner in branch 'default': Issue #27896: Allow passing sphinx options to Doc/Makefile https://hg.python.org/cpython/rev/3884a7e3df1c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 13:16:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 17:16:52 +0000 Subject: [issue28449] tarfile.open(mode = 'r:*', ignore_zeros = True) has 50% chance failed to open compressed tars? In-Reply-To: <1476522464.39.0.172513688494.issue28449@psf.upfronthosting.co.za> Message-ID: <1476638212.3.0.0480263823194.issue28449@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Proposed patch fixes the issue. Existing test was passed by accident -- compressed tarfiles were too short for false detecting. ---------- keywords: +patch nosy: +serhiy.storchaka stage: -> patch review Added file: http://bugs.python.org/file45119/tarfile_ignore_zeros_auto.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 13:17:08 2016 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Oct 2016 17:17:08 +0000 Subject: [issue27896] Allow passing sphinx options to Doc/Makefile In-Reply-To: <1472573019.01.0.777773652271.issue27896@psf.upfronthosting.co.za> Message-ID: <1476638228.16.0.749167247519.issue27896@psf.upfronthosting.co.za> STINNER Victor added the comment: I pushed your patch to the default branch (Python 3.7). Thanks Julien. ---------- nosy: +haypo resolution: -> fixed status: open -> closed type: -> enhancement versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 14:47:39 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 16 Oct 2016 18:47:39 +0000 Subject: [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument In-Reply-To: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> Message-ID: <1476643659.36.0.306604781692.issue28455@psf.upfronthosting.co.za> R. David Murray added the comment: The documentation assumes you know how python class methods work, but I agree that the wording is not entirely obvious even then and could be improved. In particular it should make clear that the example shows how to define the function for subclassing or assignment to the class object. If you assign it to the instance, as in your example, then indeed self does not get passed and you want a true single argument function. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 15:22:15 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 19:22:15 +0000 Subject: [issue25953] re fails to identify invalid numeric group references in replacement strings In-Reply-To: <1451072808.1.0.287523380704.issue25953@psf.upfronthosting.co.za> Message-ID: <1476645735.05.0.261565280806.issue25953@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Needed new tests for changed behavior. Test re.sub() with incorrect groups and the string that doesn't match the pattern (e.g. empty string). Added other comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 16:51:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 20:51:20 +0000 Subject: [issue14991] Option for regex groupdict() to show only matching names In-Reply-To: <1338742861.24.0.324062376049.issue14991@psf.upfronthosting.co.za> Message-ID: <1476651080.22.0.12991804058.issue14991@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Proposed patch makes groupdict() without argument emitting FutureWarning if the result includes unmatched groups. Maybe warning message and the documentation could be better. Ned, I ask your permission for including this change in 3.6. Yes, it can break third-party code that ran with -Werror, but I think groupdict() is rarely used in comparison of other match object API. The workaround is simple -- just use groupdict(None). The earlier we add a warning, the earlier we can change the behavior of groupdict(). If we did it in 3.4 (the time Raymond opened this issue), we could get new behavior in 3.7. ---------- keywords: +patch nosy: +ned.deily stage: needs patch -> patch review Added file: http://bugs.python.org/file45120/re_groupdict_no_default_future_warning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 17:46:33 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Oct 2016 21:46:33 +0000 Subject: [issue28432] Fix doc of PyUnicode_EncodeLocale In-Reply-To: <1476378197.99.0.847074605857.issue28432@psf.upfronthosting.co.za> Message-ID: <20161016214630.32911.94125.19A716F2@psf.io> Roundup Robot added the comment: New changeset a4889719e3c2 by Berker Peksag in branch '3.5': Issue #28432: Fix first parameter name in PyUnicode_EncodeLocale documentation https://hg.python.org/cpython/rev/a4889719e3c2 New changeset 1fc08c283f8f by Berker Peksag in branch '3.6': Issue #28432: Merge from 3.5 https://hg.python.org/cpython/rev/1fc08c283f8f New changeset 767a78aacd29 by Berker Peksag in branch 'default': Issue #28432: Merge from 3.6 https://hg.python.org/cpython/rev/767a78aacd29 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 17:47:21 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 16 Oct 2016 21:47:21 +0000 Subject: [issue28432] Fix doc of PyUnicode_EncodeLocale In-Reply-To: <1476378197.99.0.847074605857.issue28432@psf.upfronthosting.co.za> Message-ID: <1476654441.82.0.617490801172.issue28432@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks. ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 17:59:06 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 16 Oct 2016 21:59:06 +0000 Subject: [issue28456] Test failures under macOS 10.12 Sierra Message-ID: <1476655146.34.0.248846726633.issue28456@psf.upfronthosting.co.za> New submission from Raymond Hettinger: On a fresh checkout, I'm getting two test failures: $ ./configure && make $ ./python.exe -m test.regrtest -v test_asyncore [snip] ====================================================================== FAIL: test_handle_expt (test.test_asyncore.TestAPI_UseIPv4Poll) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/raymond/cleancpython/Lib/test/test_asyncore.py", line 674, in test_handle_expt self.loop_waiting_for_flag(client) File "/Users/raymond/cleancpython/Lib/test/test_asyncore.py", line 514, in loop_waiting_for_flag self.fail("flag not set") AssertionError: flag not set ====================================================================== FAIL: test_handle_expt (test.test_asyncore.TestAPI_UseIPv6Poll) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/raymond/cleancpython/Lib/test/test_asyncore.py", line 674, in test_handle_expt self.loop_waiting_for_flag(client) File "/Users/raymond/cleancpython/Lib/test/test_asyncore.py", line 514, in loop_waiting_for_flag self.fail("flag not set") AssertionError: flag not set ---------------------------------------------------------------------- Ran 101 tests in 20.506s FAILED (failures=2, skipped=6) test test_asyncore failed test_asyncore failed 1 test failed: test_asyncore $ ./python.exe -m test.regrtest -v test_eintr [snip] ====================================================================== FAIL: test_poll (__main__.SelectEINTRTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/raymond/cleancpython/Lib/test/eintrdata/eintr_tester.py", line 446, in test_poll self.assertGreaterEqual(dt, self.sleep_time) AssertionError: 9.176997991744429e-06 not greater than or equal to 0.2 ---------------------------------------------------------------------- Ran 22 tests in 5.288s FAILED (failures=1, skipped=5) --- stderr: --- Traceback (most recent call last): File "/Users/raymond/cleancpython/Lib/test/eintrdata/eintr_tester.py", line 492, in test_main() File "/Users/raymond/cleancpython/Lib/test/eintrdata/eintr_tester.py", line 488, in test_main SelectEINTRTest) File "/Users/raymond/cleancpython/Lib/test/support/__init__.py", line 1849, in run_unittest _run_suite(suite) File "/Users/raymond/cleancpython/Lib/test/support/__init__.py", line 1824, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "/Users/raymond/cleancpython/Lib/test/eintrdata/eintr_tester.py", line 446, in test_poll self.assertGreaterEqual(dt, self.sleep_time) AssertionError: 9.176997991744429e-06 not greater than or equal to 0.2 --- ---------------------------------------------------------------------- Ran 1 test in 5.424s FAILED (failures=1) test test_eintr failed test_eintr failed 1 test failed: test_eintr Total duration: 5 sec Tests result: FAILURE ---------- components: Interpreter Core messages: 278780 nosy: rhettinger priority: normal severity: normal status: open title: Test failures under macOS 10.12 Sierra versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:01:09 2016 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Oct 2016 22:01:09 +0000 Subject: [issue28456] Test failures under macOS 10.12 Sierra In-Reply-To: <1476655146.34.0.248846726633.issue28456@psf.upfronthosting.co.za> Message-ID: <1476655269.2.0.479384384583.issue28456@psf.upfronthosting.co.za> STINNER Victor added the comment: See https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/ C function poll() seems to be broken on Sierra. ---------- nosy: +haypo, lukasz.langa, ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:03:27 2016 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Oct 2016 22:03:27 +0000 Subject: [issue28456] Test failures under macOS 10.12 Sierra In-Reply-To: <1476655146.34.0.248846726633.issue28456@psf.upfronthosting.co.za> Message-ID: <1476655407.97.0.136456644817.issue28456@psf.upfronthosting.co.za> STINNER Victor added the comment: Try to modify pyconfig.h to define HAVE_BROKEN_POLL. It should work around the bug. configure.ac contains a test for HAVE_BROKEN_POLL. We need another test for poll() being broken differently. Note: asyncio doesn't seem to be affect because it probably uses the more efficient kqueue by default on OS X. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:04:27 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Oct 2016 22:04:27 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <20161016220424.5183.71135.C285D073@psf.io> Roundup Robot added the comment: New changeset 7dd0910e8fbf by Berker Peksag in branch '2.7': Issue #21720: Improve exception message when the type of fromlist is unicode https://hg.python.org/cpython/rev/7dd0910e8fbf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:16:48 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 22:16:48 +0000 Subject: [issue28293] Don't completely dump the regex cache when full In-Reply-To: <1475038169.86.0.21816130335.issue28293@psf.upfronthosting.co.za> Message-ID: <1476656208.53.0.0334890021065.issue28293@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:17:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 22:17:36 +0000 Subject: [issue26436] Add the regex-dna benchmark In-Reply-To: <1456402657.17.0.694301948635.issue26436@psf.upfronthosting.co.za> Message-ID: <1476656256.74.0.414481909075.issue26436@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:30:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 22:30:20 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1476657020.08.0.294892997976.issue26656@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett type: behavior -> enhancement versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:32:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 22:32:17 +0000 Subject: [issue23532] add example of 'first match wins' to regex "|" documentation? In-Reply-To: <1424991623.26.0.907615110662.issue23532@psf.upfronthosting.co.za> Message-ID: <1476657137.97.0.716547701568.issue23532@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Regular Expressions type: behavior -> enhancement versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:42:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Oct 2016 22:42:56 +0000 Subject: [issue28454] Spurious arguments to PyErr_Format in unicodeobject.c In-Reply-To: <1476610632.81.0.393973042235.issue28454@psf.upfronthosting.co.za> Message-ID: <20161016224253.58821.50952.12122695@psf.io> Roundup Robot added the comment: New changeset cbe313cd1b55 by Benjamin Peterson in branch '3.5': remove extra PyErr_Format arguments (closes #28454) https://hg.python.org/cpython/rev/cbe313cd1b55 New changeset 738579b25d02 by Benjamin Peterson in branch '3.6': merge 3.5 (#28454) https://hg.python.org/cpython/rev/738579b25d02 New changeset b37db216c8e0 by Benjamin Peterson in branch 'default': merge 3.6 (#28454) https://hg.python.org/cpython/rev/b37db216c8e0 ---------- nosy: +python-dev resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:51:30 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 16 Oct 2016 22:51:30 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1476658290.41.0.756622864457.issue21720@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the reviews! I pushed the patch for 2.7. Nick, what do you think about the case Serhiy mentioned in msg278515? Should we fix it or is issue21720_python3.diff good to go? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:58:48 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 16 Oct 2016 22:58:48 +0000 Subject: [issue28293] Don't completely dump the regex cache when full In-Reply-To: <1475038169.86.0.21816130335.issue28293@psf.upfronthosting.co.za> Message-ID: <1476658728.08.0.0660326252656.issue28293@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 19:09:29 2016 From: report at bugs.python.org (Ben Finney) Date: Sun, 16 Oct 2016 23:09:29 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <20161016220424.5183.71135.C285D073@psf.io> Message-ID: <20161016230311.onjfu5imgesu5r4h@benfinney.id.au> Ben Finney added the comment: On 16-Oct-2016, Roundup Robot wrote: > New changeset 7dd0910e8fbf by Berker Peksag in branch '2.7': > Issue #21720: Improve exception message when the type of fromlist is unicode > https://hg.python.org/cpython/rev/7dd0910e8fbf This is an improvement, but it still should IMO show *which* item caused the error. Can it state ?Item in from list must be str, not {type}: {item!r}?? That would show the exact item so the reader has a better chance at finding where it came from. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 19:24:11 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Oct 2016 23:24:11 +0000 Subject: [issue28456] Test failures under macOS 10.12 Sierra In-Reply-To: <1476655146.34.0.248846726633.issue28456@psf.upfronthosting.co.za> Message-ID: <1476660251.48.0.965321426031.issue28456@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> macOS 12 poll syscall returns prematurely _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 19:25:40 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Oct 2016 23:25:40 +0000 Subject: [issue28456] Test failures under macOS 10.12 Sierra In-Reply-To: <1476655146.34.0.248846726633.issue28456@psf.upfronthosting.co.za> Message-ID: <1476660340.25.0.525846574471.issue28456@psf.upfronthosting.co.za> Ned Deily added the comment: This is a duplicate of Issue28087. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 19:42:23 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 16 Oct 2016 23:42:23 +0000 Subject: [issue28457] Make public the current private known hash functions in the C-API Message-ID: <1476661343.12.0.903436836661.issue28457@psf.upfronthosting.co.za> New submission from Raymond Hettinger: The known-hash variants for dict getitem/setitem/delitem have proven useful to us for writing fast C code. They may be useful to others as well. There does not seem to be any other way of getting to this functionality. ---------- components: Interpreter Core messages: 278788 nosy: rhettinger priority: normal severity: normal status: open title: Make public the current private known hash functions in the C-API versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 20:09:33 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Oct 2016 00:09:33 +0000 Subject: [issue14991] Option for regex groupdict() to show only matching names In-Reply-To: <1338742861.24.0.324062376049.issue14991@psf.upfronthosting.co.za> Message-ID: <1476662973.35.0.0395287039041.issue14991@psf.upfronthosting.co.za> Ned Deily added the comment: How do others feel about Serhiy's proposal for eventually changing the semantics of groupdict() to mean only return matched groups? If that seems reasonable, then there is the separate question of how to make the transition. Adding a somewhat unpredictable FutureWarning, i.e. one that depends on the input, seems somewhat risky and user-unfriendly at this late stage of the release cycle. But I'm open to persuasion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 21:57:15 2016 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 17 Oct 2016 01:57:15 +0000 Subject: [issue14991] Option for regex groupdict() to show only matching names In-Reply-To: <1338742861.24.0.324062376049.issue14991@psf.upfronthosting.co.za> Message-ID: <1476669435.26.0.207471814429.issue14991@psf.upfronthosting.co.za> Matthew Barnett added the comment: I'd prefer an explicit suppression to changing a long-standing behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 22:50:28 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 17 Oct 2016 02:50:28 +0000 Subject: [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument In-Reply-To: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> Message-ID: <1476672628.91.0.847510946093.issue28455@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hello, I updated the documentation with an example of how to override ArgumentParser class. Hope this is a clearer than before. Please review. Thanks :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45121/issue28455.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 22:53:15 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 17 Oct 2016 02:53:15 +0000 Subject: [issue28452] Remove _asyncio._init_module function In-Reply-To: <1476562410.69.0.507034204748.issue28452@psf.upfronthosting.co.za> Message-ID: <1476672795.79.0.676833172649.issue28452@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: http://bugs.python.org/file45122/asyncio-speedup-refactoring2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 23:14:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Oct 2016 03:14:51 +0000 Subject: [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument In-Reply-To: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> Message-ID: <20161017031448.17195.88324.8E6D2080@psf.io> Roundup Robot added the comment: New changeset 4f8f7403881f by Berker Peksag in branch '3.5': Issue #28455: Clarify example of overriding the convert_arg_line_to_args method https://hg.python.org/cpython/rev/4f8f7403881f New changeset 0b29adb5c804 by Berker Peksag in branch '3.6': Issue #28455: Merge from 3.5 https://hg.python.org/cpython/rev/0b29adb5c804 New changeset a293e5db9083 by Berker Peksag in branch 'default': Issue #28455: Merge from 3.6 https://hg.python.org/cpython/rev/a293e5db9083 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 23:17:26 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 17 Oct 2016 03:17:26 +0000 Subject: [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument In-Reply-To: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> Message-ID: <1476674246.82.0.0597229460589.issue28455@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! I removed the import statement and simplified the last sentence a bit. ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 23:22:24 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 17 Oct 2016 03:22:24 +0000 Subject: [issue21720] "TypeError: Item in ``from list'' not a string" message In-Reply-To: <1402493325.12.0.160112781213.issue21720@psf.upfronthosting.co.za> Message-ID: <1476674544.16.0.506204936243.issue21720@psf.upfronthosting.co.za> Nick Coghlan added the comment: @Berker: the warning under "-bb" is a separate issue related to the handling of wildcard imports (_handle_fromlist searches for '*' and then pops it from a copy of the input list, replacing it with __all__ if that's defined) @Ben: As a general principle, we don't give value information in type errors, since the error is structural rather than value based. The closest equivalent to us doing that that I'm aware of is the sequence index being given in str.join's TypeError: >>> "".join(["a", "b", b"c"]) Traceback (most recent call last): File "", line 1, in TypeError: sequence item 2: expected str instance, bytes found By contrast, when sorting, we don't give *any* indication as to where in the sequence the problem was found or the specific values involved: >>> sorted(["a", "b", b"c"]) Traceback (most recent call last): File "", line 1, in TypeError: unorderable types: bytes() < str() That doesn't make it a bad idea (as I think you're right that it would often make debugging easier), I'd just prefer to consider that as a separate question rather than introducing a one-off inconsistency with the general policy here (in particular, encountering TypeError is far more likely with str.join and sorted than it is with __import__, so it would be genuinely weird for the latter to have the most helpful error message). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 23:31:02 2016 From: report at bugs.python.org (Georgey) Date: Mon, 17 Oct 2016 03:31:02 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476675062.87.0.273420645229.issue28447@psf.upfronthosting.co.za> Georgey added the comment: Yes that is definitely a closed socket. But it is strange that in a single thread server without select module, the socket is never closed until I explicitly use close() method. ------------ except: print(sock) #<- here it looks normal time.sleep(3) print(sock) #<- here it still looks normal sock.close() print(sock) #<- finally the [closed] tag appears and all the details lost ============ So I guess the "Socket Automatically Closing" effect associate with "select" module? For when I run the single-thread server in the IDLE and called time.sleep(), it has been already treated as multi-thread. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 00:20:25 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 17 Oct 2016 04:20:25 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476678025.4.0.902698177345.issue28447@psf.upfronthosting.co.za> Martin Panter added the comment: So is your ?automatic closing? due to your program, or a bug in Python? You will have to give more information if you want anyone else to look at this. When I run the code you posted (with various modules imported) all I get is NameError: name 'yellow_page' is not defined ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 00:38:36 2016 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 17 Oct 2016 04:38:36 +0000 Subject: [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1476679116.52.0.279852795826.issue13322@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- nosy: -petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 03:56:45 2016 From: report at bugs.python.org (Attila-Mihaly Balazs) Date: Mon, 17 Oct 2016 07:56:45 +0000 Subject: [issue28458] from __future__ import print_function does not emulate the flush param from py3k Message-ID: <1476691005.05.0.512321507178.issue28458@psf.upfronthosting.co.za> New submission from Attila-Mihaly Balazs: Doing the following in Python 2.7.12 does not work: from __future__ import print_function print(1, flush=True) It says: "'flush' is an invalid keyword argument for this function" While the following is a perfectly valid python 3k statement: print(1, flush=True) ---------- components: Library (Lib) messages: 278797 nosy: Attila-Mihaly Balazs priority: normal severity: normal status: open title: from __future__ import print_function does not emulate the flush param from py3k versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 04:07:26 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 17 Oct 2016 08:07:26 +0000 Subject: [issue28458] from __future__ import print_function does not emulate the flush param from py3k In-Reply-To: <1476691005.05.0.512321507178.issue28458@psf.upfronthosting.co.za> Message-ID: <1476691646.46.0.418976531591.issue28458@psf.upfronthosting.co.za> Berker Peksag added the comment: That's because the flush argument was added in Python 3.3 (after print() was backported to 2.7 via a future import) Thanks for the report. ---------- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 05:11:53 2016 From: report at bugs.python.org (Erik Bray) Date: Mon, 17 Oct 2016 09:11:53 +0000 Subject: [issue28441] sys.executable is ambiguous on Cygwin without .exe suffix In-Reply-To: <1476452085.73.0.180033377767.issue28441@psf.upfronthosting.co.za> Message-ID: <1476695513.76.0.549506544683.issue28441@psf.upfronthosting.co.za> Erik Bray added the comment: I agree this has a slight change in behavior which I was at first hesitant about. But I think the previous behavior was wrong insofar as it was overly ambiguous. I agree it should apply on MSYS2 as well (I actually thought __CYGWIN__ was defined on MSYS2 but I could be wrong about that). I'm not sure what better solution there is. I thought of tinkering with subprocess specifically, but that was too fragile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 06:26:17 2016 From: report at bugs.python.org (Erik Bray) Date: Mon, 17 Oct 2016 10:26:17 +0000 Subject: [issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt' In-Reply-To: <1439820667.47.0.427491446105.issue24881@psf.upfronthosting.co.za> Message-ID: <1476699977.57.0.722147151879.issue24881@psf.upfronthosting.co.za> Erik Bray added the comment: FWIW this patch broke the _pyio module on Cygwin, as the msvcrt module is not built on Cygwin. AFAICT this is only a problem for Python built with MSVCRT, which Cygwin does not use. When test case works as expected on Cygwin without this. ---------- nosy: +erik.bray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 06:37:42 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Oct 2016 10:37:42 +0000 Subject: [issue24881] _pyio checks that `os.name == 'win32'` instead of 'nt' In-Reply-To: <1439820667.47.0.427491446105.issue24881@psf.upfronthosting.co.za> Message-ID: <1476700662.41.0.997423457686.issue24881@psf.upfronthosting.co.za> STINNER Victor added the comment: "FWIW this patch broke the _pyio module on Cygwin," Please open a new issue, this one is closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 06:58:12 2016 From: report at bugs.python.org (Erik Bray) Date: Mon, 17 Oct 2016 10:58:12 +0000 Subject: [issue28459] _pyio module broken on Cygwin / setmode not usable Message-ID: <1476701892.4.0.598393414511.issue28459@psf.upfronthosting.co.za> New submission from Erik Bray: Since the patch to #24881 was merged the _pyio module has been non-importable on Cygwin, due to an attempt to import from the msvcrt module. However, the msvcrt module is not built on Cygwin (Cygwin does not use MSVCRT). Cygwin's libc does, however, have _setmode. The problem this is trying to solve is to call _setmode (https://msdn.microsoft.com/en-us/library/tw4k6df8.aspx) on file descriptors to ensure that they are O_BINARY instead of O_TEXT (a distinction that needs to made on Windows). Fortunately, on Cygwin, it is fairly rare that a file descriptor will have mode O_TEXT, but it it is possible. See https://cygwin.com/faq/faq.html#faq.programming.msvcrt-and-cygwin This could be tricky to solve though. Removing setmode() call entirely works for me as far as the test suite is concerned. But it leaves _pyio slightly incongruous with the C implementation in this one small aspect, and it *is* a bug. I would propose for Python 3.7 adding an os.setmode() function. On Windows this could be simply an alias for msvcrt.setmode() (or vice-versa). But because setmode() is available also in Cygwin (and technically some other platforms too, though none that are currently supported by Python) it would be a good candidate for inclusion in the os module I think (for those platforms that have it). ---------- components: IO messages: 278802 nosy: erik.bray priority: normal severity: normal status: open title: _pyio module broken on Cygwin / setmode not usable type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 08:23:33 2016 From: report at bugs.python.org (Lapsang Leaf) Date: Mon, 17 Oct 2016 12:23:33 +0000 Subject: [issue27806] 2.7 32-bit builds fail on macOS 10.12 Sierra due to dependency on deleted header file QuickTime/QuickTime.h In-Reply-To: <1471643899.93.0.569141042934.issue27806@psf.upfronthosting.co.za> Message-ID: <1476707013.69.0.909672930959.issue27806@psf.upfronthosting.co.za> Lapsang Leaf added the comment: Can we have this in English, please, for noobs? I only use python in order to run zim on my mac. I do not have the same technical know-how as many users and I do not understand the parlance here. Currently I have OS X 10.12 with python 2.7 - updating to sierra seems to have broken it. Please let me know, step by step, what I need to do to patch and get it running again. Thanks ---------- nosy: +Lapsang Leaf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 08:44:58 2016 From: report at bugs.python.org (Petr Pulc) Date: Mon, 17 Oct 2016 12:44:58 +0000 Subject: [issue28460] Minidom, order of attributes, datachars Message-ID: <1476708298.12.0.219819102875.issue28460@psf.upfronthosting.co.za> New submission from Petr Pulc: Hello, just an idea for improvement of minidom. Sometimes it is not convenient that the element attributes are sorted alphabetically. Usually, users do hack the minidom file themselves to force some behaviour, yet the order can be quite nicely defined by the DTD, for example. More on the "issue" side is another idea for improvement. Not all special characters do need to be changed to entities. For example, only < needs to be changed to entity in text data. I guess, that the _write_data function could be then diminished as well... What do you mean of these two ideas? Comments will be appreciated. ---------- components: XML messages: 278804 nosy: Petr Pulc priority: normal severity: normal status: open title: Minidom, order of attributes, datachars type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 09:14:25 2016 From: report at bugs.python.org (loic rowe) Date: Mon, 17 Oct 2016 13:14:25 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1476710065.94.0.17516063316.issue8376@psf.upfronthosting.co.za> loic rowe added the comment: A new proposal is to add at the end of the paragraph on the iterator those point: """ As you should have noticed this Reverse let you iterate over the data only once:: >>> rev = Reverse('spam') >>> for char in rev: ... print(char) ... m a p s >>> for char in rev: ... print(char) ... >>> So now let's complete our example to have a container that allow you to iterate over his items backwards:: class ReverseList(object): "Container that lets you iterate over the items backwards" def __init__(self, data): self.data = data def __iter__(self): return ReverseIterator(self.data) class ReverseIterator(object): "Iterator for looping over a sequence backwards" def __init__(self, data): self.data = data self.index = len(data) def __iter__(self): return self def next(self): if self.index == 0: raise StopIteration self.index = self.index - 1 return self.data[self.index] >>> rev = ReverseList([1,2,3]) >>> for char in rev: ... print (char) ... 3 2 1 >>> for char in rev: ... print (char) ... 3 2 1 """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 09:20:48 2016 From: report at bugs.python.org (Pierre Nugues) Date: Mon, 17 Oct 2016 13:20:48 +0000 Subject: [issue28461] Replacement of re with the regex package Message-ID: <1476710448.23.0.62948086904.issue28461@psf.upfronthosting.co.za> New submission from Pierre Nugues: I am using Unicode regexes in the form of properties: \p{} and these are not standard in the re module. I have to use the new regex module, which has to be installed separately. I would like to see the replacement of re with regex in the future Python versions. I was not sure where to post my request and I used this bug tracker with the enhancement category. I hope this is not a mistake. ---------- components: Regular Expressions messages: 278806 nosy: ezio.melotti, mrabarnett, pnugues priority: normal severity: normal status: open title: Replacement of re with the regex package type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 09:27:25 2016 From: report at bugs.python.org (=?utf-8?q?Jos=C3=A9_Manuel?=) Date: Mon, 17 Oct 2016 13:27:25 +0000 Subject: [issue28404] Logging SyslogHandler not appending '\n' to the end In-Reply-To: <1476101662.48.0.994997122347.issue28404@psf.upfronthosting.co.za> Message-ID: <1476710845.52.0.909947294675.issue28404@psf.upfronthosting.co.za> Jos? Manuel added the comment: Sorry to bother you again, but I've tested this not only with Fluentd, but with a RSYSLOG server and it does not work with TCP except if you manually add the trailer LF character. Other than that, UDP default transport protocol has no issues and works fine with both systems. Here's my simple code: ------- sHandler = logging.handlers.SysLogHandler(address=(address[0], address[1]), socktype = socket.SOCK_STREAM) sHandler.setFormatter(logging.Formatter(fmt=MSG_SYSLOG_FORMAT, datefmt=DATE_FMT)) self.addHandler(sHandler) ------- After reading RFC 6587 I think the SyslogHandler class should implement at least one of the framing mechanisms proposed by this RFC, meant for TCP transmission: - Octet counting - Trailer character (e.g. LF) Besides, I've being checking out the library "pyloggr" (https://github.com/stephane-martin/pyloggr) and they are implementing both mechanisms. As for SyslogHandler, it will be as simple as adding another field to the class constructor (use_delimiter?) and to add these lines to the emit code (it works): ------- if (self.use_delimiter): msg = msg + '\n' else: msg = str(len(msg)) + ' ' + msg # default behavior ------- Thank you again ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 09:32:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Oct 2016 13:32:53 +0000 Subject: [issue28461] Replacement of re with the regex package In-Reply-To: <1476710448.23.0.62948086904.issue28461@psf.upfronthosting.co.za> Message-ID: <1476711173.0.0.939302122568.issue28461@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue12734 for adding the support of properties in re. See issue2636 for replacing re with regex. See issue22594 for encouraging the use of regex. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Adding a new regex module (compatible with re) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 11:38:04 2016 From: report at bugs.python.org (Vyacheslav Grigoryev) Date: Mon, 17 Oct 2016 15:38:04 +0000 Subject: [issue28462] subprocess pipe can't see EOF from a child in case of a few children run with subprocess Message-ID: <1476718684.05.0.447400261666.issue28462@psf.upfronthosting.co.za> New submission from Vyacheslav Grigoryev: I'm creating a master stand-alone module on Python which should run some children via subprocess module. Working with children is done in separate worker threads. Additionally I need to receive real-time output from a child so in a worker thread I also create reader helper thread which reads on a pipe from the child. All is working correctly while I have only one worker thread and run only one child. When the child finishes the reader helper thread gets EOF and exits. But when I have two worker threads and run two children, a pipe from early child doesn't see EOF until the second child is finished. Though they are completely unrelated. Let's take a look on simplest example for reproducing the problem. There is a simplest child: ------------------------------ import time, sys # first arg is an ID. Second arg is how long to work in seconds sys.stdout.write("start slave %s\n" % sys.argv[1]) sys.stdout.flush() time.sleep(int(sys.argv[2])) sys.stdout.write("finish slave %s\n" % sys.argv[1]) sys.stdout.flush() ------------------------------ And there is a master module: ------------------------------ import subprocess, sys, os, threading, time g_logLock = threading.Lock() def log(msg): with g_logLock: t = time.time() print "%s.%03d %-5s %s" % \ (time.strftime('%H:%M:%S', time.localtime(t)), int((t - t // 1) * 1000), threading.currentThread().name, msg) def thread1Proc(): def reader(stdout): while True: line = stdout.readline() if not line: break log('slave said: %s' % line.strip()) log('finish slave reader thread') log('thread 1 started') timeToWork = '1' util = subprocess.Popen((sys.executable, 'slave.py', '1', timeToWork), stdout=subprocess.PIPE) readerT = threading.Thread(target=reader, args=(util.stdout,), name='t1-r') readerT.start() log('slave 1 returned %d' % util.wait()) readerT.join() log('thread 1 finished') def thread2Proc(): log('thread 2 started') timeToWork = '3' util = subprocess.Popen((sys.executable, 'slave.py', '2', timeToWork)) log('slave 2 returned %d' % util.wait()) log('thread 2 finished') #--------------------------- log('starting test') threads = (threading.Thread(target=thread1Proc, name='t1'), threading.Thread(target=thread2Proc, name='t2')) for t in threads: t.start() for t in threads: t.join() log('finished test') ------------------------------ Here is what I see on the output (note - slave 1 outputs to the master via pipe, while slave 2 outputs to a console because its output is not redirected): >master.py 08:57:31.342 MainThread starting test 08:57:31.342 t1 thread 1 started 08:57:31.342 t2 thread 2 started 08:57:31.405 t1-r slave said: start slave 1 start slave 2 08:57:32.420 t1-r slave said: finish slave 1 08:57:32.420 t1 slave 1 returned 0 finish slave 2 08:57:34.415 t1-r finish slave reader thread 08:57:34.415 t2 slave 2 returned 0 08:57:34.415 t1 thread 1 finished 08:57:34.431 t2 thread 2 finished 08:57:34.431 MainThread finished test Here you can see that even if the slave 1 finishes at 32.420, its reader thread receives EOF and exits only when the slave 2 finishes also - at 34.415 (slave 1 works 1 second, slave 2 - 3 seconds). Why the reader thread doesn't see EOF just in time? The issue is reproduced in Python 2.7.12 x86 on Windows 7. On Linux Ubuntu 16.04 with system Python 2.7 all works as expected. ---------- components: Library (Lib) messages: 278809 nosy: Vyacheslav Grigoryev priority: normal severity: normal status: open title: subprocess pipe can't see EOF from a child in case of a few children run with subprocess type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 11:40:27 2016 From: report at bugs.python.org (Florijan Hamzic) Date: Mon, 17 Oct 2016 15:40:27 +0000 Subject: [issue21429] Input.output error with multiprocessing In-Reply-To: <1399220691.1.0.523621963732.issue21429@psf.upfronthosting.co.za> Message-ID: <1476718827.74.0.84304692324.issue21429@psf.upfronthosting.co.za> Florijan Hamzic added the comment: Hi, i have a similiar issue: i have a really simple scenario Callee: ``` @classmethod def MoveDataToOtherSide(cls, model) data = { "FirstName": model.FirstName, "LastName": model.LastName, "Email": model.Email, "Pass": model.Password, "Images": cls.LoadUserImages(model.ID) } p = Process(target=UserService.MoveProfileToOtherSide, kwargs={"data": data}) p.start() ``` Processeee ``` @staticmethod def MoveProfileToOtherSide(data): requests.get("https://mySecretUrl.de", params={"token": "secBlub", "data": encode(data, unpicklable=False)}) ``` I think it has something todo with stdout but i have no clue how i could debug this further, unfortunetely. The Application around this functionality (UserService) is cherrypy. ---------- nosy: +Florijan Hamzic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 12:04:11 2016 From: report at bugs.python.org (Jeremy Sequoia) Date: Mon, 17 Oct 2016 16:04:11 +0000 Subject: [issue27806] 2.7 32-bit builds fail on macOS 10.12 Sierra due to dependency on deleted header file QuickTime/QuickTime.h In-Reply-To: <1476707013.69.0.909672930959.issue27806@psf.upfronthosting.co.za> Message-ID: <6AB30603-7B8B-4AEE-9A8D-32793F3C33FE@macports.org> Jeremy Sequoia added the comment: QuickTime/QuickTime.h was deprecated long ago. python fails to compile if QuickTime/QuickTime.h isn't present. QuickTime/QuickTime.h was removed in Sierra, causing the build to fail on Sierra. This patch fixes that issue. > On Oct 17, 2016, at 05:23, Lapsang Leaf wrote: > > > Lapsang Leaf added the comment: > > Can we have this in English, please, for noobs? > > I only use python in order to run zim on my mac. I do not have the same technical know-how as many users and I do not understand the parlance here. Currently I have OS X 10.12 with python 2.7 - updating to sierra seems to have broken it. > > Please let me know, step by step, what I need to do to patch and get it running again. Thanks > > ---------- > nosy: +Lapsang Leaf > > _______________________________________ > Python tracker > > _______________________________________ ---------- Added file: http://bugs.python.org/file45123/smime.p7s _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4465 bytes Desc: not available URL: From report at bugs.python.org Mon Oct 17 12:05:53 2016 From: report at bugs.python.org (Lapsang Leaf) Date: Mon, 17 Oct 2016 16:05:53 +0000 Subject: [issue27806] 2.7 32-bit builds fail on macOS 10.12 Sierra due to dependency on deleted header file QuickTime/QuickTime.h In-Reply-To: <6AB30603-7B8B-4AEE-9A8D-32793F3C33FE@macports.org> Message-ID: Lapsang Leaf added the comment: Yes, I understood that part, sorry. What I don?t understand is how to work/install the patch you have provided? So, again, please let me know, step by step, what I need to do to patch and get it running. Thanks > On 17 Oct 2016, at 17:04, Jeremy Sequoia wrote: > > > Jeremy Sequoia added the comment: > > QuickTime/QuickTime.h was deprecated long ago. > > python fails to compile if QuickTime/QuickTime.h isn't present. > > QuickTime/QuickTime.h was removed in Sierra, causing the build to fail on Sierra. > > This patch fixes that issue. > >> On Oct 17, 2016, at 05:23, Lapsang Leaf wrote: >> >> >> Lapsang Leaf added the comment: >> >> Can we have this in English, please, for noobs? >> >> I only use python in order to run zim on my mac. I do not have the same technical know-how as many users and I do not understand the parlance here. Currently I have OS X 10.12 with python 2.7 - updating to sierra seems to have broken it. >> >> Please let me know, step by step, what I need to do to patch and get it running again. Thanks >> >> ---------- >> nosy: +Lapsang Leaf >> >> _______________________________________ >> Python tracker >> >> _______________________________________ > > ---------- > Added file: http://bugs.python.org/file45123/smime.p7s > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 12:15:34 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Oct 2016 16:15:34 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <20161017161527.20766.34449.ED13CD36@psf.io> Roundup Robot added the comment: New changeset af06d9616c29 by Victor Stinner in branch '3.5': Issue #28409: regrtest: fix the parser of command line arguments. https://hg.python.org/cpython/rev/af06d9616c29 New changeset 26249f82c15d by Victor Stinner in branch '3.6': Merge 3.6: Issue #28409: regrtest: fix the parser of command line arguments. https://hg.python.org/cpython/rev/26249f82c15d New changeset 9f03b3dbb929 by Victor Stinner in branch 'default': Merge 3.7: Issue #28409: regrtest: fix the parser of command line arguments. https://hg.python.org/cpython/rev/9f03b3dbb929 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 12:19:22 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Oct 2016 16:19:22 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476721162.98.0.277801690629.issue28409@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the bug report Charalampos! It's now fixed. -- > Until python3.6.0a04 it was possible to pass multiple times the -x option at regrtest. To be clear: the regrtest parser of command line argument was broken since Python 2.7 at least. "./python -m test.regrtest -v test_binop -v test_unaryop" on Python 2.7 tries to run "-v" test... I fixed Python 3.5, 3.6 and 3.7, but not Python 2.7. Python 3 uses argparse, whereas Python 2 uses getopt. I'm not interested to try to fix the Python 2 code using getopt. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 12:21:08 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Oct 2016 16:21:08 +0000 Subject: [issue27778] PEP 524: Add os.getrandom() In-Reply-To: <1471368341.7.0.188364803995.issue27778@psf.upfronthosting.co.za> Message-ID: <1476721268.3.0.590285992788.issue27778@psf.upfronthosting.co.za> STINNER Victor added the comment: Because of the lack of interest for getrandom_errno.patch, and Christian saying that it's not good to document specific errors, I now close the bug. Thank you all for your help on this nice security enhancement in Python 3.6! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 12:24:00 2016 From: report at bugs.python.org (Lisa Roach) Date: Mon, 17 Oct 2016 16:24:00 +0000 Subject: [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1476721440.73.0.599335977799.issue27779@psf.upfronthosting.co.za> Lisa Roach added the comment: Anyone get the chance to look over this yet? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 12:48:55 2016 From: report at bugs.python.org (siccegge) Date: Mon, 17 Oct 2016 16:48:55 +0000 Subject: [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument In-Reply-To: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> Message-ID: <1476722935.56.0.584184569811.issue28455@psf.upfronthosting.co.za> siccegge added the comment: Looks quite helpfull indeed to me! Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 12:52:51 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Oct 2016 16:52:51 +0000 Subject: [issue27806] 2.7 32-bit builds fail on macOS 10.12 Sierra due to dependency on deleted header file QuickTime/QuickTime.h In-Reply-To: <1471643899.93.0.569141042934.issue27806@psf.upfronthosting.co.za> Message-ID: <1476723171.78.0.177501255098.issue27806@psf.upfronthosting.co.za> Ned Deily added the comment: Lapsang, sorry but this bug tracker is not a help forum. There are many other, more appropriate places to ask for help in building software, like Stack Overflow or the Python mailing list. But, if you are not comfortable patching and building software from source, you should consider using a third-party package manager like MacPorts or Homebrew to install zim and all of its dependencies, like Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 12:54:09 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Mon, 17 Oct 2016 16:54:09 +0000 Subject: [issue28433] Add sorted (ordered) containers In-Reply-To: <1476382897.32.0.459857278334.issue28433@psf.upfronthosting.co.za> Message-ID: <1476723249.24.0.676894775253.issue28433@psf.upfronthosting.co.za> ???? ????????? added the comment: @r.david.murray Please see answres at https://groups.google.com/forum/#!topic/python-ideas/nPOi2LtVsR4 No one say that adding sorted containers is bad idea. Some people say that specific use-cases require specific solutions, but they also said that it is good to add solution, that is not-so-bad for a gneric case. The most appropriate solution (as I think) is pure-python sorted containers that are proven to be bug-free and has perfromance comparison against many other libraries. http://www.grantjenks.com/docs/sortedcontainers. This will make support of PyPy/IronPython/e.t.c automagically. Why not to add it to CPython distribution (like asyncio) ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 13:08:59 2016 From: report at bugs.python.org (=?utf-8?b?0JrQvtC90YHRgtCw0L3RgtC40L0g0JLQvtC70LrQvtCy?=) Date: Mon, 17 Oct 2016 17:08:59 +0000 Subject: [issue28463] Email long headers parsing/serialization Message-ID: <1476724139.73.0.82516539768.issue28463@psf.upfronthosting.co.za> New submission from ?????????? ??????: There is strange thing with long headers serialized, they have \n prefix. Example fails on Python3.4/3.5: from email.message import Message from email import message_from_bytes x = '<147672320775.19544.6718708004153358411 at mkren-spb.root.devdomain.local>' header = 'Message-ID' msg = Message() msg[header] = x data = msg.as_bytes() msg2 = message_from_bytes(data) print(x) print(msg2[header]) assert msg2[header] == x MessageID was generated by email.utils.make_msgid function. ---------- components: email messages: 278820 nosy: barry, r.david.murray, ?????????? ?????? priority: normal severity: normal status: open title: Email long headers parsing/serialization versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 13:10:23 2016 From: report at bugs.python.org (=?utf-8?b?0JrQvtC90YHRgtCw0L3RgtC40L0g0JLQvtC70LrQvtCy?=) Date: Mon, 17 Oct 2016 17:10:23 +0000 Subject: [issue28463] Email long headers parsing/serialization In-Reply-To: <1476724139.73.0.82516539768.issue28463@psf.upfronthosting.co.za> Message-ID: <1476724223.31.0.522971492843.issue28463@psf.upfronthosting.co.za> ?????????? ?????? added the comment: Something with copy paste. x = '<147672320775.19544.6718708004153358411 at mkren-spb.root.devdomain.local>' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 13:12:07 2016 From: report at bugs.python.org (=?utf-8?b?0JrQvtC90YHRgtCw0L3RgtC40L0g0JLQvtC70LrQvtCy?=) Date: Mon, 17 Oct 2016 17:12:07 +0000 Subject: [issue28463] Email long headers parsing/serialization In-Reply-To: <1476724139.73.0.82516539768.issue28463@psf.upfronthosting.co.za> Message-ID: <1476724327.58.0.404623014489.issue28463@psf.upfronthosting.co.za> ?????????? ?????? added the comment: Something with inserting long strings here. Its duplicating for some reason. Adding example as attachment. ---------- Added file: http://bugs.python.org/file45124/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 13:22:02 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Oct 2016 17:22:02 +0000 Subject: [issue28463] Email long headers parsing/serialization In-Reply-To: <1476724139.73.0.82516539768.issue28463@psf.upfronthosting.co.za> Message-ID: <1476724922.41.0.0564309459633.issue28463@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, interesting case. Both the old folder/parser and the new folder/parser fail, in slightly different ways. I'll have to add this test case to the tests as I finish rewriting the folder. Thanks for the report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 13:23:05 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Mon, 17 Oct 2016 17:23:05 +0000 Subject: [issue27659] Check for the existence of crypt() In-Reply-To: <1469948678.43.0.816389049938.issue27659@psf.upfronthosting.co.za> Message-ID: <1476724985.58.0.996606349454.issue27659@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Agreed. Adding -Werror=implicit-function-declaration is much simpler. Feel free to close it as rejected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 14:19:10 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Oct 2016 18:19:10 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1476728350.64.0.0887211449497.issue28409@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is the difference between using parse_known_args() and nargs=argparse.REMAINDER? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 14:19:31 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 17 Oct 2016 18:19:31 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows In-Reply-To: <1476497368.18.0.628065389536.issue28448@psf.upfronthosting.co.za> Message-ID: <1476728371.79.0.0151820002171.issue28448@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file45125/schedule_callbacks.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 15:04:42 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Oct 2016 19:04:42 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476728350.64.0.0887211449497.issue28409@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Serhiy Storchaka added the comment: > What is the difference between using parse_known_args() and nargs=argparse.REMAINDER? Using REMAINDER, args become ["b", "-c", "d"] for -a b -c d. I would be happy to not use parse_known_args(), but I didn't find how. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 16:06:00 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 17 Oct 2016 20:06:00 +0000 Subject: [issue28462] subprocess pipe can't see EOF from a child in case of a few children run with subprocess In-Reply-To: <1476718684.05.0.447400261666.issue28462@psf.upfronthosting.co.za> Message-ID: <1476734760.45.0.297877406665.issue28462@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 17:34:37 2016 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 17 Oct 2016 21:34:37 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows In-Reply-To: <1476497368.18.0.628065389536.issue28448@psf.upfronthosting.co.za> Message-ID: <1476740077.57.0.37466471018.issue28448@psf.upfronthosting.co.za> Yury Selivanov added the comment: > C implemented Future should allow overriding _schedule_callbacks. I'm not so sure about this. Maybe we can just fix _WaitCancelFuture somehow? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 17:36:12 2016 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 17 Oct 2016 21:36:12 +0000 Subject: [issue28452] Remove _asyncio._init_module function In-Reply-To: <1476562410.69.0.507034204748.issue28452@psf.upfronthosting.co.za> Message-ID: <1476740172.62.0.781090549606.issue28452@psf.upfronthosting.co.za> Yury Selivanov added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 17:54:11 2016 From: report at bugs.python.org (Chris Meyer) Date: Mon, 17 Oct 2016 21:54:11 +0000 Subject: [issue28464] BaseEventLoop.close should shutdown executor before marking itself closed Message-ID: <1476741251.72.0.37603874415.issue28464@psf.upfronthosting.co.za> New submission from Chris Meyer: BaseEventLoop.close shuts down the executor associated with the event loop. It should do that BEFORE it sets self._closed = True, otherwise any pending executor futures will attempt to 'call_soon' on the event loop when they finish, resulting in a confusing error message that the event loop is already closed. ---------- components: asyncio messages: 278829 nosy: cmeyer, gvanrossum, yselivanov priority: normal severity: normal status: open title: BaseEventLoop.close should shutdown executor before marking itself closed type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 20:29:06 2016 From: report at bugs.python.org (=?utf-8?b?5pu55b+g?=) Date: Tue, 18 Oct 2016 00:29:06 +0000 Subject: [issue28465] python 3.5 magic number Message-ID: <1476750546.36.0.931772637731.issue28465@psf.upfronthosting.co.za> New submission from ??: On debian 9 and python 3.5.2: >>> imp.get_magic() b'\x17\r\r\n' On windows and python 3.5.2 >>> imp.get_magic() b'\x16\r\r\n' the same python version, magic number is the same, why not? ---------- components: Build messages: 278830 nosy: ?? priority: normal severity: normal status: open title: python 3.5 magic number type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 20:30:47 2016 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 18 Oct 2016 00:30:47 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1476750647.01.0.772066714319.issue28385@psf.upfronthosting.co.za> Eric V. Smith added the comment: LGTM, although I'm not so sure about your #3. Maybe it should be a separate issue and raised on python-dev? But I don't feel strongly enough about it to argue the point. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 22:28:14 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 18 Oct 2016 02:28:14 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476757694.03.0.408248671545.issue28444@psf.upfronthosting.co.za> Martin Panter added the comment: Well, I am not really an expert on the setup.py stuff, but I will ask a question anyway that may help the review process: Why do you remove the code that loops over Modules/Setup? Maybe is it redundant with the other code for removing the already-built-in modules? Looking at the repository history, the code for avoiding already-built-in modules was first added as part of revision c503fa9b265e; see the __import__() call. Later, the second chunk of code looping over Setup was added in revision 90e90c92198b, with discussion at . The logic matching MODOBJS doesn?t look super robust. E.g. I suspect it will get confused if there are two Python modules that happen to use the same C filename in different subdirectories. Also, I suspect it could get confused by _math.c, which is shared by the ?math? and ?cmath? modules. Perhaps I don?t know what I am talking about, but if you added Modules/Setup.config to the list of Setup files to process, would that eliminate the need to look at both MODOBJS and sys.builtin_module_names? ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 22:40:47 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 18 Oct 2016 02:40:47 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476758447.42.0.135291692177.issue28444@psf.upfronthosting.co.za> Martin Panter added the comment: PS: I agree it would be good to add more documentation for cross-compiling. I tried to suggest something in an outdated patch once before; see the bottom of . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 22:48:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 02:48:50 +0000 Subject: [issue28452] Remove _asyncio._init_module function In-Reply-To: <1476562410.69.0.507034204748.issue28452@psf.upfronthosting.co.za> Message-ID: <20161018024847.12110.47772.74CA7314@psf.io> Roundup Robot added the comment: New changeset d32ec6591c49 by INADA Naoki in branch '3.6': Issue #28452: Remove _asyncio._init_module function https://hg.python.org/cpython/rev/d32ec6591c49 New changeset ce85a1f129e3 by INADA Naoki in branch 'default': Issue #28452: Remove _asyncio._init_module function https://hg.python.org/cpython/rev/ce85a1f129e3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 22:49:19 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 18 Oct 2016 02:49:19 +0000 Subject: [issue28452] Remove _asyncio._init_module function In-Reply-To: <1476562410.69.0.507034204748.issue28452@psf.upfronthosting.co.za> Message-ID: <1476758959.08.0.258127046764.issue28452@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 22:52:22 2016 From: report at bugs.python.org (Ryan Petrello) Date: Tue, 18 Oct 2016 02:52:22 +0000 Subject: [issue28466] SIGALRM fails to interrupt time.sleep() call on Python 3.6 Message-ID: <1476759142.75.0.333626760319.issue28466@psf.upfronthosting.co.za> New submission from Ryan Petrello: I may have found a bug in SIGALRM handling in Python3.5. I've not been able to reproduce the same issue in Python2.7 or 3.4. Here's a simple example that illustrates the issue (which I'm able to reproduce on OS X 10.11.3 El Capitan and Ubuntu 14.04): $ python2 --version; python3.4 --version; python3.5 --version Python 2.7.11 Python 3.4.4 Python 3.5.1 $ cat alarm.py import signal, time def handler(signum, frame): print('Signal handler called with signal %s' % signum) # Set the signal handler and a 1-second alarm signal.signal(signal.SIGALRM, handler) signal.alarm(1) # We should not actually sleep for 10 seconds time.sleep(10) signal.alarm(0) $ time python2 alarm.py Signal handler called with signal 14 python2 alarm.py 0.04s user 0.02s system 5% cpu 1.075 total $ time python3.4 alarm.py Signal handler called with signal 14 python3.4 alarm.py 0.07s user 0.01s system 7% cpu 1.092 total $ time python3.5 alarm.py Signal handler called with signal 14 python3.5 alarm.py 0.09s user 0.02s system 1% cpu 10.115 total Note that when run under python3.5, the program does not exit until 10 seconds have passed. ---------- components: Library (Lib) messages: 278835 nosy: ryan.petrello priority: normal severity: normal status: open title: SIGALRM fails to interrupt time.sleep() call on Python 3.6 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 22:53:14 2016 From: report at bugs.python.org (Ryan Petrello) Date: Tue, 18 Oct 2016 02:53:14 +0000 Subject: [issue28466] SIGALRM fails to interrupt time.sleep() call on Python 3.5 In-Reply-To: <1476759142.75.0.333626760319.issue28466@psf.upfronthosting.co.za> Message-ID: <1476759194.62.0.0979249602332.issue28466@psf.upfronthosting.co.za> Changes by Ryan Petrello : ---------- title: SIGALRM fails to interrupt time.sleep() call on Python 3.6 -> SIGALRM fails to interrupt time.sleep() call on Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 23:07:53 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 18 Oct 2016 03:07:53 +0000 Subject: [issue27659] Check for the existence of crypt() In-Reply-To: <1469948678.43.0.816389049938.issue27659@psf.upfronthosting.co.za> Message-ID: <1476760073.37.0.294383252002.issue27659@psf.upfronthosting.co.za> Martin Panter added the comment: If there is an obscure platform where we don?t include the right header file for a function, changing the warning into an error would cause the build to fail. If we do make it an error, it should only be so for 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 23:11:28 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 18 Oct 2016 03:11:28 +0000 Subject: [issue28465] python 3.5 magic number In-Reply-To: <1476750546.36.0.931772637731.issue28465@psf.upfronthosting.co.za> Message-ID: <1476760288.85.0.0429750284587.issue28465@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi. imp.get_magic() is deprecated since 3.4, see the documentation here https://docs.python.org/3/library/imp.html?highlight=get_magic#imp.get_magic You should use importlib.util.MAGIC_NUMBER instead. Please try it. Thanks. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 23:16:43 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 18 Oct 2016 03:16:43 +0000 Subject: [issue28466] SIGALRM fails to interrupt time.sleep() call on Python 3.5 In-Reply-To: <1476759142.75.0.333626760319.issue28466@psf.upfronthosting.co.za> Message-ID: <1476760603.81.0.902934975894.issue28466@psf.upfronthosting.co.za> Martin Panter added the comment: This is by design; see PEP 475, and the documentation . If you make your signal handler raise an exception, it will interrupt the sleep() call most of the time. But if the signal happens to be received just before the sleep() call is about to be entered, the handler will only be run when the underlying OS sleep() call returns 10 s later. ---------- nosy: +martin.panter resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 23:18:00 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Oct 2016 03:18:00 +0000 Subject: [issue27931] Email parse IndexError <""@wiarcom.com> In-Reply-To: <1472743779.07.0.918992764498.issue27931@psf.upfronthosting.co.za> Message-ID: <1476760680.63.0.191013870754.issue27931@psf.upfronthosting.co.za> Xiang Zhang added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 23:58:21 2016 From: report at bugs.python.org (Tim Mitchell) Date: Tue, 18 Oct 2016 03:58:21 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476763101.5.0.375481638844.issue26240@psf.upfronthosting.co.za> Tim Mitchell added the comment: Have stripped down the module __doc__ to a list of contents. I chose to indent the descriptions of each argument to Popen. I know this is non-standard but it is such a long ramble otherwise. Changed true -> :const:`True` in subprocess.rst. ---------- keywords: +patch nosy: +tim.mitchell Added file: http://bugs.python.org/file45126/subprocess-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 00:59:55 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 18 Oct 2016 04:59:55 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476766795.06.0.302425382896.issue26240@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: needs patch -> patch review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 01:20:00 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 18 Oct 2016 05:20:00 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476768000.43.0.180830356198.issue26240@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, Tim. > Changed true -> :const:`True` in subprocess.rst. This is out of scope for this issue and I actually prefer the current form. Having method and class signatures in subprocess.__doc__ would make it less maintainable. I'd prefer having a short docstring that describes what the modules does, and what its modern API look like. I don't think we should duplicate documentation of CalledProcessError, TimeoutExpired and Popen in their docstrings. Perhaps it would be better to just document which parameters are POSIX only. Also, did you use the GitHub mirror to create the patch? If so, please use the official Mercurial repository: https://docs.python.org/devguide/setup.html#checkout Rietveld doesn't like patches created from the git repository so it was a bit hard to review the patch without using Rietveld. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 01:25:36 2016 From: report at bugs.python.org (Antony Lee) Date: Tue, 18 Oct 2016 05:25:36 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476768336.89.0.418515588182.issue26240@psf.upfronthosting.co.za> Changes by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 01:32:04 2016 From: report at bugs.python.org (Eryk Sun) Date: Tue, 18 Oct 2016 05:32:04 +0000 Subject: [issue28462] subprocess pipe can't see EOF from a child in case of a few children run with subprocess In-Reply-To: <1476718684.05.0.447400261666.issue28462@psf.upfronthosting.co.za> Message-ID: <1476768724.88.0.580433143493.issue28462@psf.upfronthosting.co.za> Eryk Sun added the comment: Due to a race condition, the Popen call in the second process is inadvertently inheriting the handle for the write end of the pipe that's created for the first process. Thus stdout.readline() in the first thread doesn't see EOF until that handle is closed. For the 2nd process, since you don't need to inherit standard handles, you can pass close_fds=True. In general if you do need to inherit standard handles in processes that are created concurrently, you can synchronize on a lock to ensure Popen properly closes inheritable handles. For example: import threading import subprocess class Popen(subprocess.Popen): _execute_lock = threading.Lock() def __init__(self, *args, **kwds): with self._execute_lock: super(Popen, self).__init__(*args, **kwds) In Python 3 this should be addressed by implementing the suggestion in issue 19764 to use PROC_THREAD_ATTRIBUTE_HANDLE_LIST. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 01:49:01 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 18 Oct 2016 05:49:01 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows In-Reply-To: <1476497368.18.0.628065389536.issue28448@psf.upfronthosting.co.za> Message-ID: <1476769741.79.0.947224172536.issue28448@psf.upfronthosting.co.za> INADA Naoki added the comment: https://github.com/search?p=3&q=_schedule_callbacks&type=Code&utf8=%E2%9C%93 At least, Future class in uvloop have same API. Most of other results seems just copy of Python source tree. (But I didn't check all search result) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 03:36:23 2016 From: report at bugs.python.org (John Taylor) Date: Tue, 18 Oct 2016 07:36:23 +0000 Subject: [issue28467] Installer should be a 64-bit executable Message-ID: <1476776183.18.0.489973027211.issue28467@psf.upfronthosting.co.za> New submission from John Taylor: The python-3.6.0b2-amd64.exe binary installs the 64-bit version of python, but the binary itself is only 32-bit. I would like this to be a 64-bit binary so that Python can easily be installed on Windows Server 2016 Nano Server. Since this OS version will only execute 64-bit binaries, Python can not be installed even with the /quiet option. Ideally, I would like to be able to install Python with this command: python-3.6.0b2-amd64.exe /quiet targetdir=C:\Python36 ---------- components: Installation messages: 278844 nosy: jftuga priority: normal severity: normal status: open title: Installer should be a 64-bit executable type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 03:42:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 07:42:39 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1476776559.95.0.539528426051.issue28385@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Removed item 3 from updated patch. ---------- Added file: http://bugs.python.org/file45127/object-__format__-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 03:44:28 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 07:44:28 +0000 Subject: [issue28467] Installer should be a 64-bit executable In-Reply-To: <1476776183.18.0.489973027211.issue28467@psf.upfronthosting.co.za> Message-ID: <1476776668.87.0.713670565707.issue28467@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- assignee: -> zach.ware nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 03:44:54 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 07:44:54 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1476776694.6.0.0440743338367.issue28385@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 03:51:09 2016 From: report at bugs.python.org (Wolfgang Maier) Date: Tue, 18 Oct 2016 07:51:09 +0000 Subject: [issue28115] Use argparse for the zipfile module In-Reply-To: <1473750423.74.0.95052105427.issue28115@psf.upfronthosting.co.za> Message-ID: <1476777069.49.0.0870854408004.issue28115@psf.upfronthosting.co.za> Changes by Wolfgang Maier : ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 03:53:46 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 07:53:46 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1476777226.39.0.359764379313.issue28385@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >From msg214162: > This is basically the definition of object.__format__: > > def __format__(self, specifier): > if len(specifier) == 0: > return str(self) > raise TypeError('non-empty format string passed to object.__format__') This simple algorithm is implemented in object-__format__.patch. But current implementation uses ``format(str(self), '')`` instead of just ``str(self)``. object-__format__-2.patch keeps this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 04:07:14 2016 From: report at bugs.python.org (Eryk Sun) Date: Tue, 18 Oct 2016 08:07:14 +0000 Subject: [issue28467] Installer should be a 64-bit executable In-Reply-To: <1476776183.18.0.489973027211.issue28467@psf.upfronthosting.co.za> Message-ID: <1476778034.51.0.719756292423.issue28467@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 04:47:38 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Oct 2016 08:47:38 +0000 Subject: [issue28468] Add platform.linux_os_release() Message-ID: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> New submission from Christian Heimes: #1322 has deprecated platform.linux_distribution(). The feature is going to be removed without replacement functions in the stdlib. It's no longer possible to detect the Linux distribution from stdlib. Let's add a function to read /etc/os-release [1] instead. It's a very simple format and pretty standard for many years. [1] http://0pointer.de/blog/projects/os-release ---------- components: Library (Lib) messages: 278847 nosy: christian.heimes priority: normal severity: normal stage: test needed status: open title: Add platform.linux_os_release() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 05:11:59 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 18 Oct 2016 09:11:59 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows In-Reply-To: <1476497368.18.0.628065389536.issue28448@psf.upfronthosting.co.za> Message-ID: <1476781919.82.0.65736114138.issue28448@psf.upfronthosting.co.za> INADA Naoki added the comment: > I'm not so sure about this. Maybe we can just fix _WaitCancelFuture somehow? @haypo, do you know why _WaitCancelFuture overrides _schedule_callbacks() instead of self.add_done_callback(self._unregister_wait_cb)? _unregister_wait_cb must be called after all callbacks are called? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 05:18:48 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 09:18:48 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476782328.46.0.555626924953.issue28468@psf.upfronthosting.co.za> St?phane Wirtel added the comment: and for the older distributions without Systemd ? What do you suggest ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 05:20:40 2016 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 18 Oct 2016 09:20:40 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476782440.9.0.956433249899.issue28468@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Also there is an external project now aiming to provide this functionality: https://github.com/nir0s/distro ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 05:51:30 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Oct 2016 09:51:30 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476784290.45.0.560761435833.issue28468@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm not suggesting a generic platform detection function but rather a limited function just for os-release. On platforms without /etc/os-release the function should obviously fail and raise an exception. /etc/os-release is available on distributions without systemd. Even my oldest Debian installation on a Raspberry Pi has it. A large majority of Linux distributions has the file. It's available on Debian, Fedora, RHEL 6+, Ubuntu 14.04+ and many more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 06:28:40 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 10:28:40 +0000 Subject: [issue23782] Leak in _PyTraceback_Add In-Reply-To: <1427365502.47.0.105321888995.issue23782@psf.upfronthosting.co.za> Message-ID: <20161018102834.11827.16778.08DCC8B5@psf.io> Roundup Robot added the comment: New changeset 6b3be9f38f2a by Serhiy Storchaka in branch '3.5': Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception https://hg.python.org/cpython/rev/6b3be9f38f2a New changeset 2d352bf2b228 by Serhiy Storchaka in branch '3.6': Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception https://hg.python.org/cpython/rev/2d352bf2b228 New changeset 83877018ef97 by Serhiy Storchaka in branch 'default': Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception https://hg.python.org/cpython/rev/83877018ef97 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 06:32:08 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 10:32:08 +0000 Subject: [issue23782] Leak in _PyTraceback_Add In-Reply-To: <1427365502.47.0.105321888995.issue23782@psf.upfronthosting.co.za> Message-ID: <1476786728.8.0.971309562053.issue23782@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 06:55:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 10:55:39 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476788139.26.0.620199967116.issue28410@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45128/_PyErr_FormatFromCause-3.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 07:19:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 11:19:36 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1476789576.0.0.640995841121.issue28214@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch uses C API added in issue28410. It preserves the traceback of original exception: Traceback (most recent call last): File "issue28214.py", line 3, in __set_name__ 1/0 ZeroDivisionError: division by zero The above exception was the direct cause of the following exception: Traceback (most recent call last): File "issue28214.py", line 5, in class TheoreticallyCouldWork: RuntimeError: Error calling __set_name__ on 'FaultyImplementation' instance 'attr' in 'TheoreticallyCouldWork' ---------- Added file: http://bugs.python.org/file45129/set_name_chain_error_cause_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 07:30:50 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 11:30:50 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1476790250.09.0.109299777757.issue28214@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Serhiy, I don't find the _PyErr_FormatFromCause function in the code of CPython. Modules/_tracemalloc.o Modules/hashtable.o Modules/symtablemodule.o Modules/xxsubtype.o -lpthread -ldl -lutil -lm Objects/typeobject.o: In function `set_names': /home/stephane/src/python/cpython/Objects/typeobject.c:7026: undefined reference to `_PyErr_FormatFromCause' collect2: error: ld returned 1 exit status Makefile:736: recipe for target 'Programs/_freeze_importlib' failed make: *** [Programs/_freeze_importlib] Error 1 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 07:53:35 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 11:53:35 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476791615.05.0.954079333649.issue19795@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45130/doc_none3-3.6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 07:54:03 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 11:54:03 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476791643.13.0.330021681201.issue19795@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45131/doc_none3-3.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 07:55:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 11:55:21 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1476791721.68.0.320324326217.issue28214@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: First apply the patch from issue28410. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:12:33 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 12:12:33 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1476792753.44.0.39509184303.issue28214@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Serhiy, I have a failed test with test_capi. I have applied the patch from #28410 and set_name_chain_error_cause_2.patch. stephane at sg1 ~/s/p/cpython> ./python -m test test_capi Run tests sequentially 0:00:00 [1/1] test_capi test test_capi failed -- Traceback (most recent call last): File "/home/stephane/src/python/cpython/Lib/test/test_capi.py", line 221, in test_return_result_with_error br'Fatal Python error: a function returned a ' AssertionError: Regex didn't match: b'Fatal Python error: a function returned a result with an error set\\nValueError\\n\\nDuring handling of the above exception, another exception occurred:\\n\\nSystemError: returned a result with an error set\\n\\nCurrent thread.*:\\n File .*, line 6 in ' not found in b'Fatal Python error: a function returned a result with an error set\nValueError\n\nThe above exception was the direct cause of the following exception:\n\nSystemError: returned a result with an error set\n\nCurrent thread 0x00007f5c560c3700 (most recent call first):\n File "", line 6 in ' test_capi failed 1 test failed: test_capi Total duration: 6 sec Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:14:46 2016 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 18 Oct 2016 12:14:46 +0000 Subject: [issue27838] test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot In-Reply-To: <1471959658.26.0.0626423066304.issue27838@psf.upfronthosting.co.za> Message-ID: <1476792886.39.0.948360052741.issue27838@psf.upfronthosting.co.za> Kubilay Kocak added the comment: Ping. All branches on the koobs-freebsd-current buildbot are still failing due to this issue I could recreate the entire worker environment from scratch, but: a) I'm not sure it will resolve the issue b) I'd rather fix the root cause ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:31:17 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 12:31:17 +0000 Subject: [issue28208] update sqlite to 3.14.2 In-Reply-To: <1474317408.19.0.662096879681.issue28208@psf.upfronthosting.co.za> Message-ID: <1476793877.94.0.65775226193.issue28208@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Maybe we could merge the patch of Mariatta and close this issue. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:32:07 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 12:32:07 +0000 Subject: [issue28248] Upgrade installers to OpenSSL 1.0.2j In-Reply-To: <1474552584.95.0.0318594270303.issue28248@psf.upfronthosting.co.za> Message-ID: <1476793927.97.0.346589230955.issue28248@psf.upfronthosting.co.za> St?phane Wirtel added the comment: @zach maybe we can close this issue if you have updated openssl ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:33:25 2016 From: report at bugs.python.org (Matthias Klose) Date: Tue, 18 Oct 2016 12:33:25 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476794005.83.0.991906566367.issue28468@psf.upfronthosting.co.za> Matthias Klose added the comment: -1 This is not available everywhere, not even on Linux distributions. Why would you implement something which only works on 50% of existing Linux distributions? Who would even use that? And for what would you use it? You have a distro module available now from PyPi, you can use that one instead, and it gives 100% correct results for all currently known distros, and can be updated independent of Python releases. If it's that a simple function, then please implement it for your own needs. I think it's bad style too, to rely on specific distro and release information instead of checking release names and versions. Such a style should not be encouraged in the standard lib from my point of view. ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:37:21 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 12:37:21 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476794241.84.0.382759889326.issue28468@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you elaborate the expected API? /etc/os-release is not a single line, but a list of variables. Example on my Fedora 24: --- $ cat /etc/os-release NAME=Fedora VERSION="24 (Workstation Edition)" ID=fedora VERSION_ID=24 PRETTY_NAME="Fedora 24 (Workstation Edition)" ANSI_COLOR="0;34" CPE_NAME="cpe:/o:fedoraproject:fedora:24" HOME_URL="https://fedoraproject.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=24 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=24 PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy VARIANT="Workstation Edition" VARIANT_ID=workstation --- I think that you should return a dictionary key=>value. Maybe we can simply return an empty dictionary if the file doesn't exist or cannot be read (but raise an error on parsing error). FYI On Fedora 24, /etc/os-release is in fact a symbolic link to a symbolic link: --- $ ls -l /etc/os-release lrwxrwxrwx. 1 root root 21 24 juin 03:25 /etc/os-release -> ../usr/lib/os-release $ ls -l /usr/lib/os-release lrwxrwxrwx. 1 root root 37 13 sept. 09:51 /usr/lib/os-release -> ./os.release.d/os-release-workstation $ ls -l /usr/lib/os.release.d/os-release-workstation -rw-r--r--. 1 root root 518 24 juin 03:25 /usr/lib/os.release.d/os-release-workstation --- See also systemd manual page: https://www.freedesktop.org/software/systemd/man/os-release.html ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:39:22 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 12:39:22 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476794362.98.0.485482566579.issue28468@psf.upfronthosting.co.za> STINNER Victor added the comment: "This is not available everywhere, not even on Linux distributions. Why would you implement something which only works on 50% of existing Linux distributions?" According to http://0pointer.de/blog/projects/os-release systemd requires /etc/os-release. Since all major Linux distribution now use systemd, it makes sense to me to add such function. We can document that the feature is specific to Linux (or don't declare the function on Linux?), document that it only works on recent versions of Linux distributions, and document that it doesn't work on all Linux distributions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:41:59 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Oct 2016 12:41:59 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476794519.41.0.000997715549497.issue28468@psf.upfronthosting.co.za> Christian Heimes added the comment: Please read the title of this issue. It is "Add platform.linux_os_release()". The name of the function clearly indicats that the function only works on Linux with a os-release file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:42:49 2016 From: report at bugs.python.org (Matthias Klose) Date: Tue, 18 Oct 2016 12:42:49 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476794569.84.0.440501934802.issue28468@psf.upfronthosting.co.za> Matthias Klose added the comment: "Since all major Linux distribution now use systemd, it makes sense to me to add such function." I'm not aware of any embedded Linux distro using systemd (no, I don't consider Raspian an embedded Linux distro). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:44:32 2016 From: report at bugs.python.org (Matthias Klose) Date: Tue, 18 Oct 2016 12:44:32 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476794672.3.0.951615916666.issue28468@psf.upfronthosting.co.za> Matthias Klose added the comment: "The name of the function clearly indicats that the function only works on Linux with a os-release file." No, it does not. That would be linux_distribution_with_os_release_file(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:45:20 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 18 Oct 2016 12:45:20 +0000 Subject: [issue28467] Installer should be a 64-bit executable In-Reply-To: <1476776183.18.0.489973027211.issue28467@psf.upfronthosting.co.za> Message-ID: <1476794720.58.0.645213336425.issue28467@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- assignee: zach.ware -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:54:29 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 18 Oct 2016 12:54:29 +0000 Subject: [issue28248] Upgrade installers to OpenSSL 1.0.2j In-Reply-To: <1474552584.95.0.0318594270303.issue28248@psf.upfronthosting.co.za> Message-ID: <1476795269.27.0.140555092039.issue28248@psf.upfronthosting.co.za> Zachary Ware added the comment: The Mac installer still needs to be updated, which is Ned's department. ---------- assignee: -> ned.deily stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 08:55:07 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 12:55:07 +0000 Subject: [issue28248] Upgrade installers to OpenSSL 1.0.2j In-Reply-To: <1474552584.95.0.0318594270303.issue28248@psf.upfronthosting.co.za> Message-ID: <1476795307.34.0.60529749093.issue28248@psf.upfronthosting.co.za> St?phane Wirtel added the comment: ok, thank you Zach for this comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:01:07 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Oct 2016 13:01:07 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476795667.63.0.816507872273.issue28468@psf.upfronthosting.co.za> R. David Murray added the comment: I hate systemd. So does the company I'm currently doing most of my work for. We're using centos6 because it doesn't have systemd. I personally use gentoo without systemd. That said, I don't use the platform module, so this doesn't actually affect me. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:04:18 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Oct 2016 13:04:18 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476795858.09.0.959292975031.issue28468@psf.upfronthosting.co.za> Christian Heimes added the comment: ETOOMUCHBIKESHEDDING and another uncalled systemd flame wars. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:04:38 2016 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 18 Oct 2016 13:04:38 +0000 Subject: [issue27838] test_os.test_chown() failure on koobs-freebsd-current In-Reply-To: <1471959658.26.0.0626423066304.issue27838@psf.upfronthosting.co.za> Message-ID: <1476795878.48.0.481816235496.issue27838@psf.upfronthosting.co.za> Kubilay Kocak added the comment: All builders (branches) are failing, not just 3.x DEBUG. Failures also appear no longer random or intermittent ---------- title: test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot -> test_os.test_chown() failure on koobs-freebsd-current _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:07:22 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 13:07:22 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476796042.46.0.204057967828.issue28468@psf.upfronthosting.co.za> St?phane Wirtel added the comment: We need a fallback in the case where /etc/os-release does not exists, or just use hasattr on `platform` if hasattr(platform, 'linux_os_release'): print(platform.linux_os_release()) else: ... or just raise an exception if platform.linux_os_release is not available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:10:35 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Oct 2016 13:10:35 +0000 Subject: [issue28467] Installer should be a 64-bit executable In-Reply-To: <1476776183.18.0.489973027211.issue28467@psf.upfronthosting.co.za> Message-ID: <1476796235.23.0.321454675403.issue28467@psf.upfronthosting.co.za> Steve Dower added the comment: Last time I spoke with the Nano Server team (admittedly this was 6-12 months ago) they had no plans to support MSI at all. Even though our installer is an exe, under the covers it is installing MSIs. We discussed this and decided the best approach would be to install locally and then copy the install directory, as Nano Server already includes all the required dependencies. There are also packages on nuget that can install Python that should work fine. However, as I'm a little out of date, please let me know if Nano Server has actually added support for MSIs and I can look into it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:13:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 13:13:17 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476796397.42.0.872846102249.issue28410@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed error message in tests. ---------- Added file: http://bugs.python.org/file45132/_PyErr_FormatFromCause-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:13:41 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Oct 2016 13:13:41 +0000 Subject: [issue28468] Add platform.linux_os_release() In-Reply-To: <1476780458.76.0.0265588591799.issue28468@psf.upfronthosting.co.za> Message-ID: <1476796421.29.0.667078509259.issue28468@psf.upfronthosting.co.za> R. David Murray added the comment: Sorry, it wasn't my intent to (re)start a flame war, just to point out that there are linux platforms in wide use that do not support systemd. But I don't have an opinion on whether or not adding this function is a good idea or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:14:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 13:14:24 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1476796464.67.0.275356775192.issue28214@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for testing St?phane. Ignore this failure, the test should be fixed by updated patch in issue28410. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:21:24 2016 From: report at bugs.python.org (John Taylor) Date: Tue, 18 Oct 2016 13:21:24 +0000 Subject: [issue28467] Installer should be a 64-bit executable In-Reply-To: <1476776183.18.0.489973027211.issue28467@psf.upfronthosting.co.za> Message-ID: <1476796884.92.0.656160930154.issue28467@psf.upfronthosting.co.za> John Taylor added the comment: python-3.6.0b2-embed-amd64.zip will load the interpreter as is easy to install. The Python Embedded Distribution documentation mentions needing ucrtbase.dll, which is already installed on Nano Server. One small pain point is that ctrl-z seems to exit/suspend the docker container and drop you back to the host. Under the normal, non-embedded python, you can just run exit() to quit the interpreter. Since this option is not available under the embedded version, you have to import sys; sys.exit() to quit the interpreter under Nano Server. Also, there is no pip.exe. Thank you for the information regarding MSI which I was not aware of. Upon further consideration, I believe this issue can be closed because the embedded distribution works on Nano Server. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:49:03 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 13:49:03 +0000 Subject: [issue27896] Allow passing sphinx options to Doc/Makefile In-Reply-To: <1472573019.01.0.777773652271.issue27896@psf.upfronthosting.co.za> Message-ID: <20161018134859.16906.7474.0C1476D5@psf.io> Roundup Robot added the comment: New changeset 87aced4a9cf5 by Victor Stinner in branch '3.5': Issue #27896: Allow passing sphinx options to Doc/Makefile https://hg.python.org/cpython/rev/87aced4a9cf5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:49:22 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 13:49:22 +0000 Subject: [issue27896] Allow passing sphinx options to Doc/Makefile In-Reply-To: <1472573019.01.0.777773652271.issue27896@psf.upfronthosting.co.za> Message-ID: <20161018134920.38659.18509.E4860829@psf.io> Roundup Robot added the comment: New changeset 3b22c99535d0 by Victor Stinner in branch '2.7': Issue #27896: Allow passing sphinx options to Doc/Makefile https://hg.python.org/cpython/rev/3b22c99535d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:50:40 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 18 Oct 2016 13:50:40 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476798640.64.0.342293908301.issue28410@psf.upfronthosting.co.za> Nick Coghlan added the comment: The patch looks good to me Serhiy, but I don't think it makes sense to apply this to 3.5 - it touches quite a few places in the code, and there's no reason to risk introducing a regression into a 3.5 maintenance release for a pure maintainer convenience function. Adding it to 3.6+ will be sufficient to help resolve issue 28214. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:56:57 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 18 Oct 2016 13:56:57 +0000 Subject: [issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions In-Reply-To: <1420687041.12.0.12728944273.issue23188@psf.upfronthosting.co.za> Message-ID: <1476799017.63.0.017634254095.issue23188@psf.upfronthosting.co.za> Nick Coghlan added the comment: Via issue 28410, Serhiy is adding a private "_PyErr_FormatFromCause" helper API to make explicit C level exception chaining easier within the implementation of CPython (this helps resolve issue 28214, an exception reporting problem in the new PEP 487 __set_name__ feature). It may be sufficient to make that API public, and use that as the home of documentation for some of the subtleties discussed here. ---------- versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:59:19 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 13:59:19 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows In-Reply-To: <1476781919.82.0.65736114138.issue28448@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: INADA Naoki added the comment: > @haypo, do you know why _WaitCancelFuture overrides _schedule_callbacks() instead > of self.add_done_callback(self._unregister_wait_cb)? > _unregister_wait_cb must be called after all callbacks are called? Oh no. I tried to forget this mess :-( It took me 2 or 3 months to understand and fix this complex issue of cancelling a wait on Windows... Hum, let me check. I found this in IocpProactor: --- def _wait_cancel(self, event, done_callback): fut = self._wait_for_handle(event, None, True) # add_done_callback() cannot be used because the wait may only complete # in IocpProactor.close(), while the event loop is not running. fut._done_callback = done_callback return fut --- I don't understand my comment anymore /o\ I just recall that it was complex to get this crap working in all cases, especially in corner cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 10:08:59 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 14:08:59 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476799739.28.0.668585062198.issue28410@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have read and executed the tests and for me the patch is good. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 10:32:07 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 14:32:07 +0000 Subject: [issue28256] Cleanup Modules/_math.c In-Reply-To: <1474624762.76.0.457189926802.issue28256@psf.upfronthosting.co.za> Message-ID: <20161018143203.16841.67238.D0F1BC92@psf.io> Roundup Robot added the comment: New changeset 8999d702ac29 by Victor Stinner in branch 'default': Issue #28256: Cleanup _math.c https://hg.python.org/cpython/rev/8999d702ac29 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 10:33:01 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 14:33:01 +0000 Subject: [issue28256] Cleanup Modules/_math.c In-Reply-To: <1474624762.76.0.457189926802.issue28256@psf.upfronthosting.co.za> Message-ID: <1476801181.57.0.070031419832.issue28256@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the review Serhiy and Christian, it seems like a review was needed :-D I pushed my fix to Python 3.7. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 10:42:55 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 14:42:55 +0000 Subject: [issue28293] Don't completely dump the regex cache when full In-Reply-To: <1475038169.86.0.21816130335.issue28293@psf.upfronthosting.co.za> Message-ID: <1476801775.82.0.259112317094.issue28293@psf.upfronthosting.co.za> STINNER Victor added the comment: Can't we redesign the function to reuse @functools.lru_cache(_MAXCACHE) but take care of the debug flag? For example, split the function in smaller parts. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 10:45:19 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 14:45:19 +0000 Subject: [issue28340] [py2] TextIOWrapper.tell extremely slow In-Reply-To: <1475423487.6.0.338998508065.issue28340@psf.upfronthosting.co.za> Message-ID: <1476801919.12.0.694296448489.issue28340@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: TextIOWrapper.tell extremely slow -> [py2] TextIOWrapper.tell extremely slow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 10:49:02 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 14:49:02 +0000 Subject: [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal In-Reply-To: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> Message-ID: <1476802142.21.0.548332753687.issue28383@psf.upfronthosting.co.za> STINNER Victor added the comment: hash(tuple of attributes) is what I'm using in all my projects. Here is a patch for the doc. ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file45133/hash_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 10:50:27 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Oct 2016 14:50:27 +0000 Subject: [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal In-Reply-To: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> Message-ID: <1476802227.33.0.38477954177.issue28383@psf.upfronthosting.co.za> Christian Heimes added the comment: ACK! ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:00:16 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 15:00:16 +0000 Subject: [issue15369] pybench and test.pystone poorly documented In-Reply-To: <1342446105.53.0.956340794171.issue15369@psf.upfronthosting.co.za> Message-ID: <1476802816.36.0.414219269379.issue15369@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm closing the issue again. Again, pybench moved to http://github.com/python/performance : please continue the discussion there if you consider that we still need to do something on pybench. FYI I reworked deeply pybench recently using the new perf 0.8 API. perf 0.8 now supports running multiple benchmarks per script, so pybench was written as only a benchmark runner. Comparison between benchmarks can be done using performance, or directly using perf (python3 -m perf compare a.json b.json). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:03:11 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 15:03:11 +0000 Subject: [issue26436] Add the regex-dna benchmark In-Reply-To: <1456402657.17.0.694301948635.issue26436@psf.upfronthosting.co.za> Message-ID: <1476802991.61.0.0214116731033.issue26436@psf.upfronthosting.co.za> STINNER Victor added the comment: I created https://github.com/python/performance/issues/15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:14:28 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 15:14:28 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <20161018151423.32885.11002.C3E6FB4E@psf.io> Roundup Robot added the comment: New changeset 3aba5552b976 by Victor Stinner in branch 'default': timeit: start autorange with 1 iteration, not 10 https://hg.python.org/cpython/rev/3aba5552b976 New changeset 2dafb2f3e7ff by Victor Stinner in branch 'default': timeit: change default repeat to 5, instead of 3 https://hg.python.org/cpython/rev/2dafb2f3e7ff ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:19:40 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 15:19:40 +0000 Subject: [issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return In-Reply-To: <1473760278.9.0.335020145509.issue28123@psf.upfronthosting.co.za> Message-ID: <1476803980.34.0.931044139281.issue28123@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- assignee: -> haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:21:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 15:21:13 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <20161018152048.18103.96097.7CF9B97D@psf.io> Roundup Robot added the comment: New changeset 975df4c13db6 by Victor Stinner in branch 'default': timeit: remove --clock and --time options https://hg.python.org/cpython/rev/975df4c13db6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:23:47 2016 From: report at bugs.python.org (Steve Newcomb) Date: Tue, 18 Oct 2016 15:23:47 +0000 Subject: [issue11632] difflib.unified_diff loses context In-Reply-To: <1300788570.13.0.524020554804.issue11632@psf.upfronthosting.co.za> Message-ID: <1476804227.57.0.282389053953.issue11632@psf.upfronthosting.co.za> Steve Newcomb added the comment: Context reporting is still buggy in Python 3.5.2: >>> [ x for x in difflib.unified_diff( "'on'\n", "'on'\n\n\n")] ['--- \n', '+++ \n', '@@ -3,3 +3,5 @@\n', ' n', " '", ' \n', '+\n', '+\n'] >>> import sys >>> sys.version '3.5.2 (default, Sep 10 2016, 08:21:44) \n[GCC 5.4.0 20160609]' >>> (compiled under Ubuntu 16.04.1 LTS) ---------- nosy: +steve.newcomb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:31:48 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 15:31:48 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476804708.0.0.605764787446.issue28410@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:32:24 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 15:32:24 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1476804744.98.0.994925879456.issue28214@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:52:39 2016 From: report at bugs.python.org (Emanuel Barry) Date: Tue, 18 Oct 2016 15:52:39 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476805959.16.0.491261600062.issue28410@psf.upfronthosting.co.za> Emanuel Barry added the comment: I see the function is private; is there any concern with extending the PyErr_* API? I think it'd make sense to expose it, since it's a convenient way to do in C what can already be done easily in Python, but I don't actually have a good reason :) Other than this small nitpick, this LGTM. (Alternatively, we can keep it private for 3.6 and revise that decision for 3.7) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:57:06 2016 From: report at bugs.python.org (Mariusz Masztalerczuk) Date: Tue, 18 Oct 2016 15:57:06 +0000 Subject: [issue28463] Email long headers parsing/serialization In-Reply-To: <1476724139.73.0.82516539768.issue28463@psf.upfronthosting.co.za> Message-ID: <1476806226.42.0.398115343508.issue28463@psf.upfronthosting.co.za> Mariusz Masztalerczuk added the comment: I think that it is not bug. It is just rfc ;) Due to https://www.ietf.org/rfc/rfc2822.txt, A message consists of header fields, optionally followed by a message body. Lines in a message MUST be a maximum of 998 characters excluding the CRLF, but it is RECOMMENDED that lines be limited to 78 characters excluding the CRLF Because you have the line with the size more then 78 chars (the header + value), the python is trying to break this line into two. Maybe there should be option to increase this value to something more then 78? (because max is 998 due to rfc) ---------- nosy: +mmasztalerczuk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 11:59:37 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 15:59:37 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <20161018155931.12089.58981.D2081694@psf.io> Roundup Robot added the comment: New changeset 4d611957732b by Victor Stinner in branch 'default': timeit: enhance format of raw timings (in verbose mode) https://hg.python.org/cpython/rev/4d611957732b New changeset c3a93069111d by Victor Stinner in branch 'default': timeit: add nsec (nanosecond) unit for format timings https://hg.python.org/cpython/rev/c3a93069111d New changeset 40e97c9dae7a by Victor Stinner in branch 'default': timeit: add newlines to output for readability https://hg.python.org/cpython/rev/40e97c9dae7a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:02:37 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 16:02:37 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1476806557.97.0.520904983871.issue28240@psf.upfronthosting.co.za> STINNER Victor added the comment: Steven D'Aprano: >> * Don't disable the garbage collector anymore! Disabling the GC is not >> fair: real applications use it. > But that's just adding noise: you're not timing code snippet, you're timing code snippet plus garbage collector. > > I disagree with this change, although I would accept it if there was an optional flag to control the gc. IMO it's a lie to display the minimum timing with the garbage collector disabled. The garbage collector is enabled in all applications. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:05:06 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 16:05:06 +0000 Subject: [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476806706.62.0.551796058378.issue26010@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have reviewed your patch, but could you add the doc for CO_ASYNC_GENERATOR ? Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:05:44 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 16:05:44 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1476806744.98.0.73628737143.issue28240@psf.upfronthosting.co.za> STINNER Victor added the comment: Steven D'Aprano: >> * Display large number of loops as power of 10 for readability, ex: >> "10^6" instead of "1000000". Also accept "10^6" syntax for the --num >> parameter. > > Shouldn't we use 10**6 or 1e6 rather than bitwise XOR? :-) Hum, with "10**6" syntax, I see a risk of typo: "10*6" instead of "10**6". I don't know if the x^y syntax is common or not, but I like it. LaTeX uses it for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:13:11 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 16:13:11 +0000 Subject: [issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10 Message-ID: <1476807191.35.0.710869100873.issue28469@psf.upfronthosting.co.za> New submission from STINNER Victor: In the issue #28240, I changed the default repeat from 3 to 5 in timeit. Serhiy wrote (msg277157): "For now default timeit run takes from 0.8 to 8 sec. Adding yet 5 sec makes a user more angry." I propose to use powers to 2, instead of powers of 10, in timeit autorange to reduce the total duration of the microbenchmark. * Without the patch, the worst case: 4.0 * 6 = 24 seconds. * With the patch, the worst case is: 0.4 * 6 = 2.4 seconds * 6: autorange (1 iteration) + 5 repeatition * autorange uses a minimum of 200 ms, so the worst case is 200 ms * 10 before, or 200 ms * 2 after ---------- files: timeit_autorange_pow2.patch keywords: patch messages: 278899 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: timeit: use powers of 2 in autorange(), instead of powers of 10 type: performance versions: Python 3.7 Added file: http://bugs.python.org/file45134/timeit_autorange_pow2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:15:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 16:15:19 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476807319.68.0.506078983995.issue28410@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure about the function name. Does anybody want to suggest better name? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:16:12 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 16:16:12 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1476807372.44.0.282084132048.issue28240@psf.upfronthosting.co.za> STINNER Victor added the comment: > For now default timeit run takes from 0.8 to 8 sec. Adding yet 5 sec makes a user more angry. See the issue #28469 "timeit: use powers of 2 in autorange(), instead of powers of 10" for a simple fix to reduce the total duration of the worst case (reduce it to 2.4 seconds). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:17:08 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 16:17:08 +0000 Subject: [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476807428.65.0.346568557771.issue26010@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:18:35 2016 From: report at bugs.python.org (Maciej Fijalkowski) Date: Tue, 18 Oct 2016 16:18:35 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1476807515.66.0.718433580211.issue28240@psf.upfronthosting.co.za> Changes by Maciej Fijalkowski : ---------- nosy: -fijall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:20:15 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 18 Oct 2016 16:20:15 +0000 Subject: [issue28467] Installer should be a 64-bit executable In-Reply-To: <1476776183.18.0.489973027211.issue28467@psf.upfronthosting.co.za> Message-ID: <1476807615.8.0.374679607168.issue28467@psf.upfronthosting.co.za> Steve Dower added the comment: You can also modify the "python36._pth" file in the embedded distro to include "import site" if you want all the stuff that comes with that. The intent of the embeddable distribution is to be a private dependency of a larger application, where you typically won't want the site module. It is also intended to be a developer resource that is extracted by the dev, modified, and then put into another installer - it's not meant to be automatically extracted and used on a target machine. Modifying the ._pth file is therefore "acceptable" given the purpose. I've closed this as an issue. Hopefully I can convince the Nano Server guys to blog again (they did once before at https://blogs.msdn.microsoft.com/pythonengineering/2016/06/20/python-and-django-on-nano-server/) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:21:23 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 16:21:23 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1476807683.67.0.447996506339.issue28240@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy Storchaka: >> * autorange: start with 1 loop instead of 10 for slow benchmarks like time.sleep(1) > This is good if you run relatively slow benchmark, but it makes the result less reliable. You always can specify -n1, but on your own risk. Sorry, I don't understand how running 1 iteration instead of 10 makes the benchmark less reliable. IMO the reliability is more impacted by the number of repeatitions (-r). I changed the default from 3 to 5 repetitions, so timeit should be *more* reliable in Python 3.7 than 3.6. > Even "pass" takes at least 0.02 usec on my computer. What you want to measure that takes < 1 ns? I think timeit is just wrong tool for this. It's just a matter of formatting. IMO clocks have a precision good enough to display nanoseconds when the benchmark uses many iterations (which is the case by default since autorange uses a minimum of 200 ms per benchmark). Before: $ python3.6 -m timeit 'pass' 100000000 loops, best of 3: 0.0339 usec per loop After: $ python3.7 -m timeit 'pass' 10000000 loops, best of 5: 33.9 nsec per loop IMO "33.9" is more readable than "0.0339". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:22:45 2016 From: report at bugs.python.org (=?utf-8?b?0JrQvtC90YHRgtCw0L3RgtC40L0g0JLQvtC70LrQvtCy?=) Date: Tue, 18 Oct 2016 16:22:45 +0000 Subject: [issue28463] Email long headers parsing/serialization In-Reply-To: <1476724139.73.0.82516539768.issue28463@psf.upfronthosting.co.za> Message-ID: <1476807765.62.0.959180646863.issue28463@psf.upfronthosting.co.za> ?????????? ?????? added the comment: But message ID have its own syntax https://www.ietf.org/rfc/rfc2822.txt: 3.6.4. Identification fields message-id = "Message-ID:" msg-id CRLF msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS] 3.2.3. Folding white space and comments However, where CFWS occurs in this standard, it MUST NOT be inserted in such a way that any line of a folded header field is made up entirely of WSP characters and nothing else. Its not obvious, but it seems that there must be no CRLF symbol before MessageID. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:25:50 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 16:25:50 +0000 Subject: [issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10 In-Reply-To: <1476807191.35.0.710869100873.issue28469@psf.upfronthosting.co.za> Message-ID: <1476807950.43.0.905340300683.issue28469@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: "131072 loops" in a report looks not human friendly. I would prefer using a sequence of round numbers: 1, 2, 5, 10, 20, 50, 100, ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:27:02 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 16:27:02 +0000 Subject: [issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10 In-Reply-To: <1476807191.35.0.710869100873.issue28469@psf.upfronthosting.co.za> Message-ID: <1476808022.68.0.444089529833.issue28469@psf.upfronthosting.co.za> STINNER Victor added the comment: > "131072 loops" in a report looks not human friendly. In my perf module, I use 2^n syntax for numbers larger than 1024. Syntax accepted in command line arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:30:11 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 16:30:11 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1476808211.14.0.0541047715479.issue28240@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm disappointed by the discussion on minumum vs average. Using the perf module (python3 -m perf timeit), it's very easy to show that the average is more reliable than the minimum. The perf module runs 20 worker processes by default: with so many processes, it's easy to see that each process has a different timing because of random address space layout and the randomized Python hash function. Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-21 15:17 Serhiy: "This makes hard to compare results with older Python versions." Serhiy is right. I see two options: display average _and_ minimum (which can be confusing for users!) or display the same warning than PyPy: "WARNING: timeit is a very unreliable tool. use perf or something else for real measurements" But since I'm grumpy now, I will now just close the issue :-) I pushed enough changes to timeit for today ;-) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:46:41 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 16:46:41 +0000 Subject: [issue26436] Add the regex-dna benchmark In-Reply-To: <1456402657.17.0.694301948635.issue26436@psf.upfronthosting.co.za> Message-ID: <1476809201.03.0.0819651198818.issue26436@psf.upfronthosting.co.za> STINNER Victor added the comment: The performance project is now hosted on GitHub. I created a pull request from Serhiy's patch: https://github.com/python/performance/pull/17 So I now close this issue. Let's continue the discussion there. ---------- resolution: -> third party status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:49:07 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Oct 2016 16:49:07 +0000 Subject: [issue28463] Email long headers parsing/serialization In-Reply-To: <1476724139.73.0.82516539768.issue28463@psf.upfronthosting.co.za> Message-ID: <1476809347.5.0.473707884404.issue28463@psf.upfronthosting.co.za> R. David Murray added the comment: It is a bug, but it is not a bug that the message-id body gets put on a second line. The old (compat32) folder introduces an extra space while folding, which then gets preserved when the re-parsing is done. The new folder (policy=default) folds correctly (putting the id on a separate line), but the parser fails to remove the leading blank from the value when it is parsed. It should remove the leading blank because that blank "belongs" to the header label (the "Message-Id:" part). The RFC caution about whitespace only lines applies to whole lines; the first line in the present example is not blank because it has the header label on it. I also need to add a test with a Message-Id that is in itself longer than 77 characters. Such a header can't be folded, so it will have to be emitted with a length longer than the default. (And yes, the default can be changed to any value you like, see Policy.max_line_len). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:55:09 2016 From: report at bugs.python.org (Chris Byers) Date: Tue, 18 Oct 2016 16:55:09 +0000 Subject: [issue28470] configure.ac -g debug compiler option when not Py_DEBUG Message-ID: <1476809709.29.0.822288105247.issue28470@psf.upfronthosting.co.za> New submission from Chris Byers: The configure.ac file adds the "-g" debug compiler option to both debug and non-debug builds, so debug information is built for production builds. This seems likely a bug, unless there was a specific reason to do this. Around line 1480 of configure.ac: if test "$Py_DEBUG" = 'true' ; then # Optimization messes up debuggers, so turn it off for # debug builds. if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then OPT="-g -Og -Wall $STRICT_PROTO" else OPT="-g -O0 -Wall $STRICT_PROTO" fi else OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" fi The else case to the first statement (if test "$Py_DEBUG"...) should not contain -g should it? ---------- components: Build messages: 278910 nosy: Chris Byers priority: normal severity: normal status: open title: configure.ac -g debug compiler option when not Py_DEBUG versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:58:40 2016 From: report at bugs.python.org (Lisa Roach) Date: Tue, 18 Oct 2016 16:58:40 +0000 Subject: [issue28130] Document that time.tzset updates time module globals In-Reply-To: <1473782506.71.0.242774514927.issue28130@psf.upfronthosting.co.za> Message-ID: <1476809920.93.0.172431101521.issue28130@psf.upfronthosting.co.za> Lisa Roach added the comment: Will this simple update be enough? Or should more documentation be added for clarification? ---------- keywords: +patch nosy: +lisroach Added file: http://bugs.python.org/file45135/tzset_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 13:00:12 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 17:00:12 +0000 Subject: [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal In-Reply-To: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> Message-ID: <1476810012.08.0.839296948615.issue28383@psf.upfronthosting.co.za> STINNER Victor added the comment: Christian Heimes: > ACK! Does it mean that my patch LGTY? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 13:00:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 17:00:36 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1476810036.87.0.381329462598.issue28240@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Sorry, I don't understand how running 1 iteration instead of 10 makes the benchmark less reliable. IMO the reliability is more impacted by the number of repeatitions (-r). I changed the default from 3 to 5 repetitions, so timeit should be *more* reliable in Python 3.7 than 3.6. Caches. Not high-level caching that can make the measurement senseless, but low-level caching, for example memory caching, that can cause small difference (but this difference can be larger than the effect that you measure). On every repetition you first run a setup code, and then run testing code in loops. After the first loop the memory cache is filled with used data and next loops can be faster. On next repetition running a setup code can unload this data from the memory cache, and the next loop will need to load it back from slow memory. Thus on every repetition the first loop is slower that the followings. If you run 10 or 100 loops the difference can be negligible, but if run the only one loop, the result can differs on 10% or more. > $ python3.6 -m timeit 'pass' > 100000000 loops, best of 3: 0.0339 usec per loop This is a senseless example. 0.0339 usec is not a time of executing "pass", it is an overhead of the iteration. You can't use timeit for measuring the performance of the code that takes such small time. You just can't get the reliable result for it. Even for code that takes an order larger time the result is not very reliable. Thus no need to worry about timing much less than 1 usec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 13:03:58 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 17:03:58 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1476810036.87.0.381329462598.issue28240@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Serhiy Storchaka: > This is a senseless example. 0.0339 usec is not a time of executing "pass", it is an overhead of the iteration. You can't use timeit for measuring the performance of the code that takes such small time. You just can't get the reliable result for it. Even for code that takes an order larger time the result is not very reliable. Thus no need to worry about timing much less than 1 usec. I will not argue about the reliability of the timeit module. It's common to see code snippets using timeit for short microbenchmarks taking less than 1 us, especially on micro-optimization on CPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 13:04:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 17:04:07 +0000 Subject: [issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10 In-Reply-To: <1476807191.35.0.710869100873.issue28469@psf.upfronthosting.co.za> Message-ID: <1476810247.59.0.315617553434.issue28469@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The perf module doesn't report the number of loops by default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 13:07:42 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 17:07:42 +0000 Subject: [issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10 In-Reply-To: <1476807191.35.0.710869100873.issue28469@psf.upfronthosting.co.za> Message-ID: <1476810462.64.0.809667157375.issue28469@psf.upfronthosting.co.za> STINNER Victor added the comment: > The perf module doesn't report the number of loops by default. Right, it's hidden by default. I consider that it's not an useful information for end users. If you want more details (see the number of inner and outer loops), use --verbose ("python3 -m perf timeit -v ...") or the stats commands ("python3 -m perf stats file.json"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 13:08:10 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 17:08:10 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1476810490.32.0.578924243411.issue28240@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It may be worth to emit a warning in case of using timeit for too short code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 13:10:53 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 17:10:53 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1476810653.95.0.608299202489.issue28240@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: "It may be worth to emit a warning in case of using timeit for too short code." I suggest to simply warn users that timeit is not reliable at all :-) By the way, I close this issue, so I suggest you to open new issues if you want further enhancements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 13:15:12 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 17:15:12 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1476810036.87.0.381329462598.issue28240@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Serhiy Storchaka added the comment: >> Sorry, I don't understand how running 1 iteration instead of 10 makes the benchmark less reliable. IMO the reliability is more impacted by the number > Caches. Not high-level caching that can make the measurement senseless, but low-level caching, for example memory caching, that can cause small difference (but this difference can be larger than the effect that you measure). On every repetition you first run a setup code, and then run testing code in loops. After the first loop the memory cache is filled with used data and next loops can be faster. On next repetition running a setup code can unload this data from the memory cache, and the next loop will need to load it back from slow memory. Thus on every repetition the first loop is slower that the followings. If you run 10 or 100 loops the difference can be negligible, but if run the only one loop, the result can differs on 10% or more. It seems like you give a time budget of less than 20 seconds to timeit according to one of your previous message. IMO reliability is incompatible with quick timeit command. If you want a reliable benchmark, you need much more repetition than just 5. perf uses 20x(1+3) by default: it always run the benchmark once to "warmup" the benchmark, but ignore this timing. All parameters can be tuned on the command line (number of processes, warmups, samples, etc.). Well, I'm not really interested by timeit in the stdlib anymore since it seems to make significant enhancements without bikeshedding. So I let you revert my change if you consider that it makes timeit less reliable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 14:43:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 18:43:57 +0000 Subject: [issue28293] Don't completely dump the regex cache when full In-Reply-To: <1475038169.86.0.21816130335.issue28293@psf.upfronthosting.co.za> Message-ID: <1476816237.72.0.73839947725.issue28293@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is unlikely possible with current API of lru_cache. Testing flags before looking up in a cache adds an overhead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:18:37 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Oct 2016 19:18:37 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" Message-ID: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> New submission from Yury Selivanov: The following Python program causes a segfault in Python 3.6b2: import socket import asyncio loop = asyncio.get_event_loop() sock = socket.socket() sock.close() async def client(): reader, writer = await asyncio.open_connection( sock=sock, loop=loop) async def runner(): await client() loop.run_until_complete(runner()) ---------- components: Interpreter Core messages: 278921 nosy: haypo, inada.naoki, ned.deily, serhiy.storchaka, yselivanov priority: release blocker severity: normal status: open title: Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:19:11 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 18 Oct 2016 19:19:11 +0000 Subject: [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1476818351.88.0.23672140977.issue27779@psf.upfronthosting.co.za> Stefan Krah added the comment: Raymond: "code area" meant literally that -- all code under Modules/_decimal/* is by myself. It is well understood that you and many people (e.g. Mark Dickinson) have a stake in Decimal. This however does not warrant reassigning an issue in which I had already indicated to be cooperative. I want to know what is going into that code area. Lisa: I think I can take a look in the weekend. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:26:25 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 18 Oct 2016 19:26:25 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476818785.94.0.307514380555.issue28471@psf.upfronthosting.co.za> Ned Deily added the comment: Fatal Python error: Python memory allocator called without holding the GIL Current thread 0x00007fffb043b3c0 (most recent call first): File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 790 in _create_connection_transport File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 777 in create_connection File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/asyncio/streams.py", line 75 in open_connection File "/Users/nad/Desktop/test_28471.py", line 13 in client File "/Users/nad/Desktop/test_28471.py", line 16 in runner File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py", line 239 in _step File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/asyncio/events.py", line 126 in _run File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 1390 in _run_once File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 405 in run_forever File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 437 in run_until_complete File "/Users/nad/Desktop/test_28471.py", line 18 in Abort trap: 6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:26:42 2016 From: report at bugs.python.org (Tim Mitchell) Date: Tue, 18 Oct 2016 19:26:42 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476818802.86.0.219818149247.issue26240@psf.upfronthosting.co.za> Tim Mitchell added the comment: hg patch with changes forthcoming ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:38:00 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 18 Oct 2016 19:38:00 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476819480.38.0.260358660205.issue28471@psf.upfronthosting.co.za> Ned Deily added the comment: And here's an OS X debug-build stack trace using the system malloc (current 3.6 tip, a218260334c4): Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 pytest_10.12 0x000000010256b794 PyObject_Call + 404 (abstract.c:2245) 1 pytest_10.12 0x00000001027797cf PyErr_SetFromErrnoWithFilenameObjects + 479 (errors.c:515) 2 pytest_10.12 0x00000001027799ff PyErr_SetFromErrno + 31 (errors.c:553) 3 _socket.cpython-36dm-darwin.so 0x0000000102c3a496 internal_setblocking + 118 (socketmodule.c:671) 4 _socket.cpython-36dm-darwin.so 0x0000000102c36473 sock_setblocking + 115 (socketmodule.c:2445) 5 pytest_10.12 0x000000010260be60 _PyCFunction_FastCallDict + 1104 (methodobject.c:209) 6 pytest_10.12 0x000000010260c305 _PyCFunction_FastCallKeywords + 501 (methodobject.c:295) 7 pytest_10.12 0x000000010274f76d call_function + 637 (ceval.c:4784) 8 pytest_10.12 0x00000001027487de _PyEval_EvalFrameDefault + 78878 (ceval.c:3271) 9 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 10 pytest_10.12 0x00000001025b68bb gen_send_ex + 843 (genobject.c:216) 11 pytest_10.12 0x00000001025b6563 _PyGen_Send + 35 (genobject.c:343) 12 pytest_10.12 0x000000010273d915 _PyEval_EvalFrameDefault + 34133 (ceval.c:2021) 13 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 14 pytest_10.12 0x00000001025b68bb gen_send_ex + 843 (genobject.c:216) 15 pytest_10.12 0x00000001025b6563 _PyGen_Send + 35 (genobject.c:343) 16 pytest_10.12 0x000000010273d915 _PyEval_EvalFrameDefault + 34133 (ceval.c:2021) 17 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 18 pytest_10.12 0x00000001025b68bb gen_send_ex + 843 (genobject.c:216) 19 pytest_10.12 0x00000001025b6563 _PyGen_Send + 35 (genobject.c:343) 20 pytest_10.12 0x000000010273d915 _PyEval_EvalFrameDefault + 34133 (ceval.c:2021) 21 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 22 pytest_10.12 0x00000001025b68bb gen_send_ex + 843 (genobject.c:216) 23 pytest_10.12 0x00000001025b6563 _PyGen_Send + 35 (genobject.c:343) 24 pytest_10.12 0x000000010273d915 _PyEval_EvalFrameDefault + 34133 (ceval.c:2021) 25 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 26 pytest_10.12 0x00000001025b68bb gen_send_ex + 843 (genobject.c:216) 27 pytest_10.12 0x00000001025b6563 _PyGen_Send + 35 (genobject.c:343) 28 pytest_10.12 0x000000010260be60 _PyCFunction_FastCallDict + 1104 (methodobject.c:209) 29 pytest_10.12 0x000000010260c305 _PyCFunction_FastCallKeywords + 501 (methodobject.c:295) 30 pytest_10.12 0x000000010274f76d call_function + 637 (ceval.c:4784) 31 pytest_10.12 0x00000001027487de _PyEval_EvalFrameDefault + 78878 (ceval.c:3271) 32 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 33 pytest_10.12 0x00000001027515f0 _PyEval_EvalCodeWithName + 5472 (ceval.c:4115) 34 pytest_10.12 0x0000000102752ca0 _PyFunction_FastCallDict + 1296 (ceval.c:5017) 35 pytest_10.12 0x000000010256bb82 _PyObject_FastCallDict + 562 (abstract.c:2297) 36 pytest_10.12 0x000000010256bf02 _PyObject_Call_Prepend + 370 (abstract.c:2360) 37 pytest_10.12 0x000000010259be9a method_call + 106 (classobject.c:317) 38 pytest_10.12 0x000000010256b7dd PyObject_Call + 477 (abstract.c:2248) 39 pytest_10.12 0x000000010274fd0c do_call_core + 508 (ceval.c:5053) 40 pytest_10.12 0x00000001027492ac _PyEval_EvalFrameDefault + 81644 (ceval.c:3353) 41 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 42 pytest_10.12 0x0000000102752ee2 _PyFunction_FastCall + 370 (ceval.c:4866) 43 pytest_10.12 0x000000010275253e fast_function + 574 (ceval.c:4901) 44 pytest_10.12 0x000000010274f8f6 call_function + 1030 (ceval.c:4805) 45 pytest_10.12 0x00000001027487de _PyEval_EvalFrameDefault + 78878 (ceval.c:3271) 46 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 47 pytest_10.12 0x0000000102752ee2 _PyFunction_FastCall + 370 (ceval.c:4866) 48 pytest_10.12 0x000000010275253e fast_function + 574 (ceval.c:4901) 49 pytest_10.12 0x000000010274f8f6 call_function + 1030 (ceval.c:4805) 50 pytest_10.12 0x00000001027487de _PyEval_EvalFrameDefault + 78878 (ceval.c:3271) 51 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 52 pytest_10.12 0x0000000102752ee2 _PyFunction_FastCall + 370 (ceval.c:4866) 53 pytest_10.12 0x000000010275253e fast_function + 574 (ceval.c:4901) 54 pytest_10.12 0x000000010274f8f6 call_function + 1030 (ceval.c:4805) 55 pytest_10.12 0x00000001027487de _PyEval_EvalFrameDefault + 78878 (ceval.c:3271) 56 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 57 pytest_10.12 0x0000000102752ee2 _PyFunction_FastCall + 370 (ceval.c:4866) 58 pytest_10.12 0x000000010275253e fast_function + 574 (ceval.c:4901) 59 pytest_10.12 0x000000010274f8f6 call_function + 1030 (ceval.c:4805) 60 pytest_10.12 0x00000001027487de _PyEval_EvalFrameDefault + 78878 (ceval.c:3271) 61 pytest_10.12 0x00000001027353b0 PyEval_EvalFrameEx + 80 (ceval.c:718) 62 pytest_10.12 0x00000001027515f0 _PyEval_EvalCodeWithName + 5472 (ceval.c:4115) 63 pytest_10.12 0x000000010273532e PyEval_EvalCodeEx + 222 (ceval.c:4136) 64 pytest_10.12 0x000000010273523e PyEval_EvalCode + 94 (ceval.c:695) 65 pytest_10.12 0x00000001027a50cc run_mod + 108 (pythonrun.c:980) 66 pytest_10.12 0x00000001027a5b08 PyRun_FileExFlags + 264 (pythonrun.c:933) 67 pytest_10.12 0x00000001027a45d1 PyRun_SimpleFileExFlags + 1073 (pythonrun.c:396) 68 pytest_10.12 0x00000001027a3edc PyRun_AnyFileExFlags + 140 (pythonrun.c:80) 69 pytest_10.12 0x00000001027d5c4c run_file + 332 (main.c:319) 70 pytest_10.12 0x00000001027d49a9 Py_Main + 4473 (main.c:779) 71 pytest_10.12 0x000000010254fe5b 0x10254f000 + 3675 72 libdyld.dylib 0x00007fffa771b255 start + 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:39:12 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Oct 2016 19:39:12 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476819552.3.0.909671302736.issue28471@psf.upfronthosting.co.za> Christian Heimes added the comment: internal_setblocking() sets an exception w/o holding the GIL. #0 0x00007ffff711f6f5 in __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x00007ffff71212fa in __GI_abort () at abort.c:89 #2 0x000000000042935f in Py_FatalError (msg=0x83d8f8 "Python memory allocator called without holding the GIL") at Python/pylifecycle.c:1457 #3 0x000000000042138f in _PyMem_DebugCheckGIL () at Objects/obmalloc.c:1972 #4 0x00000000004214ae in _PyMem_DebugFree (ctx=0xad8bf0 <_PyMem_Debug+48>, ptr=0xcf8b40) at Objects/obmalloc.c:1994 #5 0x000000000041e9cb in PyMem_Free (ptr=0xcf8b40) at Objects/obmalloc.c:442 #6 0x000000000046f7ed in _PyFaulthandler_Fini () at ./Modules/faulthandler.c:1369 #7 0x0000000000429303 in Py_FatalError (msg=0x83d8f8 "Python memory allocator called without holding the GIL") at Python/pylifecycle.c:1431 #8 0x000000000042138f in _PyMem_DebugCheckGIL () at Objects/obmalloc.c:1972 #9 0x00000000004213d0 in _PyMem_DebugMalloc (ctx=0xad8c20 <_PyMem_Debug+96>, nbytes=84) at Objects/obmalloc.c:1980 #10 0x000000000041eb6b in PyObject_Malloc (size=84) at Objects/obmalloc.c:479 #11 0x00000000005c0a19 in PyUnicode_New (size=19, maxchar=116) at Objects/unicodeobject.c:1280 #12 0x00000000005c8e0e in PyUnicode_FromUnicode (u=0xd26450 L"Bad file descriptor", size=19) at Objects/unicodeobject.c:2016 #13 0x00000000005ce90f in PyUnicode_FromWideChar (w=0xd26450 L"Bad file descriptor", size=19) at Objects/unicodeobject.c:2497 #14 0x00000000005d48f0 in PyUnicode_DecodeLocaleAndSize (str=0x7ffff7273e98 "Bad file descriptor", len=19, errors=0x8747bb "surrogateescape") at Objects/unicodeobject.c:3729 #15 0x00000000005d4f86 in PyUnicode_DecodeLocale (str=0x7ffff7273e98 "Bad file descriptor", errors=0x8747bb "surrogateescape") at Objects/unicodeobject.c:3802 #16 0x0000000000717924 in PyErr_SetFromErrnoWithFilenameObjects (exc=, filenameObject=0x0, filenameObject2=0x0) at Python/errors.c:448 #17 0x0000000000717f00 in PyErr_SetFromErrno (exc=) at Python/errors.c:553 #18 0x00007ffff03000b0 in internal_setblocking (s=0x7fffeb3e1d48, block=1) at /home/heimes/dev/python/cpython/Modules/socketmodule.c:667 #19 0x00007ffff030597a in sock_setblocking (s=0x7fffeb3e1d48, arg=False) at /home/heimes/dev/python/cpython/Modules/socketmodule.c:2445 #20 0x000000000054a2ce in _PyCFunction_FastCallDict (func_obj=, args=0xef4058, nargs=1, kwargs=0x0) at Objects/methodobject.c:209 #21 0x000000000054a963 in _PyCFunction_FastCallKeywords (func=, stack=0xef4058, nargs=1, kwnames=0x0) at Objects/methodobject.c:295 #22 0x00000000006e306c in call_function (pp_stack=0x7ffffffe9088, oparg=1, kwnames=0x0) at Python/ceval.c:4787 ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:39:18 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Oct 2016 19:39:18 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476819557.99.0.181911828855.issue28471@psf.upfronthosting.co.za> Yury Selivanov added the comment: I have a patch already, writing a unittest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:42:52 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Oct 2016 19:42:52 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476819772.8.0.294989868959.issue28471@psf.upfronthosting.co.za> Christian Heimes added the comment: It's my fault. I added the "goto error" w/o realizing that I forgot to re-acquire the GIL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:46:44 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Oct 2016 19:46:44 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476820004.64.0.062267392699.issue28471@psf.upfronthosting.co.za> Yury Selivanov added the comment: Attaching a patch to fix this. Please review. ---------- keywords: +patch Added file: http://bugs.python.org/file45136/issue28471.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:57:05 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Oct 2016 19:57:05 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476820625.76.0.835119331052.issue28471@psf.upfronthosting.co.za> Christian Heimes added the comment: LGTM, thanks Yury! ---------- stage: -> patch review type: -> crash versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:58:10 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Oct 2016 19:58:10 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476820690.65.0.415486168385.issue28471@psf.upfronthosting.co.za> Yury Selivanov added the comment: > LGTM, thanks Yury! NP :) Should this be committed to 3.6/default, or in 3.5 too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:58:51 2016 From: report at bugs.python.org (Dimitri Merejkowsky) Date: Tue, 18 Oct 2016 19:58:51 +0000 Subject: [issue28334] netrc does not work if $HOME is not set In-Reply-To: <1475336154.44.0.44449733804.issue28334@psf.upfronthosting.co.za> Message-ID: <1476820731.28.0.786467965527.issue28334@psf.upfronthosting.co.za> Dimitri Merejkowsky added the comment: During review SilentGhost suggested that maybe a test was not essential. In any case, I think patching documentation about the new behavior won't hurt. Do you want me to do that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 16:00:26 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Oct 2016 20:00:26 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476820826.79.0.887765083265.issue28471@psf.upfronthosting.co.za> Christian Heimes added the comment: 3.5 is not affected by the crasher. I only added the error check to default (3.6). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 16:03:23 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 20:03:23 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818785.94.0.307514380555.issue28471@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Fatal Python error: Python memory allocator called without holding the GIL Oh, I didn't expect that my new check would catch such bug. Nice. In release mode, the check is disabled by default (can be enabled at runtime), and I don't think that the code can crash. But the bug should be fixed anyway :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 16:06:04 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 20:06:04 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <20161018200445.27140.57223.989AA1CF@psf.io> Roundup Robot added the comment: New changeset 4b5b233d4c98 by Yury Selivanov in branch '3.6': Issue #28471: Fix crash (GIL state related) in socket.setblocking https://hg.python.org/cpython/rev/4b5b233d4c98 New changeset 554fb699af8c by Yury Selivanov in branch 'default': Merge 3.6 (issue #28471) https://hg.python.org/cpython/rev/554fb699af8c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 16:06:42 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Oct 2016 20:06:42 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476821202.62.0.1510903318.issue28471@psf.upfronthosting.co.za> Yury Selivanov added the comment: > In release mode, the check is disabled by default (can be enabled at runtime), and I don't think that the code can crash. It actually crashed in release mode for me. Maybe the exact location of SF was different, but whatever... Anyways, closing the issue. Thanks for the review Christian! ---------- components: +Library (Lib) -Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 16:07:41 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 18 Oct 2016 20:07:41 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476821261.44.0.76301179935.issue28471@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 17:12:47 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 21:12:47 +0000 Subject: [issue28293] Don't completely dump the regex cache when full In-Reply-To: <1475038169.86.0.21816130335.issue28293@psf.upfronthosting.co.za> Message-ID: <1476825167.86.0.178574949979.issue28293@psf.upfronthosting.co.za> STINNER Victor added the comment: re_cache_ordered_dict_popitem.patch: LGTM, it can be pushed to the default branch. -- "This is unlikely possible with current API of lru_cache. Testing flags before looking up in a cache adds an overhead." Oh wait, I looked at the code and this case is complex because the function depends on the current locale if the LOCALE flag is set... A lookup in the the cache requires to get the current locale, but not if the LOCALE flag is not set... It seems too complex for @lru_cache(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 17:20:14 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 21:20:14 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476825614.93.0.254314012726.issue28471@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm curious. I tested in release mode, the example does crash: $ ./python x.py Segmentation fault (core dumped) I'm able to get a Python traceback using PYTHONMALLOC=debug: $ PYTHONMALLOC=debug ./python x.py Fatal Python error: Python memory allocator called without holding the GIL Current thread 0x00007f65bd74b700 (most recent call first): File "/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 790 in _create_connection_transport File "/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 777 in create_connection File "/home/haypo/prog/python/default/Lib/asyncio/streams.py", line 75 in open_connection File "x.py", line 13 in client File "x.py", line 16 in runner File "/home/haypo/prog/python/default/Lib/asyncio/tasks.py", line 239 in _step File "/home/haypo/prog/python/default/Lib/asyncio/events.py", line 126 in _run File "/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 1390 in _run_once File "/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 405 in run_forever File "/home/haypo/prog/python/default/Lib/asyncio/base_events.py", line 437 in run_until_complete File "x.py", line 18 in Aborted (core dumped) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 17:26:53 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 21:26:53 +0000 Subject: [issue28334] netrc does not work if $HOME is not set In-Reply-To: <1475336154.44.0.44449733804.issue28334@psf.upfronthosting.co.za> Message-ID: <1476826013.71.0.657583737049.issue28334@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 17:29:29 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 21:29:29 +0000 Subject: [issue24381] Got warning when compiling ffi.c on Mac In-Reply-To: <1433429045.53.0.896226238413.issue24381@psf.upfronthosting.co.za> Message-ID: <1476826169.95.0.578050388682.issue24381@psf.upfronthosting.co.za> STINNER Victor added the comment: Modules/_ctypes/libffi_osx/ffi.c comes from libffi, can you please propose a bugfix upstream? * https://sourceware.org/libffi/ * https://github.com/libffi/libffi I'm not sure where is the upstream. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 17:37:20 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 21:37:20 +0000 Subject: [issue24381] Got warning when compiling ffi.c on Mac In-Reply-To: <1433429045.53.0.896226238413.issue24381@psf.upfronthosting.co.za> Message-ID: <1476826640.61.0.625784173301.issue24381@psf.upfronthosting.co.za> St?phane Wirtel added the comment: of course, I will do it. Thank for your review ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 17:43:56 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Oct 2016 21:43:56 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <1476827036.44.0.573064409665.issue28471@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I'm curious. I tested in release mode, the example does crash: Well, since the GIL wasn't properly acquired, it's only a matter of time until something else crashes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 17:45:50 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 18 Oct 2016 21:45:50 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476827150.72.0.571866738641.issue26240@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks for tackling this one Tim. I agree with Berker that the :const:`True` changes are out of scope (some introduce errors and inaccuracies). class CalledProcessError(SubprocessError): - """Raised when a check_call() or check_output() process returns non-zero. + """Raised when a process run by check_call() or check_output() process + returns a non-zero exit status. New text has stray ?process? noun. The old text was good enough IMO. + output: Output of the child process if it was captured by run() or + check_output(). Otherwise, None. check_output() will also store the output in the output attribute. I think that last paragraph is redundant and strange now that you already described the ?output? attribute. class TimeoutExpired(SubprocessError): + Attributes: The ?cmd? attribute is missing from the list. class Popen(object): Your patch seems to be based on 3.6 or 3.7, but you have omitted the new ?encoding? etc parameters from the signature (and list of constructor parameters). What about just relying on the automatic signature for __init__()? + """ [. . .] + universal_newlines: + If universal_newlines is True, the file objects stdout and stderr are + opened as a text file, but lines may be terminated by any of '\n', ?opened as text files? would read better I think. The escape codes will be translated to literal newlines etc in the doc string. The best solution is probably to make it a raw string: r""". . .""". This universal_newlines entry has lots of details about newline translation of stdout and stderr, but fails to mention the translation of stdin. And I think the details about the child decoding its input should be added to the RST documentation before we consider adding it to the doc string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 18:01:05 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Tue, 18 Oct 2016 22:01:05 +0000 Subject: [issue28441] Change sys.executable to include executable suffix In-Reply-To: <1476452085.73.0.180033377767.issue28441@psf.upfronthosting.co.za> Message-ID: <1476828065.65.0.994274873124.issue28441@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: I agree to add the suffix to solve ambiguous path on Cygwin. And I think the patch should apply to all platforms having executable suffix. Therefore, I modified your patch to remove #if directive for Cygwin, and I changed title to spread covered platforms. This patch uses EXE_SUFFIX that is the EXE defined on Makefile. If platform doesn't have executable suffix, doesn't add anything process. ---------- components: +Interpreter Core title: sys.executable is ambiguous on Cygwin without .exe suffix -> Change sys.executable to include executable suffix Added file: http://bugs.python.org/file45137/sys-executable-suffix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 18:14:47 2016 From: report at bugs.python.org (Roman Podoliaka) Date: Tue, 18 Oct 2016 22:14:47 +0000 Subject: [issue28472] SystemTap usage examples in docs are incorrect Message-ID: <1476828887.13.0.166885706979.issue28472@psf.upfronthosting.co.za> New submission from Roman Podoliaka: There are a couple of errors in SystemTap examples from "Instrumenting CPython with DTrace and SystemTap" page (https://docs.python.org/dev/howto/instrumentation.html): 1) in SystemTap double quotes are used to denote string literals. As is examples fail with: parse error: expected literal string or number saw: operator ''' at show_call.stp:1:15 source: probe process('python').mark("function__entry") { 2) stap -c option expects a command as a single string argument, not as a list of strings. As is the following example: $ stap \ show-call-hierarchy.stp \ -c ./python test.py will not run a test.py script, but instead ./python without any args, thus it will print a prompt (i.e. >>>) and wait for user input. ---------- assignee: docs at python components: Documentation files: patch.diff keywords: patch messages: 278944 nosy: docs at python, rpodolyaka priority: normal severity: normal status: open title: SystemTap usage examples in docs are incorrect versions: Python 3.6 Added file: http://bugs.python.org/file45138/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 18:39:26 2016 From: report at bugs.python.org (Garrett Nievin) Date: Tue, 18 Oct 2016 22:39:26 +0000 Subject: [issue28473] mailbox.MH crashes on certain Claws Mail .mh_sequences files Message-ID: <1476830366.57.0.390859510096.issue28473@psf.upfronthosting.co.za> New submission from Garrett Nievin: Using Claws Mail, and mailbox.MH crashes on two different conditions: 1) sequence spans lines, suchly: unseen: 1-222 225-300 990-1024 1048-2048 Not Pythonic, but I fixed it with this update: def get_sequences(self): """Return a name-to-key-list dictionary to define each sequence.""" results = {} with open(os.path.join(self._path, '.mh_sequences'), 'r', encoding='ASCII') as f: all_keys = set(self.keys()) for line in f: try: if line.count(':') == 0: contents = line else: name, contents = line.split(':') keys = set() for spec in contents.split(): if spec.isdigit(): keys.add(int(spec)) 2) Sequence spec appears to be open-ended on the front: 28119-28123 28127 28129 28131 28133-28142 28144-28154 28156-28172 28174-28189 28191-28204 28206-28218 28220-28224 28226 28228-28234 28237-28239 28119-28123 28127 28129 28131 28133-28142 28144-28154 28156-28163 28119-28123 28127 28129 28131 28133-28157 -27920 27923-27945 27947 I'm not sure how to interpret this, so just put in a kludgy fix to get my script running as a workaround (not using sequences). Would also be interested in an option to open a mailbox and process while ignoring sequences. ---------- components: Library (Lib) messages: 278945 nosy: garrettzilla priority: normal severity: normal status: open title: mailbox.MH crashes on certain Claws Mail .mh_sequences files type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 18:50:01 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Oct 2016 22:50:01 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476831001.78.0.487979920802.issue26685@psf.upfronthosting.co.za> Yury Selivanov added the comment: I think this patch should be reverted. It breaks backwards compatibility: import socket sock0 = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) sock = socket.socket( socket.AF_INET, socket.SOCK_STREAM, 0, sock0.fileno()) sock0.close() sock.close() This code behaves differently on 3.5 vs 3.6. In uvloop (https://github.com/magicstack/uvloop) I create Python sockets for libuv socket handles. Sometimes, those handles are closed by libuv, and I have no control over that. So right now, a lot of uvloop tests fail because socket.close() now can raise an error. It also doesn't make any sense to raise it anyways. socket.close() *must* be safe to call even when the socket is already closed. ---------- nosy: +yselivanov status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 19:22:46 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Oct 2016 23:22:46 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476832966.36.0.992303366419.issue26685@psf.upfronthosting.co.za> Yury Selivanov added the comment: IOW, what is happening in uvloop: 1. A user has a Python socket object and passes it asyncio (run with uvloop) API. 2. uvloop extracts the FD of the socket, and passes it to low-level libuv. 3. At some point of time, libuv closes the FD. 4. When user tries to close the socket, it silently fails in 3.5, and raises an exception in 3.6. One way to solve this would be to use os.dup() in uvloop (i.e. pass a duplicated FD to libuv). But that would mean that programs that use uvloop will consume file descriptors (limited resource) faster than programs that use vanilla asyncio. Currently, there's a documented way of creating a socket out of an existing FD (fourth argument to the socket's constructor). This means that the FD might be controlled by someone. At least in this case, sock.close() must not raise if it fails. It's OK if the FD is already close, because the Python socket was only wrapping it in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 19:25:42 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 18 Oct 2016 23:25:42 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476833142.34.0.437675200427.issue26685@psf.upfronthosting.co.za> Martin Panter added the comment: I think your code example is not very robust, because the ?sock? object refers to a freed file descriptor, and could easily close an unrelated file: $ python3.5 -q >>> import socket >>> sock0 = socket.socket() >>> sock = socket.socket(fileno=sock0.fileno()) >>> sock0.close() >>> f = open("/dev/null") # Unrelated code/thread opens a file >>> sock.close() # Closes unrelated file descriptor! >>> f.close() # Error even in 3.5 Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor I am not familiar with your use case or library, but I would suggest that either: 1. Your code should call sock0.detach() rather than fileno(), so that sock0 no longer ?owns? the file descriptor, or 2. libuv should not close file descriptors that it doesn?t own. Calling socket.close() should be safe if the Python socket object is registered as closed, but IMO calling close(), or any other method, when the OS socket (file descriptor) has been released behind Python?s back is a programming error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 19:38:33 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 18 Oct 2016 23:38:33 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476833913.79.0.991472666517.issue26685@psf.upfronthosting.co.za> Martin Panter added the comment: If libuv closes the FD (step 3), won?t you get the same sort of problem if the uvloop user tries to do something else with the Python socket object, e.g. call getpeername()? I see the fileno=... parameter for sockets as a parallel to the os.fdopen() function, which does raise exceptions from FileIO.close(). Maybe one option is to only trigger a DeprecationWarning, and raise a proper OSError in a future version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 19:40:24 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Oct 2016 23:40:24 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476834024.04.0.722890120919.issue26685@psf.upfronthosting.co.za> Yury Selivanov added the comment: Another example: some asyncio (run with uvloop) code: conn, _ = lsock.accept() f = loop.create_task( loop.connect_accepted_socket( proto_factory, conn)) # More code loop.run_forever() conn.close() Suppose the above snippet of code is some real-world program. Now, in Python 3.5 everything works as expected. In Python 3.6, "conn.close()" will raise an exception. Why: uvloop passes the FD of "conn" to libuv, which does its thing and closes the connection when it should be closed. Now: > 1. Your code should call sock0.detach() rather than fileno(), so that sock0 no longer ?owns? the file descriptor, or I can't modify "connect_accepted_socket" to call "detach" on "conn", as it would make "conn" unusable right after the call. This option can't be implemented, as it would break the backwards compatibility. > 2. libuv should not close file descriptors that it doesn?t own. This is not just about uvloop/libuv. It's about any Python program out there that will break in 3.6. A lot of code extracts the FD out of socket objects and does something with it. We can't just make socket.close() to raise in 3.6 -- that's not how backwards compatibility promise works. Guido, what do you think about this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 19:42:30 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 18 Oct 2016 23:42:30 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476834150.38.0.141021366927.issue26685@psf.upfronthosting.co.za> Yury Selivanov added the comment: My proposal: ignore EBADF in socket.close(). It means that the socket is closed already. It doesn't matter why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 20:01:03 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Oct 2016 00:01:03 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1476834150.38.0.141021366927.issue26685@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > My proposal: ignore EBADF in socket.close(). It means that the socket is closed already. It doesn't matter why. As Martin explained, getting EBAD means that your code smells. Your code may close completely unrelated file descriptor... Say hello to race conditions :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 20:11:43 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 19 Oct 2016 00:11:43 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476835903.68.0.183633357784.issue26685@psf.upfronthosting.co.za> Yury Selivanov added the comment: Maybe we should fix asyncio. Maybe if a user passes an existing socket object into loop.create_connection, it should duplicate the socket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 20:28:01 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Oct 2016 00:28:01 +0000 Subject: [issue28473] mailbox.MH crashes on certain Claws Mail .mh_sequences files In-Reply-To: <1476830366.57.0.390859510096.issue28473@psf.upfronthosting.co.za> Message-ID: <1476836881.5.0.548684262666.issue28473@psf.upfronthosting.co.za> R. David Murray added the comment: What do you mean by "crashes"? I'm sure you don't mean a segfault. Can you paste the traceback? Neither of those two cases are valid in mh, as far as I know, so I'm not sure there is anything to fix here. ---------- nosy: +r.david.murray type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 20:43:40 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Oct 2016 00:43:40 +0000 Subject: [issue28473] mailbox.MH crashes on certain Claws Mail .mh_sequences files In-Reply-To: <1476830366.57.0.390859510096.issue28473@psf.upfronthosting.co.za> Message-ID: <1476837820.03.0.241601048179.issue28473@psf.upfronthosting.co.za> R. David Murray added the comment: I just checked, and nhm 1.3 produces a warning for case 1 and either fails to interpret anything past a token that starts with a '-' or it hangs. You should report the invalid sequence problem to claws mail. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 20:52:55 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 19 Oct 2016 00:52:55 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows In-Reply-To: <1476497368.18.0.628065389536.issue28448@psf.upfronthosting.co.za> Message-ID: <1476838375.5.0.75208164851.issue28448@psf.upfronthosting.co.za> INADA Naoki added the comment: I think _WaitCancelFuture can do same thing by overriding callers of _schedule_callbacks. Attached patch does it, and make _schedule_callbacks private by renaming it to __schedule_callbacks. ---------- Added file: http://bugs.python.org/file45139/dont-override-schedule-callbacks.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 21:25:22 2016 From: report at bugs.python.org (Tim Mitchell) Date: Wed, 19 Oct 2016 01:25:22 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476840322.59.0.626111918646.issue26240@psf.upfronthosting.co.za> Tim Mitchell added the comment: Am now working from tip of default in mercurial (Python 3.6). * Removed all changes to subprocess.rst. subprocess.__doc__ * Trimmed down even further - removed function signatures. * added note to see Python docs for complete description. Exception docs * just list attributes rather than describing them - they are pretty self-explanatory. Popen.__doc__ * Trimmed down to just list arguments with 1 or 2 liner descriptions. * Added note to see Python docs for complete description. * added encoding and errors arguments ---------- Added file: http://bugs.python.org/file45140/subprocess2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 21:44:26 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 19 Oct 2016 01:44:26 +0000 Subject: [issue28472] SystemTap usage examples in docs are incorrect In-Reply-To: <1476828887.13.0.166885706979.issue28472@psf.upfronthosting.co.za> Message-ID: <1476841466.13.0.19549148233.issue28472@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +lukasz.langa versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 21:51:39 2016 From: report at bugs.python.org (=?utf-8?b?5pu55b+g?=) Date: Wed, 19 Oct 2016 01:51:39 +0000 Subject: [issue28465] python 3.5 magic number In-Reply-To: <1476750546.36.0.931772637731.issue28465@psf.upfronthosting.co.za> Message-ID: <1476841899.73.0.185870159897.issue28465@psf.upfronthosting.co.za> ?? added the comment: I try, still the same: On debian 9 and python 3.5.2: >>> importlib.util.MAGIC_NUMBER b'\x17\r\r\n' On windows and python 3.5.2 >>> importlib.util.MAGIC_NUMBER b'\x16\r\r\n' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 22:47:16 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 19 Oct 2016 02:47:16 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1476845236.22.0.849855004101.issue28410@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 23188 (referenced above) covers making this a public API for 3.7. I think it's a good idea, but it's too late to add it to 3.6, and getting the documentation right is going to require some discussion (as using this new API isn't necessary if you're already in a Python exception handler and are directly or indirectly calling PyErr_SetObject, but *is* necessary if you're wanting to chain with a just set C level exception). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 22:57:10 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 19 Oct 2016 02:57:10 +0000 Subject: [issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad In-Reply-To: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> Message-ID: <1476845830.49.0.137560020848.issue28415@psf.upfronthosting.co.za> Changes by Josh Rosenberg : ---------- title: PyUnicode_FromFromat interger format handling different from printf about zeropad -> PyUnicode_FromFormat integer format handling different from printf about zeropad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 23:18:02 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 19 Oct 2016 03:18:02 +0000 Subject: [issue28465] python 3.5 magic number In-Reply-To: <1476750546.36.0.931772637731.issue28465@psf.upfronthosting.co.za> Message-ID: <1476847082.35.0.648166613215.issue28465@psf.upfronthosting.co.za> Zachary Ware added the comment: I suspect Debian 9's Python 3.5.2 has patches beyond v3.5.2, including the patch from #27286 (34d24c51eab6). What problem is this causing for you? ---------- nosy: +doko, serhiy.storchaka, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 02:33:32 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 06:33:32 +0000 Subject: [issue28472] SystemTap usage examples in docs are incorrect In-Reply-To: <1476828887.13.0.166885706979.issue28472@psf.upfronthosting.co.za> Message-ID: <20161019063329.16646.80298.28E4E6A8@psf.io> Roundup Robot added the comment: New changeset 5c21df505684 by Benjamin Peterson in branch '3.6': always use double quotes for SystemTap string literals (closes #28472) https://hg.python.org/cpython/rev/5c21df505684 New changeset dc10bd89473b by Benjamin Peterson in branch 'default': merge 3.6 (#28472) https://hg.python.org/cpython/rev/dc10bd89473b ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 03:15:17 2016 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Wed, 19 Oct 2016 07:15:17 +0000 Subject: [issue25731] Assigning and deleting __new__ attr on the class does not allow to create instances of this class In-Reply-To: <1448454590.41.0.350843358205.issue25731@psf.upfronthosting.co.za> Message-ID: <1476861317.8.0.493461940869.issue25731@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: Hi all, it seems to me that this change has been reverted not only in 2.7, but also in 3.5 (changeset: 101549:c8df1877d1bc). Benjamin, was this intentional? If so, perhaps this issue should be reopened and not marked as resolved. Thanks a lot! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 03:28:01 2016 From: report at bugs.python.org (Kelvin You) Date: Wed, 19 Oct 2016 07:28:01 +0000 Subject: [issue28474] WinError(): Python int too large to convert to C long Message-ID: <1476862081.01.0.00079290874453.issue28474@psf.upfronthosting.co.za> New submission from Kelvin You: // callproc.c static PyObject *format_error(PyObject *self, PyObject *args) { PyObject *result; wchar_t *lpMsgBuf; DWORD code = 0; if (!PyArg_ParseTuple(args, "|i:FormatError", &code)) ^ Here the format string should be "|I:FormatError" return NULL; if (code == 0) code = GetLastError(); lpMsgBuf = FormatError(code); if (lpMsgBuf) { result = PyUnicode_FromWideChar(lpMsgBuf, wcslen(lpMsgBuf)); LocalFree(lpMsgBuf); } else { result = PyUnicode_FromString(""); } return result; } ---------- components: ctypes messages: 278963 nosy: Kelvin You priority: normal severity: normal status: open title: WinError(): Python int too large to convert to C long type: crash versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 03:43:28 2016 From: report at bugs.python.org (Francisco Couzo) Date: Wed, 19 Oct 2016 07:43:28 +0000 Subject: [issue28475] Misleading error on random.sample when k < 0 Message-ID: <1476863008.28.0.194554202317.issue28475@psf.upfronthosting.co.za> New submission from Francisco Couzo: Improved a bit the error message when k < 0, and also added a comment about it on the documentation and an additional test case. ---------- assignee: docs at python components: Documentation, Library (Lib), Tests files: random_sample.patch keywords: patch messages: 278964 nosy: docs at python, franciscouzo priority: normal severity: normal status: open title: Misleading error on random.sample when k < 0 Added file: http://bugs.python.org/file45141/random_sample.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 03:58:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Oct 2016 07:58:19 +0000 Subject: [issue28475] Misleading error on random.sample when k < 0 In-Reply-To: <1476863008.28.0.194554202317.issue28475@psf.upfronthosting.co.za> Message-ID: <1476863899.75.0.164482443047.issue28475@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> rhettinger components: -Tests nosy: +mark.dickinson, rhettinger stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 03:59:48 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Oct 2016 07:59:48 +0000 Subject: [issue28474] WinError(): Python int too large to convert to C long In-Reply-To: <1476862081.01.0.00079290874453.issue28474@psf.upfronthosting.co.za> Message-ID: <1476863988.63.0.695419846935.issue28474@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Windows nosy: +amaury.forgeotdarc, belopolsky, meador.inge, paul.moore, steve.dower, tim.golden, zach.ware type: crash -> behavior versions: +Python 3.7 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 04:03:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Oct 2016 08:03:21 +0000 Subject: [issue25731] Assigning and deleting __new__ attr on the class does not allow to create instances of this class In-Reply-To: <1448454590.41.0.350843358205.issue25731@psf.upfronthosting.co.za> Message-ID: <1476864201.3.0.782430117144.issue25731@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: fixed -> stage: resolved -> versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 04:03:45 2016 From: report at bugs.python.org (Francisco Couzo) Date: Wed, 19 Oct 2016 08:03:45 +0000 Subject: [issue28476] Remove redundant definition of factorial on test_random Message-ID: <1476864225.97.0.189516103276.issue28476@psf.upfronthosting.co.za> Changes by Francisco Couzo : ---------- components: Tests files: test_random.patch keywords: patch nosy: franciscouzo priority: normal severity: normal status: open title: Remove redundant definition of factorial on test_random Added file: http://bugs.python.org/file45142/test_random.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 04:06:30 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 19 Oct 2016 08:06:30 +0000 Subject: [issue26944] android: test_posix fails In-Reply-To: <1462348873.26.0.373017977506.issue26944@psf.upfronthosting.co.za> Message-ID: <1476864390.52.0.553241545733.issue26944@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- dependencies: -add the 'is_android' attribute to test.support _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 04:10:04 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 19 Oct 2016 08:10:04 +0000 Subject: [issue26944] test_posix: Android 'id -G' is entirely wrong or missing the effective gid In-Reply-To: <1462348873.26.0.373017977506.issue26944@psf.upfronthosting.co.za> Message-ID: <1476864604.71.0.309483625832.issue26944@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- title: android: test_posix fails -> test_posix: Android 'id -G' is entirely wrong or missing the effective gid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 04:11:57 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 08:11:57 +0000 Subject: [issue28476] Remove redundant definition of factorial on test_random Message-ID: <20161019081141.11947.86786.D9548353@psf.io> New submission from Roundup Robot: New changeset c6588a7443a4 by Victor Stinner in branch 'default': Close #28476: Reuse math.factorial() in test_random https://hg.python.org/cpython/rev/c6588a7443a4 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 04:13:25 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Oct 2016 08:13:25 +0000 Subject: [issue28476] Remove redundant definition of factorial on test_random In-Reply-To: <20161019081141.11947.86786.D9548353@psf.io> Message-ID: <1476864805.32.0.286333393826.issue28476@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for your contribution Francisco. test_random still pass. I pushed your safe and well contained patch. It don't see any good reason why test_random had its own pure (and slow) Python implementation of factorial(), it's probably because test_random.py was written before math.factorial() was added (Python 2.6). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 04:23:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Oct 2016 08:23:27 +0000 Subject: [issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions In-Reply-To: <1420687041.12.0.12728944273.issue23188@psf.upfronthosting.co.za> Message-ID: <1476865407.89.0.760947488873.issue23188@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This helper is convenient in many cases, but it is very limited. It raises an exception with single string argument. It doesn't work in cases when the exception doesn't take arguments (PyErr_SetNone) or takes multiple or non-string arguments (PyErr_SetFromErrnoWithFilenameObject, PyErr_SetImportError). I think for public API we need more general solution. Something like this: PyObject *cause = get_current_exception(); PyErr_SetImportError(msg, name, path); set_cause_of_current_exception(cause); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 04:29:38 2016 From: report at bugs.python.org (Georgey) Date: Wed, 19 Oct 2016 08:29:38 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476865778.46.0.8446591567.issue28447@psf.upfronthosting.co.za> Georgey added the comment: As your request, I simplify the server here: ---------------------------------------------------------- import socket import select, time import queue, threading ISOTIMEFORMAT = '%Y-%m-%d %X' BUFSIZ = 2048 TIMEOUT = 10 ADDR = ('', 15625) SEG = "??" SEG_ = SEG.encode() active_socks = [] socks2addr = {} server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server_sock.bind(ADDR) server_sock.listen(10) active_socks.append(server_sock) mailbox = queue.Queue() # def send(mail): mail_ = SEG_+ mail.encode() ##The SEG_ at the beginning can seperate messeges for recepient when internet busy for sock in active_socks[1:]: try: sock.send(mail_) except: handle_sock_err(sock) def handle_sock_err(sock): try: addr_del = sock.getpeername() except: addr_del = socks2addr[sock] active_socks.remove(sock) socks2addr.pop(sock) sock.close() send("OFFLIN"+str(addr_del) ) # class Sender(threading.Thread): #process 'mails' - save and send def __init__(self, mailbox): super().__init__() self.queue = mailbox def analyze(self, mail, fromwhere): send( ' : '.join((fromwhere, mail)) ) def run(self): while True: msg, addr = mailbox.get() ### if msg[0] =="sock_err": print("sock_err @ ", msg[1]) #alternative> print("sock_err @ " + repr( msg[1] ) ) #the alternaive command greatly reduces socket closing handle_sock_err(msg[1]) continue self.analyze(msg, addr) sender = Sender(mailbox) sender.daemon = True sender.start() #
while True: onlines = list(socks2addr.values()) print( '\n'+time.strftime(ISOTIMEFORMAT, time.localtime(time.time())) ) print( 'online: '+str(onlines)) read_sockets, write_sockets, error_sockets = select.select(active_socks,[],[],TIMEOUT) for sock in read_sockets: #New connection if sock ==server_sock: # New Client coming in clisock, addr = server_sock.accept() ip = addr[0] active_socks.append(clisock) socks2addr[clisock] = addr #Some incoming message from a client else: # Data recieved from client, process it try: data = sock.recv(BUFSIZ) if data: fromwhere = sock.getpeername() mail_s = data.split(SEG_) ##seperate messages del mail_s[0] for mail_ in mail_s: mail = mail_.decode() print("recv>"+ mail) except: mailbox.put( (("sock_err",sock), 'Server') ) continue server_sock.close() ========================================================== The client side can be anything that tries to connect the server. The original server has a bulletin function that basically echoes every message from any client to all clients. But you can ignore this function and limit the client from just connecting to this server and do nothing before close. I find the error again: ---------------------- sock_err @ Exception in thread Thread-1: Traceback (most recent call last): File "C:/Users/user/Desktop/SelectWinServer.py", line 39, in handle_sock_err addr_del = sock.getpeername() OSError: [WinError 10038] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python34\lib\threading.py", line 911, in _bootstrap_inner self.run() File "C:/Users/user/Desktop/SelectWinServer.py", line 67, in run handle_sock_err(msg[1]) File "C:/Users/user/Desktop/SelectWinServer.py", line 41, in handle_sock_err addr_del = socks2addr[sock] KeyError: ================= It seems that "socks2addr" has little help when socket is closed and "getpeername()" fails - it will fail too. However, I do find that altering print("sock_err @ ", msg[1]) to print("sock_err @ " + repr( msg[1] ) ) can reduce socket closing. Don't understand why and how important it is. BTW, on Windows 7 or Windows 10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 05:09:05 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 09:09:05 +0000 Subject: [issue26944] test_posix: Android 'id -G' is entirely wrong or missing the effective gid In-Reply-To: <1462348873.26.0.373017977506.issue26944@psf.upfronthosting.co.za> Message-ID: <20161019090858.27413.21442.E1A22F66@psf.io> Roundup Robot added the comment: New changeset fb3e65aff225 by Xavier de Gaye in branch '3.6': Issue #26944: Fix test_posix for Android where 'id -G' is entirely wrong https://hg.python.org/cpython/rev/fb3e65aff225 New changeset 465c09937e85 by Xavier de Gaye in branch 'default': Issue #26944: Merge with 3.6. https://hg.python.org/cpython/rev/465c09937e85 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 05:11:29 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 19 Oct 2016 09:11:29 +0000 Subject: [issue26944] test_posix: Android 'id -G' is entirely wrong or missing the effective gid In-Reply-To: <1462348873.26.0.373017977506.issue26944@psf.upfronthosting.co.za> Message-ID: <1476868289.63.0.157267574222.issue26944@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 06:01:55 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 19 Oct 2016 10:01:55 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476871315.02.0.0306645279665.issue28447@psf.upfronthosting.co.za> Martin Panter added the comment: I haven?t tried running your program, but I don?t see anything stopping multiple references to the same socket appearing in the ?mailbox? queue. Once the first reference has been processed, the socket will be closed, so subsequent getpeername() calls will be invalid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 06:57:40 2016 From: report at bugs.python.org (Georgey) Date: Wed, 19 Oct 2016 10:57:40 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476874660.43.0.0852059786664.issue28447@psf.upfronthosting.co.za> Georgey added the comment: so when do you think the error socket closes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 09:26:33 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Oct 2016 13:26:33 +0000 Subject: [issue28473] mailbox.MH crashes on certain Claws Mail .mh_sequences files In-Reply-To: <1476830366.57.0.390859510096.issue28473@psf.upfronthosting.co.za> Message-ID: <1476883593.55.0.197561762142.issue28473@psf.upfronthosting.co.za> R. David Murray added the comment: I meant 'nmh'. Also, if the problem is that mailbox blows up on an .mh_sequences file with bad records and doesn't provide any way to access the valid records (like nmh mostly manages to do), then that is something that could be fixed, and we can reopen the issue. ---------- versions: +Python 3.6, Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 09:46:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 13:46:13 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <20161019134606.16687.78618.4B02B5FF@psf.io> Roundup Robot added the comment: New changeset cef2373f31bb by Serhiy Storchaka in branch '2.7': Issue #19795: Mark up None as literal text. https://hg.python.org/cpython/rev/cef2373f31bb New changeset a8d5b433bb36 by Serhiy Storchaka in branch '3.5': Issue #19795: Mark up None as literal text. https://hg.python.org/cpython/rev/a8d5b433bb36 New changeset 2e97ed8e7e3c by Serhiy Storchaka in branch '3.6': Issue #19795: Mark up None as literal text. https://hg.python.org/cpython/rev/2e97ed8e7e3c New changeset 5f997b3cb59c by Serhiy Storchaka in branch 'default': Issue #19795: Mark up None as literal text. https://hg.python.org/cpython/rev/5f997b3cb59c New changeset b7df6c09ddf9 by Serhiy Storchaka in branch '2.7': Issue #19795: Mark up True and False as literal text instead of bold. https://hg.python.org/cpython/rev/b7df6c09ddf9 New changeset 477a82ec81fc by Serhiy Storchaka in branch '3.5': Issue #19795: Mark up True and False as literal text instead of bold. https://hg.python.org/cpython/rev/477a82ec81fc New changeset 91992ea3c6b1 by Serhiy Storchaka in branch '3.6': Issue #19795: Mark up True and False as literal text instead of bold. https://hg.python.org/cpython/rev/91992ea3c6b1 New changeset 8cc9ad294ea9 by Serhiy Storchaka in branch 'default': Issue #19795: Mark up True and False as literal text instead of bold. https://hg.python.org/cpython/rev/8cc9ad294ea9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 09:49:45 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 13:49:45 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <20161019134938.32920.6426.35960726@psf.io> Roundup Robot added the comment: New changeset 4e4d4e9183f5 by Victor Stinner in branch 'default': Issue #28240: Fix formatting of the warning. https://hg.python.org/cpython/rev/4e4d4e9183f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 10:30:08 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Oct 2016 14:30:08 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476887408.96.0.0642533812647.issue19795@psf.upfronthosting.co.za> STINNER Victor added the comment: The "Docs" bot doesn't like your change: http://buildbot.python.org/all/builders/Docs%203.x/builds/2673/steps/suspicious/logs/stdio WARNING: [whatsnew/3.1:549] "`" found in "``False``" WARNING: [whatsnew/3.4:163] "`" found in "to ``None`" WARNING: [whatsnew/3.4:163] "`" found in " during finalization ` (" /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:163: WARNING: undefined label: module globals are no longer set to ``none` (if the link has no caption the label must precede a section header) Extract of the change: - protocol 3. Another solution is to set the *fix_imports* option to **False**. + protocol 3. Another solution is to set the *fix_imports* option to *``False``*. I guess that it should ``False`` without star? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 10:44:40 2016 From: report at bugs.python.org (Sebastian Berg) Date: Wed, 19 Oct 2016 14:44:40 +0000 Subject: [issue26568] Add a new warnings.showwarnmsg() function taking a warnings.WarningMessage object In-Reply-To: <1458052320.63.0.791464551893.issue26568@psf.upfronthosting.co.za> Message-ID: <1476888280.53.0.329556534446.issue26568@psf.upfronthosting.co.za> Sebastian Berg added the comment: To make warning testing saner, in numpy we added basically my own version of catch_warnings on steroids, which needed/will need changing because of this. Unless I missed it somewhere, this change should maybe put into the release notes to warn make it a bit easier to track down what is going on. ---------- nosy: +seberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:13:14 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 15:13:14 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <20161019151239.12110.61211.0E8D89D4@psf.io> Roundup Robot added the comment: New changeset 9ef78351d2e9 by Serhiy Storchaka in branch '3.5': Issue #19795: Fixed markup errors. https://hg.python.org/cpython/rev/9ef78351d2e9 New changeset 6c8a26e60728 by Serhiy Storchaka in branch '3.6': Issue #19795: Fixed markup errors. https://hg.python.org/cpython/rev/6c8a26e60728 New changeset 2127ef3b7660 by Serhiy Storchaka in branch 'default': Issue #19795: Fixed markup errors. https://hg.python.org/cpython/rev/2127ef3b7660 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:13:37 2016 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 19 Oct 2016 15:13:37 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476890017.85.0.328108702201.issue19795@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Without the star would be right. ReST does not support nested markup, and in this case, I don't think it would make sense anyway. ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:28:44 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Oct 2016 15:28:44 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476890924.8.0.793165122343.issue19795@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks, "build #1563 of Docs 3.5 is complete: Success [build successful]": the bot is happy again ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:38:10 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 15:38:10 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <20161019153734.12009.90342.1A9B0C41@psf.io> Roundup Robot added the comment: New changeset e4aa34a7ca53 by Serhiy Storchaka in branch '3.5': Issue #19795: Improved more markups of True/False. https://hg.python.org/cpython/rev/e4aa34a7ca53 New changeset dd7e48e3e5b0 by Serhiy Storchaka in branch '2.7': Issue #19795: Improved more markups of True/False. https://hg.python.org/cpython/rev/dd7e48e3e5b0 New changeset 7b143d6834cf by Serhiy Storchaka in branch '3.6': Issue #19795: Improved more markups of True/False. https://hg.python.org/cpython/rev/7b143d6834cf New changeset 9fc0f20ea7de by Serhiy Storchaka in branch 'default': Issue #19795: Improved more markups of True/False. https://hg.python.org/cpython/rev/9fc0f20ea7de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:38:46 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Oct 2016 15:38:46 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476891526.91.0.678820080691.issue19795@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for noticing this Victor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:46:44 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 19 Oct 2016 15:46:44 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476892004.47.0.167590840315.issue19795@psf.upfronthosting.co.za> Zachary Ware added the comment: There's also an issue with a table in Doc/library/logging.rst, see http://buildbot.python.org/all/builders/Docs%203.x/builds/2675/steps/docbuild/logs/stdio I'm not sure why that doesn't cause the build to fail, though, it's marked as an error. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:54:39 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 19 Oct 2016 15:54:39 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476892479.72.0.756836608342.issue26685@psf.upfronthosting.co.za> Yury Selivanov added the comment: After thinking about this problem for a while, I arrived to the conclusion that we need to fix asyncio. Essentially, when a user passes a socket object to the event loop API like 'create_server', they give up the control of the socket to the loop. The loop should detach the socket object and have a full control over it. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 12:01:27 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Oct 2016 16:01:27 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476892886.99.0.762779147729.issue26685@psf.upfronthosting.co.za> STINNER Victor added the comment: "After thinking about this problem for a while, I arrived to the conclusion that we need to fix asyncio." Ah, you became reasonable :-D "Essentially, when a user passes a socket object to the event loop API like 'create_server', they give up the control of the socket to the loop. The loop should detach the socket object and have a full control over it." I don't know how asyncio should be modified exactly, but I agree that someone should change in asyncio. The question is more about how to reduce headache because of the backward compatibility and don't kill performances. Would you mind to open an issue specific for asyncio? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 12:06:45 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 19 Oct 2016 16:06:45 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476893205.24.0.962279891576.issue26685@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Ah, you became reasonable :-D Come on... :) > Would you mind to open an issue specific for asyncio? I'll open an issue on GH today to discuss with you/Guido/asyncio devs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 12:40:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 16:40:11 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <20161019164003.38659.7974.FBED9E44@psf.io> Roundup Robot added the comment: New changeset c445746d0846 by Serhiy Storchaka in branch '3.5': Issue #19795: Fixed formatting a table. https://hg.python.org/cpython/rev/c445746d0846 New changeset 3b554c9ea1c4 by Serhiy Storchaka in branch '3.6': Issue #19795: Fixed formatting a table. https://hg.python.org/cpython/rev/3b554c9ea1c4 New changeset 884c9d9159dc by Serhiy Storchaka in branch 'default': Issue #19795: Fixed formatting a table. https://hg.python.org/cpython/rev/884c9d9159dc New changeset ddf32a646457 by Serhiy Storchaka in branch '2.7': Issue #19795: Fixed formatting a table. https://hg.python.org/cpython/rev/ddf32a646457 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 12:52:50 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Oct 2016 16:52:50 +0000 Subject: [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476895970.52.0.886790287855.issue19795@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Zachary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 13:34:22 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 19 Oct 2016 17:34:22 +0000 Subject: [issue28477] Add optional user argument to pathlib.Path.home() Message-ID: <1476898462.87.0.214098648021.issue28477@psf.upfronthosting.co.za> New submission from Josh Rosenberg: os.path.expanduser supports both '~' and '~username` constructs to get home directories. It seems reasonable for pathlib.Path.home to default to getting the current user's home directory, but support passing an argument to get the home directory for another user. It means no need to use os.path.expanduser for the purpose (which always strikes me as a little "ugly" for portable code; the ~ works, but it's using UNIX syntax in a way that makes it feel non-portable), making pathlib a more complete replacement. ---------- components: Library (Lib) messages: 278988 nosy: josh.r priority: normal severity: normal status: open title: Add optional user argument to pathlib.Path.home() versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 14:17:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Oct 2016 18:17:27 +0000 Subject: [issue28477] Add optional user argument to pathlib.Path.home() In-Reply-To: <1476898462.87.0.214098648021.issue28477@psf.upfronthosting.co.za> Message-ID: <1476901047.11.0.393347241444.issue28477@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: pathlib.Path.home() don't support the user argument for reasons. The main problem is that os.path.expanduser() for other users is faked on Windows. It uses guessing, and perhaps it returns correct result in most cases. But in non-standard situations, if current user or other users have non-default home directory, it returns wrong result. I don't know wherever it works for users with non-ascii names or names containing special characters. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 15:02:03 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 19 Oct 2016 19:02:03 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476903723.03.0.684223123068.issue28444@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Thanks for reviewing the patch Martin. > Why do you remove the code that loops over Modules/Setup? Maybe is it redundant with the other code for removing the already-built-in modules? Yes because this is redundant, maybe not the case when this was written 15 years ago. > The logic matching MODOBJS doesn?t look super robust. Agreed on both points. > if you added Modules/Setup.config to the list of Setup files to process, would that eliminate the need to look at both MODOBJS and sys.builtin_module_names? The processing of the Setup files done by setup.py is not robust either. It does not handle the lines of the form ' = '. The syntax described in Setup.dist allows for: mod_form1 mod_form2 _mod_source.c where both the 'mod_form1' and 'mod_form2' modules depend on the same source file and one would like to build them statically. makesetup handles that case while setup.py does not. There is no guarantee that a change in the makesetup machinery would be systematically reflected in a change to setup.py. And indeed this is the case now - as you point it out - setup.py is currently missing the parsing of Setup.config. Here is a new patch that uses the result of the parsing done by makesetup in setup.py. ---------- Added file: http://bugs.python.org/file45143/removed_modules_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 15:49:25 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 19 Oct 2016 19:49:25 +0000 Subject: [issue26685] Raise errors from socket.close() In-Reply-To: <1459509388.35.0.801044830009.issue26685@psf.upfronthosting.co.za> Message-ID: <1476906565.85.0.399361952077.issue26685@psf.upfronthosting.co.za> Yury Selivanov added the comment: >> Would you mind to open an issue specific for asyncio? > I'll open an issue on GH today to discuss with you/Guido/asyncio devs. Guido, Victor, please take a look: https://github.com/python/asyncio/pull/449 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 16:49:02 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 19 Oct 2016 20:49:02 +0000 Subject: [issue28475] Misleading error on random.sample when k < 0 In-Reply-To: <1476863008.28.0.194554202317.issue28475@psf.upfronthosting.co.za> Message-ID: <1476910142.14.0.0362622507161.issue28475@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would rather revise the existing message to say that it cannot be negative or larger that population. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 16:55:25 2016 From: report at bugs.python.org (Francisco Couzo) Date: Wed, 19 Oct 2016 20:55:25 +0000 Subject: [issue28475] Misleading error on random.sample when k < 0 In-Reply-To: <1476863008.28.0.194554202317.issue28475@psf.upfronthosting.co.za> Message-ID: <1476910525.87.0.915632037321.issue28475@psf.upfronthosting.co.za> Changes by Francisco Couzo : Added file: http://bugs.python.org/file45144/random_sample2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 17:02:02 2016 From: report at bugs.python.org (toast12) Date: Wed, 19 Oct 2016 21:02:02 +0000 Subject: [issue28478] Built-in module 'Time' does not enable functions if -Wno-error specified in the build environment Message-ID: <1476910922.79.0.695929522642.issue28478@psf.upfronthosting.co.za> New submission from toast12: Our build environment uses -Wno-error. However, this causes problems enabling all the functions in built-in module 'time': configure:11130: checking for strftime - - cc1: warnings being treated as errors conftest.c:236: error: conflicting types for built-in function 'strftime' Because strftime was not enabled, we had problems running xmlrpc.client: >>> from xmlrpc import client Traceback (most recent call last): File "", line 1, in File "XXX/lib64/python3.5/xmlrpc/client.py", line 267, in if _day0.strftime('%Y') == '0001': # Mac OS X AttributeError: module 'time' has no attribute 'strftime' >>> As a workaround, I am passing -fno-builtin now. But I believe this should be handled on the python end ---------- components: Extension Modules messages: 278993 nosy: toast12 priority: normal severity: normal status: open title: Built-in module 'Time' does not enable functions if -Wno-error specified in the build environment versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 17:12:44 2016 From: report at bugs.python.org (toast12) Date: Wed, 19 Oct 2016 21:12:44 +0000 Subject: [issue28478] Built-in module 'Time' does not enable functions if -Wno-error specified in the build environment In-Reply-To: <1476910922.79.0.695929522642.issue28478@psf.upfronthosting.co.za> Message-ID: <1476911564.69.0.866513477468.issue28478@psf.upfronthosting.co.za> toast12 added the comment: Excuse my typo. I meant -Werror and not -Wno-error ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 17:45:09 2016 From: report at bugs.python.org (Douglas Greiman) Date: Wed, 19 Oct 2016 21:45:09 +0000 Subject: [issue1520879] make install change: Allow $DESTDIR to be relative Message-ID: <1476913509.86.0.184403535391.issue1520879@psf.upfronthosting.co.za> Changes by Douglas Greiman : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 17:45:30 2016 From: report at bugs.python.org (Douglas Greiman) Date: Wed, 19 Oct 2016 21:45:30 +0000 Subject: [issue1520879] make install change: Allow $DESTDIR to be relative Message-ID: <1476913530.89.0.390191402923.issue1520879@psf.upfronthosting.co.za> Douglas Greiman added the comment: Duplicate of http://bugs.python.org/issue11411 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 17:57:18 2016 From: report at bugs.python.org (Jon Dufresne) Date: Wed, 19 Oct 2016 21:57:18 +0000 Subject: [issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options In-Reply-To: <1390468789.64.0.236388970509.issue20361@psf.upfronthosting.co.za> Message-ID: <1476914238.7.0.719417601616.issue20361@psf.upfronthosting.co.za> Changes by Jon Dufresne : ---------- nosy: +jdufresne _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 18:04:28 2016 From: report at bugs.python.org (Jon Dufresne) Date: Wed, 19 Oct 2016 22:04:28 +0000 Subject: [issue22431] Change format of test runner output In-Reply-To: <1410961478.22.0.708066565645.issue22431@psf.upfronthosting.co.za> Message-ID: <1476914668.84.0.684781944632.issue22431@psf.upfronthosting.co.za> Changes by Jon Dufresne : ---------- nosy: +jdufresne _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 18:37:18 2016 From: report at bugs.python.org (Julien) Date: Wed, 19 Oct 2016 22:37:18 +0000 Subject: [issue28479] Missing indentation in using/windows.rst Message-ID: <1476916638.92.0.768484757965.issue28479@psf.upfronthosting.co.za> New submission from Julien: Hi, In https://docs.python.org/3.7/using/windows.html, right before https://docs.python.org/3.7/using/windows.html#additional-modules, the "Changed in version 3.6:" content lacks an indentation. It look like it's nothing, but it breaks the PDF generation, by generating invalid latex. I attached the simple patch to fix this, and tested it, it's now rendered with the correct indentation and the PDF builds successfully. A grep -A10 -r 'versionchanged::$' show no other problems of indentation on those blocks (and shows this is the right way to fix it). ---------- assignee: docs at python components: Documentation files: using_windows_versionchanged.patch keywords: patch messages: 278996 nosy: docs at python, sizeof priority: normal severity: normal status: open title: Missing indentation in using/windows.rst type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45145/using_windows_versionchanged.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 18:46:55 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 22:46:55 +0000 Subject: [issue28479] Missing indentation in using/windows.rst In-Reply-To: <1476916638.92.0.768484757965.issue28479@psf.upfronthosting.co.za> Message-ID: <20161019224644.27644.24827.DBC60AFF@psf.io> Roundup Robot added the comment: New changeset 39ac5093bdbb by Victor Stinner in branch '3.6': Close #28479: Fix reST syntax in windows.rst https://hg.python.org/cpython/rev/39ac5093bdbb ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 18:47:25 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Oct 2016 22:47:25 +0000 Subject: [issue28479] Missing indentation in using/windows.rst In-Reply-To: <1476916638.92.0.768484757965.issue28479@psf.upfronthosting.co.za> Message-ID: <1476917245.42.0.738675960522.issue28479@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for your contribution Julien. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 19:03:52 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 19 Oct 2016 23:03:52 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476918232.54.0.0672799539046.issue28444@psf.upfronthosting.co.za> Martin Panter added the comment: Your second patch looks better, given my limited understanding of the scripts involved. :) I left one more suggestion though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 19:27:58 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Wed, 19 Oct 2016 23:27:58 +0000 Subject: [issue28480] Compile error on Modules/socketmodule.c Message-ID: <1476919678.71.0.954266925792.issue28480@psf.upfronthosting.co.za> New submission from Masayuki Yamamoto: _socket module has failed to compile with --without-threads flag since 554fb699af8c, because Py_END_ALLOW_THREADS macro exists behind the done label ( Modules/socketmodule.c:666 ). If --without-threads flag goes on, Py_END_ALLOW_THREADS macro replaces to just right curly bracket. Therefore, between label and end of block have no statements. There needs meaningless statement (e.g. result = result;) to avoid compile error. I wrote a one line patch as a test. ---------- components: Build, Extension Modules files: socketmodule-behind-label.patch keywords: patch messages: 279000 nosy: masamoto priority: normal severity: normal status: open title: Compile error on Modules/socketmodule.c type: compile error versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45146/socketmodule-behind-label.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 19:30:03 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 19 Oct 2016 23:30:03 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476919803.37.0.393241323654.issue28447@psf.upfronthosting.co.za> Martin Panter added the comment: When I run your program on Linux (natively, and I also tried Wine), the worst behaviour I get is a busy loop as soon as a client shuts down the connection and recv() returns an empty string. I would have to force an exception in the top level code to trigger the rest of the code. Anyway, my theory is your socket is closed in a previous handle_sock_err() call. Your KeyError from socks2addr is further evidence of this. I suggest to look at why handle_sock_err() is being called, what exceptions are being handled, where they were raised, what the contents and size of ?mailbox? is, etc. I suggest you go elsewhere for general help with Python programming (e.g. the python-list mailing list), unless it actually looks like a bug in Python. ---------- resolution: remind -> not a bug status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 19:37:29 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 19 Oct 2016 23:37:29 +0000 Subject: [issue28480] Compile error on Modules/socketmodule.c In-Reply-To: <1476919678.71.0.954266925792.issue28480@psf.upfronthosting.co.za> Message-ID: <1476920249.0.0.323743924928.issue28480@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks for the report and patch. I think an empty statement might be better than the dummy assignment. Let me know if the following would work and I will commit it: done: + ; /* necessary for --without-threads flag */ Py_END_ALLOW_THREADS ---------- nosy: +martin.panter stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 19:44:24 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Wed, 19 Oct 2016 23:44:24 +0000 Subject: [issue28480] Compile error on Modules/socketmodule.c In-Reply-To: <1476919678.71.0.954266925792.issue28480@psf.upfronthosting.co.za> Message-ID: <1476920664.55.0.991579020039.issue28480@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: Oh, that's enough to work, Martin. I confirmed too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 20:58:46 2016 From: report at bugs.python.org (Georgey) Date: Thu, 20 Oct 2016 00:58:46 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476925126.35.0.452478240377.issue28447@psf.upfronthosting.co.za> Georgey added the comment: I have changed the code to report any error that occurs in receiving message, and it reports: [WinError10054] An existing connection was forcibly closed by the remote host Well, this error is the one we need to handle, right? A server need to deal with abrupt offlines of clients. Yes the romote host has dropped and connection has been broken, but that does not mean we cannot recall its address. If this is not a bug, I don't know what is a bug in socket module. ---------------------------------------------------------- import socket import select, time import queue, threading ISOTIMEFORMAT = '%Y-%m-%d %X' BUFSIZ = 2048 TIMEOUT = 10 ADDR = ('', 15625) SEG = "??" SEG_ = SEG.encode() active_socks = [] socks2addr = {} server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server_sock.bind(ADDR) server_sock.listen(10) active_socks.append(server_sock) mailbox = queue.Queue() # def send(mail): mail_ = SEG_+ mail.encode() ##The SEG_ at the beginning can seperate messeges for recepient when internet busy for sock in active_socks[1:]: try: sock.send(mail_) except: handle_sock_err(sock) def handle_sock_err(sock): try: addr_del = sock.getpeername() except: addr_del = socks2addr[sock] active_socks.remove(sock) socks2addr.pop(sock) sock.close() send("OFFLIN"+str(addr_del) ) # class Sender(threading.Thread): #process 'mails' - save and send def __init__(self, mailbox): super().__init__() self.queue = mailbox def analyze(self, mail, fromwhere): send( ' : '.join((fromwhere, mail)) ) def run(self): while True: msg, addr = mailbox.get() ### if msg[0] =="sock_err": print("sock_err @ ", msg[1]) #alternative> print("sock_err @ " + repr( msg[1] ) ) #the alternaive command greatly reduces socket closing handle_sock_err(msg[1]) continue self.analyze(msg, addr) sender = Sender(mailbox) sender.daemon = True sender.start() #
while True: onlines = list(socks2addr.values()) print( '\n'+time.strftime(ISOTIMEFORMAT, time.localtime(time.time())) ) print( 'online: '+str(onlines)) read_sockets, write_sockets, error_sockets = select.select(active_socks,[],[],TIMEOUT) for sock in read_sockets: #New connection if sock ==server_sock: # New Client coming in clisock, addr = server_sock.accept() ip = addr[0] active_socks.append(clisock) socks2addr[clisock] = addr #Some incoming message from a client else: # Data recieved from client, process it try: data = sock.recv(BUFSIZ) if data: fromwhere = sock.getpeername() mail_s = data.split(SEG_) ##seperate messages del mail_s[0] for mail_ in mail_s: mail = mail_.decode() print("recv>"+ mail) except Exception as err: print( "SOCKET ERROR: "+str(err) ) mailbox.put( (("sock_err",sock), 'Server') ) continue server_sock.close() ========================================================== ---------- resolution: not a bug -> wont fix status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 21:16:20 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 20 Oct 2016 01:16:20 +0000 Subject: [issue28474] WinError(): Python int too large to convert to C long In-Reply-To: <1476862081.01.0.00079290874453.issue28474@psf.upfronthosting.co.za> Message-ID: <1476926180.14.0.129712632009.issue28474@psf.upfronthosting.co.za> Josh Rosenberg added the comment: You can't use I as a format code safely; it silently ignores/wraps overflow on the conversion, where i raises on overflow. The unsigned converters are basically useless for resilient code in 99% of cases. I *think* I remember some private utility functions for doing this using O& though, not sure if they're available in callproc.c... ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 23:35:02 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 20 Oct 2016 03:35:02 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476934502.25.0.221705477378.issue26240@psf.upfronthosting.co.za> Martin Panter added the comment: . I left some comments on the code review. Also, I?m not sure about the links to the online documentation. We don?t do this for other modules as far as I know. The pydoc module and help() commands already add their own links, which can be configured via PYTHONDOCS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 23:35:15 2016 From: report at bugs.python.org (Kelvin You) Date: Thu, 20 Oct 2016 03:35:15 +0000 Subject: [issue28474] WinError(): Python int too large to convert to C long In-Reply-To: <1476862081.01.0.00079290874453.issue28474@psf.upfronthosting.co.za> Message-ID: <1476934515.05.0.115132943352.issue28474@psf.upfronthosting.co.za> Kelvin You added the comment: I report this issue because the function WlanScan(https://msdn.microsoft.com/zh-cn/library/windows/desktop/ms706783(v=vs.85).aspx) returns a error code 0x80342002 when the WLAN is disabled on Windows 10. ctypes.WinError() raise an exception of 'Python int too large to convert to C long' when handle this error code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 23:53:50 2016 From: report at bugs.python.org (Kelvin You) Date: Thu, 20 Oct 2016 03:53:50 +0000 Subject: [issue28474] WinError(): Python int too large to convert to C long In-Reply-To: <1476862081.01.0.00079290874453.issue28474@psf.upfronthosting.co.za> Message-ID: <1476935629.99.0.301444400254.issue28474@psf.upfronthosting.co.za> Kelvin You added the comment: Here is the full list of windows error code: https://msdn.microsoft.com/en-us/library/cc231196.aspx You can see a lot of error codes is above 0x80000000. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 23:57:48 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 03:57:48 +0000 Subject: [issue28480] Compile error on Modules/socketmodule.c In-Reply-To: <1476919678.71.0.954266925792.issue28480@psf.upfronthosting.co.za> Message-ID: <20161020035742.110696.65684.40AF7A5C@psf.io> Roundup Robot added the comment: New changeset 17629dee23ca by Martin Panter in branch '2.7': Issue #28480: Avoid label at end of compound statement --without-threads https://hg.python.org/cpython/rev/17629dee23ca ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 00:03:48 2016 From: report at bugs.python.org (MinJae Kwon) Date: Thu, 20 Oct 2016 04:03:48 +0000 Subject: [issue28481] Weird string comparison bug Message-ID: <1476936228.56.0.395643347684.issue28481@psf.upfronthosting.co.za> New submission from MinJae Kwon: I found bug i think about string comparison > var1 = 'aa' > var1 is 'aa' # This is True But if the string literal has special chacter (e.g., colon), the comparison results in False > var2 = ':bb' > var2 is ':bb' # This is False Check it please. ---------- components: Unicode messages: 279011 nosy: MinJae Kwon, ezio.melotti, haypo priority: normal severity: normal status: open title: Weird string comparison bug type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 00:21:35 2016 From: report at bugs.python.org (Georgey) Date: Thu, 20 Oct 2016 04:21:35 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476937295.16.0.161047165256.issue28447@psf.upfronthosting.co.za> Georgey added the comment: The socket close accident is not caused by queue or calling handle_sock_error at all, it happened right after select error After changing the Exception handling of main Thread: ------------------------ except Exception as err: print("error:"+str(err)) print(sock.getpeername()) mailbox.put( (("sock_err",sock), 'Server') ) continue server_sock.close() ======================== I also get the same type of error: ------------------------ Traceback (most recent call last): File "C:\Users\user\Desktop\SelectWinServer.py", line 112, in data = sock.recv(BUFSIZ) ConnectionResetError: [WinError 10054] connection forcibly close During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\user\Desktop\SelectWinServer.py", line 123, in print(sock.getpeername()) OSError: [WinError 10038] not a socket ======================== ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 00:23:15 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 20 Oct 2016 04:23:15 +0000 Subject: [issue28482] test_typing fails if asyncio unavailable Message-ID: <1476937394.99.0.275548920794.issue28482@psf.upfronthosting.co.za> New submission from Martin Panter: If you compile with ?configure --without-threads?, various tests are already skipped because they rely on multithreading. However test_typing does not seem to handle this. It tries to import ?asyncio?, which seems to depend on multithreading. I presume it is expected that asyncio requires multithreading, so perhaps the affected tests should be skipped in test_typing. Here is my attempt to skip them; please review. ---------- components: Tests files: st-typing.patch keywords: patch messages: 279013 nosy: gvanrossum, martin.panter priority: normal severity: normal stage: patch review status: open title: test_typing fails if asyncio unavailable type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45147/st-typing.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 00:33:01 2016 From: report at bugs.python.org (Eryk Sun) Date: Thu, 20 Oct 2016 04:33:01 +0000 Subject: [issue28481] Weird string comparison bug In-Reply-To: <1476936228.56.0.395643347684.issue28481@psf.upfronthosting.co.za> Message-ID: <1476937981.48.0.817404399577.issue28481@psf.upfronthosting.co.za> Eryk Sun added the comment: Interning of strings is an implementation detail for the efficient storage of variable and attribute names. A string with ':' in it cannot be a variable or attribute name and thus is not interned. But you don't need to know which strings are interned or why they're interned because correct Python code should never compare strings by identity. Use an equality comparison, e.g. (var2 == ':bb'). Generally identity comparisons are of limited use in Python, such as checking for a singleton object such as None. ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 01:31:10 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 05:31:10 +0000 Subject: [issue28480] Compile error on Modules/socketmodule.c In-Reply-To: <1476919678.71.0.954266925792.issue28480@psf.upfronthosting.co.za> Message-ID: <20161020053107.38784.37992.CBAC4149@psf.io> Roundup Robot added the comment: New changeset 9316b4ebf3fa by Martin Panter in branch '3.6': Issue #28480: Avoid label at end of compound statement --without-threads https://hg.python.org/cpython/rev/9316b4ebf3fa New changeset 7cb86d404866 by Martin Panter in branch '3.6': Issue #28480: Adjust or skip tests if multithreading is disabled https://hg.python.org/cpython/rev/7cb86d404866 New changeset 948cf38793ce by Martin Panter in branch 'default': Issue #28480: Merge multithreading fixes from 3.6 https://hg.python.org/cpython/rev/948cf38793ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 03:01:05 2016 From: report at bugs.python.org (Thomas Becker) Date: Thu, 20 Oct 2016 07:01:05 +0000 Subject: [issue28483] python --version prints output to stderr Message-ID: <1476946865.44.0.922931581834.issue28483@psf.upfronthosting.co.za> New submission from Thomas Becker: I am using Python 2.7.10 on Windows 8. While writing some code in NodeJS I noticed the following behaviour: `python --version` prints its output to stderr instead of stdout. In most cases this won't make any difference because both streams print to the screen. But if you want to handle the output streams separately it can cause confusion. Here is a piece of code to reproduce this behaviour (requires nodeJs): ``` var exec = require('child_process').exec; exec('python --version', function (err, stdout, stderr) { console.log('stdout: ' + JSON.stringify(stdout)); console.log('stderr: ' + JSON.stringify(stderr)); } ``` ---------- components: Windows messages: 279016 nosy: ctb, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: python --version prints output to stderr type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 03:03:24 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 20 Oct 2016 07:03:24 +0000 Subject: [issue28483] python --version prints output to stderr In-Reply-To: <1476946865.44.0.922931581834.issue28483@psf.upfronthosting.co.za> Message-ID: <1476947004.87.0.483863132137.issue28483@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python -V and --version output to stderr instead of stdout _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 03:05:34 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 20 Oct 2016 07:05:34 +0000 Subject: [issue28478] Built-in module 'Time' does not enable functions if -Wno-error specified in the build environment In-Reply-To: <1476910922.79.0.695929522642.issue28478@psf.upfronthosting.co.za> Message-ID: <1476947134.64.0.765534963246.issue28478@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Build type: -> behavior versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 03:26:49 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 20 Oct 2016 07:26:49 +0000 Subject: [issue28484] test_capi, test_regrtest fail when multithreading disabled Message-ID: <1476948409.33.0.578194967575.issue28484@psf.upfronthosting.co.za> New submission from Martin Panter: Two tests in test_capi assume that the GIL is always used, but I don?t think it is available when Python is built with ?configure --without-threads?. So I propose to skip these tests if the ?threading? module is unavailable. In test_regrtest, a test is rerun using the -j2 option, which fails if multithreading is disabled. I propose to only run without -j2 if ?threading? does not import. Victor, I grouped these two changes together because both bits of code have your name on them. Hopefully you can give them a quick review :) ---------- components: Tests files: mt-victor.patch keywords: patch messages: 279017 nosy: haypo, martin.panter priority: normal severity: normal stage: patch review status: open title: test_capi, test_regrtest fail when multithreading disabled type: behavior versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45148/mt-victor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 03:39:19 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 20 Oct 2016 07:39:19 +0000 Subject: [issue28485] compileall.compile_dir(workers=) does not raise ValueError if multithreading disabled Message-ID: <1476949159.83.0.8638287974.issue28485@psf.upfronthosting.co.za> New submission from Martin Panter: According to the documentation and tests, a negative value for the ?workers? parameter to compileall.compile_dir() should trigger ValueError. But if Python is built with ?configure --without-threads?, the parameter is not checked. So I propose a patch to fix the implementation. ====================================================================== FAIL: test_compile_workers_non_positive (test.test_compileall.CompileallTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/proj/python/cpython/Lib/test/test_compileall.py", line 172, in test_compile_workers_non_positive compileall.compile_dir(self.directory, workers=-1) AssertionError: ValueError not raised ---------- files: mt-compile.patch keywords: patch messages: 279018 nosy: Claudiu.Popa, martin.panter priority: normal severity: normal stage: patch review status: open title: compileall.compile_dir(workers=) does not raise ValueError if multithreading disabled type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45149/mt-compile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 03:44:03 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 20 Oct 2016 07:44:03 +0000 Subject: [issue28480] Compile error on Modules/socketmodule.c In-Reply-To: <1476919678.71.0.954266925792.issue28480@psf.upfronthosting.co.za> Message-ID: <1476949443.16.0.146409067944.issue28480@psf.upfronthosting.co.za> Martin Panter added the comment: I also committed a similar but independent fix in Python 2.7 building Modules/_sqlite/connection.c, caused by revision 649937bb8f1c, and adjusted some tests to work when multithreading is disabled. For the record, I also opened Issue 28482, Issue 28484 and Issue 28485 about other test suite failures identified when multithreading is disabled. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 03:55:02 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 20 Oct 2016 07:55:02 +0000 Subject: [issue28478] Built-in module 'time' does not enable functions if -Werror specified in the build environment In-Reply-To: <1476910922.79.0.695929522642.issue28478@psf.upfronthosting.co.za> Message-ID: <1476950102.82.0.292804749901.issue28478@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- title: Built-in module 'Time' does not enable functions if -Wno-error specified in the build environment -> Built-in module 'time' does not enable functions if -Werror specified in the build environment _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 04:03:00 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Oct 2016 08:03:00 +0000 Subject: [issue28484] test_capi, test_regrtest fail when multithreading disabled In-Reply-To: <1476948409.33.0.578194967575.issue28484@psf.upfronthosting.co.za> Message-ID: <1476950580.08.0.845368381057.issue28484@psf.upfronthosting.co.za> STINNER Victor added the comment: Each time I see a bug error on --without-treads, I want to remove the option. We had a buildbot in the past, but I don't see it anymore. mt-victor.patch LGTM except of a minor comment, see my review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 05:25:38 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Oct 2016 09:25:38 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1476955538.13.0.647855535277.issue21955@psf.upfronthosting.co.za> STINNER Victor added the comment: Between inline2.patch and fastint6.patch, it seems like inline2.patch is faster (between 9% and 12% faster than fastint6.patch). Microbenchmark on Python default (rev 554fb699af8c), compilation using LTO (./configure --with-lto), GCC 6.2.1 on Fedora 24, Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, perf 0.8.3 (dev version, just after 0.8.2). Commands: ./python -m perf timeit --name='x+y' -s 'x=1; y=2' 'x+y' --dup 1000 -v -o timeit-$branch.json ./python -m perf timeit --name=sum -s "R=range(100)" "[x + x + 1 for x in R]" --dup 1000 -v --append timeit-$branch.json Results: $ python3 -m perf compare_to timeit-master.json timeit-inline2.json sum: Median +- std dev: [timeit-master] 6.23 us +- 0.13 us -> [timeit-inline2] 5.45 us +- 0.09 us: 1.14x faster x+y: Median +- std dev: [timeit-master] 15.0 ns +- 0.2 ns -> [timeit-inline2] 11.6 ns +- 0.2 ns: 1.29x faster $ python3 -m perf compare_to timeit-master.json timeit-fastint6.json sum: Median +- std dev: [timeit-master] 6.23 us +- 0.13 us -> [timeit-fastint6] 6.09 us +- 0.11 us: 1.02x faster x+y: Median +- std dev: [timeit-master] 15.0 ns +- 0.2 ns -> [timeit-fastint6] 12.7 ns +- 0.2 ns: 1.18x faster $ python3 -m perf compare_to timeit-fastint6.json timeit-inline2.json sum: Median +- std dev: [timeit-fastint6] 6.09 us +- 0.11 us -> [timeit-inline2] 5.45 us +- 0.09 us: 1.12x faster x+y: Median +- std dev: [timeit-fastint6] 12.7 ns +- 0.2 ns -> [timeit-inline2] 11.6 ns +- 0.2 ns: 1.09x faster ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 05:29:35 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Oct 2016 09:29:35 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1476955775.82.0.0311963032179.issue21955@psf.upfronthosting.co.za> STINNER Victor added the comment: Result of performance 0.3.3 (and perf 0.8.3). No major benchmark is faster. A few benchmarks seem to be event slower using fastint6.patch (but I don't really trust pybench). == fastint6.patch == $ python3 -m perf compare_to master.json fastint6.json --group-by-speed --min-speed=5 Slower (3): - pybench.ConcatUnicode: 52.7 ns +- 0.0 ns -> 56.1 ns +- 0.4 ns: 1.06x slower - pybench.ConcatStrings: 52.7 ns +- 0.3 ns -> 56.1 ns +- 0.1 ns: 1.06x slower - pybench.CompareInternedStrings: 16.5 ns +- 0.0 ns -> 17.4 ns +- 0.0 ns: 1.05x slower Faster (4): - pybench.SimpleIntFloatArithmetic: 441 ns +- 2 ns -> 400 ns +- 6 ns: 1.10x faster - pybench.SimpleIntegerArithmetic: 441 ns +- 2 ns -> 401 ns +- 5 ns: 1.10x faster - pybench.SimpleLongArithmetic: 643 ns +- 4 ns -> 608 ns +- 6 ns: 1.06x faster - genshi_text: 79.6 ms +- 0.5 ms -> 75.5 ms +- 0.8 ms: 1.05x faster Benchmark hidden because not significant (114): 2to3, call_method, (...) == inline2.patch == haypo at selma$ python3 -m perf compare_to master.json inline2.json --group-by-speed --min-speed=5 Faster (2): - spectral_norm: 223 ms +- 1 ms -> 209 ms +- 1 ms: 1.07x faster - pybench.SimpleLongArithmetic: 643 ns +- 4 ns -> 606 ns +- 7 ns: 1.06x faster Benchmark hidden because not significant (119): 2to3, call_method, (...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 05:31:18 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Oct 2016 09:31:18 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1476955878.03.0.348929355665.issue21955@psf.upfronthosting.co.za> STINNER Victor added the comment: fastint6_inline2_json.tar.gz: archive of JSON files - fastint6.json - inline2.json - master.json - timeit-fastint6.json - timeit-inline2.json - timeit-master.json ---------- Added file: http://bugs.python.org/file45150/fastint6_inline2_json.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 05:41:15 2016 From: report at bugs.python.org (Pavel Cisar) Date: Thu, 20 Oct 2016 09:41:15 +0000 Subject: [issue28486] Wrong end index and subgroup for group match Message-ID: <1476956475.68.0.446290119738.issue28486@psf.upfronthosting.co.za> New submission from Pavel Cisar: Hi, python re returns wrong end index of searched group and also subgroup itself. Example: In: price_string = u"1 307 000,00 K?" In: match = re.search(r"([,\.]00)\s?.*$", price_string) In: print price_string, "|", match.groups(), "|", match.group(0), "|", match.start(0), "|", match.end(0), "|", match.span() Out: 1?307?000,00?K? | (u',00',) | ,00?K? | 9 | 15 | (9, 15) As I understand documentation start and end functions should return start and endindex of subgroup matched in search. I .groups() output I see subgroup is correct u',00' but end function returns end index for subgroup ',00?K?'. Also calling specific subgroup .group(0) returns incorrect one ',00?K?'. It seems match return end index of whole pattern, not only subgroup. ---------- components: Regular Expressions messages: 279024 nosy: Pavel Cisar, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Wrong end index and subgroup for group match type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 05:41:56 2016 From: report at bugs.python.org (Pavel Cisar) Date: Thu, 20 Oct 2016 09:41:56 +0000 Subject: [issue28486] Wrong end index and subgroup for group match In-Reply-To: <1476956475.68.0.446290119738.issue28486@psf.upfronthosting.co.za> Message-ID: <1476956516.03.0.542710080581.issue28486@psf.upfronthosting.co.za> Changes by Pavel Cisar : ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 06:03:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Oct 2016 10:03:39 +0000 Subject: [issue28486] Wrong end index and subgroup for group match In-Reply-To: <1476956475.68.0.446290119738.issue28486@psf.upfronthosting.co.za> Message-ID: <1476957819.82.0.943333024582.issue28486@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: group(0) returns the whole match. group(1) returns the first captured subgroup. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 06:11:39 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Oct 2016 10:11:39 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1476958299.17.0.793511662636.issue21955@psf.upfronthosting.co.za> STINNER Victor added the comment: The fatest patch (inline2.patch) has a negligible impact on benchmarks. The purpose of an optimization is to make Python faster, it's not the case here, so I close the issue. Using timeit, the largest speedup is 1.29x faster. Using performance, spectral_norm is 1.07x faster and pybench.SimpleLongArithmetic is 1.06x faster. I consider that spectral_norm and pybench.SimpleLongArithmetic are microbenchmarks and so not representative of a real application. The issue was fun, thank you for playing with me the game of micro-optimization ;-) Let's move to more interesting optimizations having a larger impact on more realistic workloads, like cache global variables, optimizing method calls, fastcalls, etc. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 06:12:46 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Oct 2016 10:12:46 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <1476958366.61.0.744553614726.issue21955@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: fixed -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 06:18:30 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 20 Oct 2016 10:18:30 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1476958710.14.0.661803457684.issue28444@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 06:19:59 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 10:19:59 +0000 Subject: [issue21955] ceval.c: implement fast path for integers with a single digit In-Reply-To: <1405069827.92.0.324101531394.issue21955@psf.upfronthosting.co.za> Message-ID: <20161020101956.12283.66900.41E1902A@psf.io> Roundup Robot added the comment: New changeset 61fcb12a9873 by Victor Stinner in branch 'default': Issue #21955: Please don't try to optimize int+int https://hg.python.org/cpython/rev/61fcb12a9873 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 06:20:20 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 20 Oct 2016 10:20:20 +0000 Subject: [issue27659] Check for the existence of crypt() In-Reply-To: <1469948678.43.0.816389049938.issue27659@psf.upfronthosting.co.za> Message-ID: <1476958820.27.0.805812906988.issue27659@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 08:11:43 2016 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 20 Oct 2016 12:11:43 +0000 Subject: [issue28487] missing _math.o target in 2.7 Makefile Message-ID: <1476965503.55.0.0398048530012.issue28487@psf.upfronthosting.co.za> New submission from Skip Montanaro: Unless I have my hg repo dependencies incorrect, this target seems to be missing from the 2.7 Makefile.pre.in: # This is shared by the math and cmath modules Modules/_math.o: Modules/_math.c Modules/_math.h $(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $< My cpython repo pulls from https://hg.python.org/cpython, My 2.7 repo pulls from my cpython repo. I have other branches to build older 3.x versions which also pull from my cpython repo. The math and cmath modules build fine, though they don't seem to have that target either. So perhaps I'm barking up the wrong tree. Either way, 2.7 won't build properly for me unless I explicitly execute make Modules/_math.o ---------- components: Build messages: 279028 nosy: skip.montanaro priority: normal severity: normal status: open title: missing _math.o target in 2.7 Makefile versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 08:12:48 2016 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 20 Oct 2016 12:12:48 +0000 Subject: [issue28487] missing _math.o target in 2.7 Makefile In-Reply-To: <1476965503.55.0.0398048530012.issue28487@psf.upfronthosting.co.za> Message-ID: <1476965568.0.0.633571819783.issue28487@psf.upfronthosting.co.za> Skip Montanaro added the comment: Is this perhaps related to the (closed) issue 24421? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 08:28:48 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Oct 2016 12:28:48 +0000 Subject: [issue28487] missing _math.o target in 2.7 Makefile In-Reply-To: <1476965503.55.0.0398048530012.issue28487@psf.upfronthosting.co.za> Message-ID: <1476966528.03.0.826212031252.issue28487@psf.upfronthosting.co.za> STINNER Victor added the comment: > Unless I have my hg repo dependencies incorrect, this target seems to be missing from the 2.7 Makefile.pre.in: The math module is compiled by setup.py: # math library functions, e.g. sin() exts.append( Extension('math', ['mathmodule.c'], extra_objects=[shared_math], depends=['_math.h', shared_math], libraries=math_libs) ) ---------- nosy: +haypo resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 09:07:50 2016 From: report at bugs.python.org (Alexander Belchenko) Date: Thu, 20 Oct 2016 13:07:50 +0000 Subject: [issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong Message-ID: <1476968870.46.0.0294634101167.issue28488@psf.upfronthosting.co.za> New submission from Alexander Belchenko: Running shutil.make_archive('a', 'zip', 'subdir') is created wrong and not really needed entry "./" which is visible in zipfile.ZipFile.namelist(): ['./', 'foo/', 'hello.txt', 'foo/bar.txt'] This "./" affects some (windows) unzip tools which produces warnings/errors about this incorrect entry. This error present in Python 2.7.11-12 and Python 3.4.4 (those I have installed right now). But Python 3.3.5 does not have it, maybe because it omits entries for directories at all. I've attached a simple script which illustrates problem. Tested on Windows with mentioned python versions. Can't reproduce on Centos 7.2 with Python 3.4.3 and 2.7.5. I suppose it could be realted to the change I spot in latest 2.7 changelog: - Issue #24982: shutil.make_archive() with the "zip" format now adds entries for directories (including empty directories) in ZIP file. ---------- components: Library (Lib) files: make-archive-test.py messages: 279031 nosy: bialix priority: normal severity: normal status: open title: shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong versions: Python 2.7, Python 3.4 Added file: http://bugs.python.org/file45151/make-archive-test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 09:37:59 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Oct 2016 13:37:59 +0000 Subject: [issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong In-Reply-To: <1476968870.46.0.0294634101167.issue28488@psf.upfronthosting.co.za> Message-ID: <1476970679.4.0.362746850054.issue28488@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +alanmcintyre, serhiy.storchaka, tarek, twouters stage: -> needs patch type: -> behavior versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 10:01:48 2016 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 20 Oct 2016 14:01:48 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1476972108.09.0.122358713727.issue27910@psf.upfronthosting.co.za> Petr Viktorin added the comment: ping Anything I can do to move this forward? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 10:15:49 2016 From: report at bugs.python.org (Steve Dower) Date: Thu, 20 Oct 2016 14:15:49 +0000 Subject: [issue28474] WinError(): Python int too large to convert to C long In-Reply-To: <1476862081.01.0.00079290874453.issue28474@psf.upfronthosting.co.za> Message-ID: <1476972949.9.0.546315487236.issue28474@psf.upfronthosting.co.za> Steve Dower added the comment: All HRESULT values are, since the topmost bit indicates that it's an error, but all the others should be 16-bit positive integers IIRC. I don't think this function is meant to work with HRESULTs, but I could be wrong - fairly sure it's meant for Win32 error codes, though I'd have to dig into the format function it calls. What function are you calling that produces an HRESULT from GetLastError? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 10:18:11 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 20 Oct 2016 14:18:11 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1476973091.85.0.257485295611.issue27910@psf.upfronthosting.co.za> Emanuel Barry added the comment: This is not a regression, the documentation was just not fully updated when the new feature was added. Patch looks good. This should probably be applied to the 3.5 branch as well. ---------- nosy: +ebarry stage: patch review -> commit review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 10:43:18 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 20 Oct 2016 14:43:18 +0000 Subject: [issue28482] test_typing fails if asyncio unavailable In-Reply-To: <1476937394.99.0.275548920794.issue28482@psf.upfronthosting.co.za> Message-ID: <1476974598.7.0.360491625164.issue28482@psf.upfronthosting.co.za> Guido van Rossum added the comment: Can you submit this as a PR upstream, to github.com/python/typing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 10:57:01 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 20 Oct 2016 14:57:01 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1476975421.62.0.732467529453.issue28447@psf.upfronthosting.co.za> R. David Murray added the comment: Unless I'm missing something, this indicates that the problem is that once the far end closes, Windows will no longer return the peer name. And, unless I'm misreading, the behavior will be the same on Unix. The man page for getpeername says that ENOTCONN is returned if the socket is not connected. This isn't a bug in Python. Or Windows, though the error message is a bit counter-intuitive to a unix programmer. ---------- nosy: +r.david.murray resolution: wont fix -> not a bug stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 11:00:14 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 15:00:14 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1476975614.93.0.0149564120806.issue27593@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hello Brett, after my review, I propose this patch where I have added the missing indents and remove the ./configure file (because this one can be generated by autoreconf) ---------- nosy: +matrixise Added file: http://bugs.python.org/file45152/issue27593-with-indent-3.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 11:09:58 2016 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 20 Oct 2016 15:09:58 +0000 Subject: [issue28487] missing _math.o target in 2.7 Makefile In-Reply-To: <1476966528.03.0.826212031252.issue28487@psf.upfronthosting.co.za> Message-ID: Skip Montanaro added the comment: I'm not sure you understood my problem. Starting with make distclean ./configure make the math and cmath modules fail to build because Modules/_math.o is missing. It's not a make thing. I did notice the cpython Makefile has a target for Modules/_math.o and assumed that since it was missing from the 2.7 Makefile, that was the problem, but maybe not. Still, something is fishy. Can you confirm that having my 2.7 repo depend on my cpython repo should work? If that's the problem, I'd like to know. It certainly seems to work for the other branches I build. S ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 11:19:31 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 20 Oct 2016 15:19:31 +0000 Subject: [issue28487] missing _math.o target in 2.7 Makefile In-Reply-To: <1476965503.55.0.0398048530012.issue28487@psf.upfronthosting.co.za> Message-ID: <1476976771.39.0.189171925008.issue28487@psf.upfronthosting.co.za> Zachary Ware added the comment: Your HG setup sounds fine, though you may be interested in the 'share' extension. It allows you to share the data store between several checkouts such that doing a 'pull' in one checkout makes any new changesets available in all checkouts without having to do additional local pulls. This is a strange issue, though. The make target for _math.o is here: https://hg.python.org/cpython/file/2.7/Makefile.pre.in#l533 and the 'sharedmods' target depends on it just below there, and it builds fine for me. What does 'hg summary' give you? ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 11:34:55 2016 From: report at bugs.python.org (Robin Becker) Date: Thu, 20 Oct 2016 15:34:55 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1476977695.42.0.143651958369.issue28092@psf.upfronthosting.co.za> Robin Becker added the comment: for what it's worth I tried reverse patching https://hg.python.org/cpython/rev/63ae310b60ff/ and https://hg.python.org/cpython/rev/2f77a9f0b9d6/ in the manylinux docker and the make then proceeds fine with one warning at the end *** WARNING: renaming "_sqlite3" since importing it failed: build/lib.linux-x86_64-3.6/_sqlite3.cpython-36m-x86_64-linux-gnu.so: undefined symbol: sqlite3_stmt_readonly Following modules built successfully but were removed because they could not be imported: _sqlite3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 11:40:20 2016 From: report at bugs.python.org (Justin Foo) Date: Thu, 20 Oct 2016 15:40:20 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1476978020.38.0.143049338502.issue27755@psf.upfronthosting.co.za> Justin Foo added the comment: Is #24781 likely to make it into Python 3.6? Otherwise, would this patch be of any benefit in the meantime? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 11:54:08 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Oct 2016 15:54:08 +0000 Subject: [issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong In-Reply-To: <1476968870.46.0.0294634101167.issue28488@psf.upfronthosting.co.za> Message-ID: <1476978848.84.0.646290024129.issue28488@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report Alexander. Yes, this regression was introduced in issue24982. Proposed patch fixes it. ---------- assignee: -> serhiy.storchaka keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file45153/shutil_make_archive_zip_curdir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:21:53 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Oct 2016 16:21:53 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1476980513.24.0.489923963628.issue27755@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have not been working on IDLE for the last month, but may get back to it. Patched like this can go in any release, not just .0 version releases. (See PEP 434 for why.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:38:24 2016 From: report at bugs.python.org (Brett Cannon) Date: Thu, 20 Oct 2016 16:38:24 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1476981504.43.0.884198083152.issue27593@psf.upfronthosting.co.za> Brett Cannon added the comment: The inclusion of changes to ./configure is on purpose since the file is in the repository and not everyone has autoconf installed to necessarily re-generate the file (and we have had issues with people using really old versions of autoconf in the past). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:40:53 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Oct 2016 16:40:53 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1476981653.8.0.873820275758.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: I'll get to this one shortly. ---------- assignee: brett.cannon -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:44:31 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 16:44:31 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1476981871.48.0.706974171851.issue27593@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Brett, With your comment, I have added the modified ./configure. Here is the last patch including the indentation. ---------- Added file: http://bugs.python.org/file45154/issue27593-with-indent-3.7-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:48:50 2016 From: report at bugs.python.org (Eryk Sun) Date: Thu, 20 Oct 2016 16:48:50 +0000 Subject: [issue28474] WinError(): Python int too large to convert to C long In-Reply-To: <1476862081.01.0.00079290874453.issue28474@psf.upfronthosting.co.za> Message-ID: <1476982130.37.0.96244748857.issue28474@psf.upfronthosting.co.za> Eryk Sun added the comment: Kelvin is calling WlanScan [1], which returns an error code that apparently can include HRESULT (signed) values cast as DWORD (unsigned) values, including 0x80342002 (ERROR_NDIS_DOT11_POWER_STATE_INVALID). ctypes.FormatError calls FormatMessage [2] with the flag FORMAT_MESSAGE_FROM_SYSTEM. About half of the system error codes defined in winerror.h consist of COM HRESULT codes. But, to clarify Kelvin's link [3], this does not include NTSTATUS values from kernel-mode system calls. NTSTATUS values require the ntdll.dll message table. [1]: https://msdn.microsoft.com/en-us/library/ms706783 [2]: https://msdn.microsoft.com/en-us/library/ms679351 [3]: https://msdn.microsoft.com/en-us/library/cc231196 A workaround in this case is to use the default c_int restype to return the error as a signed integer: >>> ctypes.FormatError(0x80342002 - 2**32) "The wireless local area network interface is powered down and doesn't support the requested operation." A similar workaround works for setting the exit code to an HRESULT or NTSTATUS error code: >>> hex(subprocess.call('python -c "import os; os._exit(0xC0000001)"')) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C long '0x1' >>> hex(subprocess.call('python -c "import sys; sys.exit(0xC0000001)"')) '0xffffffff' >>> hex(subprocess.call('python -c "import os; os._exit(0xC0000001 - 2**32)"')) '0xc0000001' >>> hex(subprocess.call('python -c "import sys; sys.exit(0xC0000001 - 2**32)"')) '0xc0000001' ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:52:47 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 16:52:47 +0000 Subject: [issue24381] Got warning when compiling ffi.c on Mac In-Reply-To: <1433429045.53.0.896226238413.issue24381@psf.upfronthosting.co.za> Message-ID: <1476982367.06.0.650057409597.issue24381@psf.upfronthosting.co.za> St?phane Wirtel added the comment: @victor There are two issues. 1. The bundled version of CFFI is just outdated 2. There is an issue for the removal of libffi_osx (http://bugs.python.org/issue27979) so, we can fix the bundled libcffi or close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:57:15 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 20 Oct 2016 16:57:15 +0000 Subject: [issue24381] Got warning when compiling ffi.c on Mac In-Reply-To: <1433429045.53.0.896226238413.issue24381@psf.upfronthosting.co.za> Message-ID: <1476982635.62.0.832479986595.issue24381@psf.upfronthosting.co.za> Zachary Ware added the comment: Correction: #27979 is unrelated to Modules/_ctypes/libffi_osx. A hypothetical (at this point) removal of libffi_osx will be a separate issue. I think it's probably worthwhile to fix this issue. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:57:28 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 16:57:28 +0000 Subject: [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476982648.19.0.352603735737.issue26010@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hello Yury, I have updated your patch, with a small description for CO_ASYNC_GENERATOR. I need a review for the description. Stephane ---------- Added file: http://bugs.python.org/file45155/issue26010-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:58:10 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 16:58:10 +0000 Subject: [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476982690.69.0.868830724645.issue26010@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:10:44 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 17:10:44 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1476983444.29.0.0725473375327.issue28214@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Serhiy, your patch works fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:12:07 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 17:12:07 +0000 Subject: [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <20161020171154.12110.26610.32854EEF@psf.io> Roundup Robot added the comment: New changeset 681924a9eefd by Yury Selivanov in branch '3.5': Issue #26010: Document CO_* constants https://hg.python.org/cpython/rev/681924a9eefd New changeset 5023c182a8a4 by Yury Selivanov in branch '3.6': Merge 3.5 + document CO_ASYNC_GENERATOR; issue #26010 https://hg.python.org/cpython/rev/5023c182a8a4 New changeset 3c4833d2fdbe by Yury Selivanov in branch 'default': Merge 3.6 (issue #26010) https://hg.python.org/cpython/rev/3c4833d2fdbe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:13:03 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Oct 2016 17:13:03 +0000 Subject: [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476983583.98.0.485305637459.issue26010@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you Stephane for bumping this issue up. I've committed the patch. I've documented CO_ASYNC_GENERATOR in more detail, and I also added "versionadded" tags to CO_COROUTINE and CO_ITERABLE_COROUTINE. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:14:15 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 17:14:15 +0000 Subject: [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476983655.76.0.90562483845.issue26010@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Nice Yury, sorry for the missing versionadded directive. And now, I have a description for CO_ASYNC_GENERATOR ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:14:28 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 17:14:28 +0000 Subject: [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476983668.11.0.563636254426.issue26010@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:22:03 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 17:22:03 +0000 Subject: [issue24381] Got warning when compiling ffi.c on Mac In-Reply-To: <1433429045.53.0.896226238413.issue24381@psf.upfronthosting.co.za> Message-ID: <1476984123.35.0.103476070419.issue24381@psf.upfronthosting.co.za> St?phane Wirtel added the comment: @zach.ware so in this case, we could merge the patch in 3.6 & 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:23:36 2016 From: report at bugs.python.org (Ryan Gonzalez) Date: Thu, 20 Oct 2016 17:23:36 +0000 Subject: [issue28489] Fix comment in tokenizer.c Message-ID: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> New submission from Ryan Gonzalez: Attached is a little fix for a comment in tokenizer.c. I noticed that it was never updated for the inclusion of f-strings. ---------- assignee: docs at python components: Documentation files: 0001-Fix-comment-in-tokenizer.c.patch keywords: patch messages: 279056 nosy: Ryan.Gonzalez, docs at python priority: normal severity: normal status: open title: Fix comment in tokenizer.c versions: Python 3.6 Added file: http://bugs.python.org/file45156/0001-Fix-comment-in-tokenizer.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:25:14 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 17:25:14 +0000 Subject: [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1476984314.84.0.105958838263.issue28489@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Thank you for this patch. ---------- nosy: +matrixise versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:25:36 2016 From: report at bugs.python.org (Hugh Brown) Date: Thu, 20 Oct 2016 17:25:36 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1476984336.58.0.0253381000046.issue18219@psf.upfronthosting.co.za> Hugh Brown added the comment: I came across this problem today when I was using a 1000+ column CSV from a client. It was taking about 15 minutes to process each file. I found the problem and made this change: # wrong_fields = [k for k in rowdict if k not in self.fieldnames] wrong_fields = set(rowdict.keys()) - set(self.fieldnames) And my processing time went down to 12 seconds per file -- a 75x speedup. It's kind of sad that this change has been waiting for over three years when it is so simple. Any chance we could make one of the acceptable code changes and release it? ---------- nosy: +hughdbrown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:47:49 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 20 Oct 2016 17:47:49 +0000 Subject: [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1476985669.7.0.64508727665.issue28489@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'd actually change this to be something like: Process b"", r"", u"", and the various legal combinations. There are 24 total combinations when you add upper case. I actually wrote a script in Lib/tokenize.py to generate them all. And when I add binary f-strings, that number climbs to 80. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:55:12 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 20 Oct 2016 17:55:12 +0000 Subject: [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1476986112.88.0.443685620514.issue28489@psf.upfronthosting.co.za> Eric V. Smith added the comment: FWIW, in Lib/tokenize.py, it's _all_string_prefixes(): >>> _all_string_prefixes() set(['', 'FR', 'rB', 'rF', 'BR', 'Fr', 'RF', 'rf', 'RB', 'fr', 'B', 'rb', 'F', 'Br', 'R', 'U', 'br', 'fR', 'b', 'f', 'Rb', 'Rf', 'r', 'u', 'bR']) My basic point is that trying to list them all is hard and a maintenance problem. So as long as we're not being exhaustive, the comment should just state the gist of what the code does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 14:03:19 2016 From: report at bugs.python.org (Steve Newcomb) Date: Thu, 20 Oct 2016 18:03:19 +0000 Subject: [issue28490] inappropriate OS.Error "Invalid cross-device link" Message-ID: <1476986599.39.0.831888173256.issue28490@psf.upfronthosting.co.za> New submission from Steve Newcomb: os.rename() raises OSError with a misleading message saying "cross-device" when no cross-device activity is involved. Here, running on Ubuntu 16.04.1 using and ext4 filesystem, both filepaths are in the same filesystem, and the error is evidently due to the fact that a file already exists at the target path: (Pdb) os.path.isfile( '/persist/nobackup/backupDisks/d38BasLijPupBak/d38-backup.20161020/d38-_,.,_home2_,.,_rack/.Xauthority') True (Pdb) os.path.isfile( '/persist/nobackup/backupDisks/d38BasLijPupBak/d38-20161020/home2/rack/.Xauthority') True (Pdb) os.rename( '/persist/nobackup/backupDisks/d38BasLijPupBak/d38-backup.20161020/d38-_,.,_home2_,.,_rack/.Xauthority', '/persist/nobackup/backupDisks/d38BasLijPupBak/d38-20161020/home2/rack/.Xauthor\ ity') *** OSError: [Errno 18] Invalid cross-device link: '/persist/nobackup/backupDisks/d38BasLijPupBak/d38-backup.20161020/d38-_,.,_home2_,.,_rack/.Xauthority' -> '/persist/nobackup/backupDisks/d38BasLijPup\ Bak/d38-20161020/home2/rack/.Xauthority' ---------- components: IO messages: 279061 nosy: steve.newcomb priority: normal severity: normal status: open title: inappropriate OS.Error "Invalid cross-device link" versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 14:05:29 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 20 Oct 2016 18:05:29 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1476986729.09.0.111929707595.issue18219@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: -> commit review versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 14:21:49 2016 From: report at bugs.python.org (Steve Newcomb) Date: Thu, 20 Oct 2016 18:21:49 +0000 Subject: [issue28490] inappropriate OS.Error "Invalid cross-device link" In-Reply-To: <1476986599.39.0.831888173256.issue28490@psf.upfronthosting.co.za> Message-ID: <1476987709.7.0.513154950013.issue28490@psf.upfronthosting.co.za> Steve Newcomb added the comment: Oops. My bad. There was a symlink in one of those paths. The message is valid. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 14:25:32 2016 From: report at bugs.python.org (Eryk Sun) Date: Thu, 20 Oct 2016 18:25:32 +0000 Subject: [issue28490] inappropriate OS.Error "Invalid cross-device link" In-Reply-To: <1476986599.39.0.831888173256.issue28490@psf.upfronthosting.co.za> Message-ID: <1476987932.4.0.508967714087.issue28490@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 14:40:27 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 20 Oct 2016 18:40:27 +0000 Subject: [issue28491] Remove bundled libffi for OSX Message-ID: <1476988827.6.0.878520006506.issue28491@psf.upfronthosting.co.za> New submission from Zachary Ware: Here's a patch that at least allows _ctypes to be built against a Homebrew libffi and pass the test_ctypes. It is almost certainly not a complete patch, but may serve as a basis for something that will actually work. ---------- components: Build, ctypes, macOS files: remove_libffi_osx.diff keywords: patch messages: 279063 nosy: Chi Hsuan Yen, matrixise, ned.deily, r.david.murray, ronaldoussoren, zach.ware priority: normal severity: normal stage: test needed status: open title: Remove bundled libffi for OSX type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45157/remove_libffi_osx.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 14:41:44 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 18:41:44 +0000 Subject: [issue28491] Remove bundled libffi for OSX In-Reply-To: <1476988827.6.0.878520006506.issue28491@psf.upfronthosting.co.za> Message-ID: <1476988904.16.0.77665660373.issue28491@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I will test on my OSX (El Capitan) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 14:51:02 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Thu, 20 Oct 2016 18:51:02 +0000 Subject: [issue28491] Remove bundled libffi for OSX In-Reply-To: <1476988827.6.0.878520006506.issue28491@psf.upfronthosting.co.za> Message-ID: <1476989462.61.0.401151553484.issue28491@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: With this change pkg-config becomes mandatory on macOS, too. As Ned has mentioned in issue28207, pkg-config is not pre-installed with macOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 14:52:26 2016 From: report at bugs.python.org (James Schneider) Date: Thu, 20 Oct 2016 18:52:26 +0000 Subject: [issue20825] containment test for "ip_network in ip_network" In-Reply-To: <1393766299.38.0.300697561376.issue20825@psf.upfronthosting.co.za> Message-ID: <1476989546.29.0.0247113205181.issue20825@psf.upfronthosting.co.za> James Schneider added the comment: Please consider for implementation in 3.6. I'd love it even more for 3.5 but I don't think that will happen. With the latest patch, I don't believe there are any backwards-incompatible changes, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 15:23:16 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Oct 2016 19:23:16 +0000 Subject: [issue28491] Remove bundled libffi for OSX In-Reply-To: <1476988827.6.0.878520006506.issue28491@psf.upfronthosting.co.za> Message-ID: <1476991396.28.0.892508093806.issue28491@psf.upfronthosting.co.za> Ned Deily added the comment: Yes, we shouldn't be depending on pkg-config being available. I am not at all keen on adding a dependency on a third-party library supplied by another distributor. What I would like to see is: (1) add libffi to the third-party libs built and used for the macOS installer build, which also means on all supported versions; (2) then, more generally, refactor the third-party lib builds (e.g. OpenSSL, SQLite, xz, ncurses, et al, and then libffi) out of the installer build script and provide an option to ./configure to allow the third-party libs to be built and used in a regular developer build as the absence of or lack of updates to them in macOS releases is a growing problem. At that point we can get rid of the bundled libffi source. At the moment, AFAIK, the presence of the bundled libffi source is not causing any problems so this isn't a critical problem, unlike the case with OpenSSL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 15:32:27 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 20 Oct 2016 19:32:27 +0000 Subject: [issue25953] re fails to identify invalid numeric group references in replacement strings In-Reply-To: <1451072808.1.0.287523380704.issue25953@psf.upfronthosting.co.za> Message-ID: <1476991947.77.0.279893091603.issue25953@psf.upfronthosting.co.za> SilentGhost added the comment: Updated patch taking Serhiy's comments into account. There was another case on line 725 for when zero is used as a group number, I'm not sure though if it falls within the scope of this issue, so it's not included in the current patch. ---------- versions: -Python 3.5 Added file: http://bugs.python.org/file45158/25953_3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 15:35:30 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 19:35:30 +0000 Subject: [issue28491] Remove bundled libffi for OSX In-Reply-To: <1476988827.6.0.878520006506.issue28491@psf.upfronthosting.co.za> Message-ID: <1476992130.52.0.892070844215.issue28491@psf.upfronthosting.co.za> St?phane Wirtel added the comment: On my OSX with El Capitan and HomeBrew Configuration: env PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig ./configure --prefix=$PWD-build Compilation: make Tests: ./python.exe -c 'import ctypes' Results: * No SIGSEGV * Add a new dependency to pkg-config :/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 15:42:44 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Oct 2016 19:42:44 +0000 Subject: [issue28492] C implementation of asyncio.Future doesn't set value of StopIteration correctly Message-ID: <1476992564.36.0.624486466512.issue28492@psf.upfronthosting.co.za> New submission from Yury Selivanov: Specifically when the result of the Future is tuple. ---------- components: asyncio messages: 279070 nosy: gvanrossum, inada.naoki, yselivanov priority: normal severity: normal status: open title: C implementation of asyncio.Future doesn't set value of StopIteration correctly versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 15:44:02 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 19:44:02 +0000 Subject: [issue24381] Got warning when compiling ffi.c on Mac In-Reply-To: <1433429045.53.0.896226238413.issue24381@psf.upfronthosting.co.za> Message-ID: <20161020194236.18103.11318.BF119B8E@psf.io> Roundup Robot added the comment: New changeset 2b089035a453 by Ned Deily in branch '3.5': Issue #24381: Avoid unused function warning when building bundled macOS libffi. https://hg.python.org/cpython/rev/2b089035a453 New changeset c60d41590054 by Ned Deily in branch '3.6': Issue #24381: merge from 3.5 https://hg.python.org/cpython/rev/c60d41590054 New changeset 59838bede1de by Ned Deily in branch 'default': Issue #24381: merge from 3.6 https://hg.python.org/cpython/rev/59838bede1de New changeset cca20d28f348 by Ned Deily in branch '2.7': Issue #24381: Avoid unused function warning when building bundled macOS libffi. https://hg.python.org/cpython/rev/cca20d28f348 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 15:46:10 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Oct 2016 19:46:10 +0000 Subject: [issue24381] Got warning when compiling ffi.c on Mac In-Reply-To: <1433429045.53.0.896226238413.issue24381@psf.upfronthosting.co.za> Message-ID: <1476992770.73.0.298628801774.issue24381@psf.upfronthosting.co.za> Ned Deily added the comment: Thank you for the patch! Now fixed in the bundled versions of libffi for OS X. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 15:54:59 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 19:54:59 +0000 Subject: [issue28492] C implementation of asyncio.Future doesn't set value of StopIteration correctly In-Reply-To: <1476992564.36.0.624486466512.issue28492@psf.upfronthosting.co.za> Message-ID: <20161020195454.16631.59049.63DBE851@psf.io> Roundup Robot added the comment: New changeset cfe2109ce2c0 by Yury Selivanov in branch '3.6': Issue #28492: Fix how StopIteration is raised in _asyncio.Future https://hg.python.org/cpython/rev/cfe2109ce2c0 New changeset 79b9257f3386 by Yury Selivanov in branch 'default': Merge 3.6 (issue #28492) https://hg.python.org/cpython/rev/79b9257f3386 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 15:56:37 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Oct 2016 19:56:37 +0000 Subject: [issue28492] C implementation of asyncio.Future doesn't set value of StopIteration correctly In-Reply-To: <1476992564.36.0.624486466512.issue28492@psf.upfronthosting.co.za> Message-ID: <1476993397.12.0.737668806852.issue28492@psf.upfronthosting.co.za> Yury Selivanov added the comment: Inada-san, please take a look at my commit if you have time. ---------- resolution: -> fixed stage: -> commit review status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:01:39 2016 From: report at bugs.python.org (Tim Mitchell) Date: Thu, 20 Oct 2016 20:01:39 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476993699.71.0.749481171959.issue26240@psf.upfronthosting.co.za> Tim Mitchell added the comment: Changes as per Martins review. ---------- Added file: http://bugs.python.org/file45159/subprocess3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:13:30 2016 From: report at bugs.python.org (Ryan Gonzalez) Date: Thu, 20 Oct 2016 20:13:30 +0000 Subject: [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1476994410.2.0.300699906253.issue28489@psf.upfronthosting.co.za> Ryan Gonzalez added the comment: @eric.smith How's this instead? ---------- Added file: http://bugs.python.org/file45160/0001-Fix-comment-in-tokenizer.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:14:13 2016 From: report at bugs.python.org (Ryan Gonzalez) Date: Thu, 20 Oct 2016 20:14:13 +0000 Subject: [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1476994453.04.0.811110533479.issue28489@psf.upfronthosting.co.za> Ryan Gonzalez added the comment: Ugh, hit Submit too soon. I meant to say the patch that has 20:13 as the date (I should've probably given them different names...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:24:55 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Oct 2016 20:24:55 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows In-Reply-To: <1476497368.18.0.628065389536.issue28448@psf.upfronthosting.co.za> Message-ID: <1476995095.76.0.504133077255.issue28448@psf.upfronthosting.co.za> Yury Selivanov added the comment: Latest patch looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:27:58 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 20:27:58 +0000 Subject: [issue28493] Typo in _asynciomodule.c Message-ID: <1476995278.57.0.754389897949.issue28493@psf.upfronthosting.co.za> New submission from St?phane Wirtel: a small fix for a typo. ---------- assignee: yselivanov components: Interpreter Core files: _asynciomodule.diff keywords: patch messages: 279079 nosy: matrixise, yselivanov priority: normal severity: normal status: open title: Typo in _asynciomodule.c versions: Python 3.7 Added file: http://bugs.python.org/file45161/_asynciomodule.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:28:51 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 20:28:51 +0000 Subject: [issue28493] Typo in _asynciomodule.c In-Reply-To: <1476995278.57.0.754389897949.issue28493@psf.upfronthosting.co.za> Message-ID: <1476995331.51.0.66535777295.issue28493@psf.upfronthosting.co.za> St?phane Wirtel added the comment: sorry, I can't commit it in the default branch, so I pass via an issue for this kind of issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:31:37 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 20:31:37 +0000 Subject: [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <20161020203119.110716.45408.C02F0E0B@psf.io> Roundup Robot added the comment: New changeset 761414979de5 by Yury Selivanov in branch '3.6': Issue #26010: fix typos; rewording https://hg.python.org/cpython/rev/761414979de5 New changeset 3821599fc74d by Yury Selivanov in branch 'default': Merge 3.6 (issue #26010) https://hg.python.org/cpython/rev/3821599fc74d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:34:24 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Oct 2016 20:34:24 +0000 Subject: [issue28493] Typo in _asynciomodule.c In-Reply-To: <1476995278.57.0.754389897949.issue28493@psf.upfronthosting.co.za> Message-ID: <1476995664.51.0.777768154476.issue28493@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thanks, St?phane! Fixed. ---------- resolution: -> fixed stage: -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:42:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 20:42:56 +0000 Subject: [issue28493] Typo in _asynciomodule.c In-Reply-To: <1476995278.57.0.754389897949.issue28493@psf.upfronthosting.co.za> Message-ID: <20161020203343.27118.69789.EEEBF118@psf.io> Roundup Robot added the comment: New changeset 03528baa8c2c by Yury Selivanov in branch '3.6': Issue #28493: Fix typos in _asynciomodule.c https://hg.python.org/cpython/rev/03528baa8c2c New changeset 74eb9c51d64e by Yury Selivanov in branch 'default': Merge 3.6 (issue #28493) https://hg.python.org/cpython/rev/74eb9c51d64e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 17:08:49 2016 From: report at bugs.python.org (Thomas Waldmann) Date: Thu, 20 Oct 2016 21:08:49 +0000 Subject: [issue28494] is_zipfile false positives Message-ID: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> New submission from Thomas Waldmann: zipfile.is_zipfile has false positives way too easily. I just have seen it in practive when a MoinMoin wiki site with a lot of pdf attachments crashed with 500. This was caused by a valid PDF that just happened to contain PK\005\006 somewhere in the middle - this was enough to satisfy is_zipfile() and triggered further processing as a zipfile, which then crashed with IOError (which was not catched in our code, yet). I have looked into zipfile code: if the usual EOCD structure (with empty comment) is not at EOF, it is suspected that there might be a non-empty comment and ~64K before EOF are searched for the PK\005\006 magic. If it is somewhere there, it is assumed that the file is a zip, without any further validity check. Attached is a failure demo that works with at least 2.7 and 3.5. https://en.wikipedia.org/wiki/Zip_(file_format) ---------- components: Library (Lib) files: isz_fail.py messages: 279084 nosy: Thomas.Waldmann priority: normal severity: normal status: open title: is_zipfile false positives type: behavior versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file45162/isz_fail.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 17:30:44 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Oct 2016 21:30:44 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1476999044.94.0.175819472697.issue28494@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +alanmcintyre, serhiy.storchaka, twouters versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 17:51:50 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 20 Oct 2016 21:51:50 +0000 Subject: [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1477000310.29.0.153890372965.issue28489@psf.upfronthosting.co.za> Eric V. Smith added the comment: That's great. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 18:03:26 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Thu, 20 Oct 2016 22:03:26 +0000 Subject: [issue28459] _pyio module broken on Cygwin / setmode not usable In-Reply-To: <1476701892.4.0.598393414511.issue28459@psf.upfronthosting.co.za> Message-ID: <1477001006.29.0.791459197414.issue28459@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: I agree to use setmode() at _pyio module for Cygwin. However, I have two reasons that I disagree to the implementation of os.setmode(). First, FreeBSD has another setmode() that operate file permission bits [1]. Therefore the implementation of os.setmode() will be confused to those users. Second, msvcrt.setmode() isn't used almost in standard library, the function is just used by _pyio module and subprocess test. Thus I think there aren't much need that implements setmode() to os module. Easy way for a solution of import error on Cygwin, setmode() is implemented on _pyio using ctypes. then Cygwin CPython forget setmode(). Otherwise it's hard way, For avoiding confliction to other platforms, I'd propose to create the cygwin module. I thought a solution implementing imitation msvcrt module, but it is unreasonable because Cygwin doesn't have other Windows API. I tried written the patch of easy way that implements setmode() into _pyio. This patch is included parts to succeed import _pyio. [1] https://www.freebsd.org/cgi/man.cgi?query=setmode&sektion=3 ---------- components: +Library (Lib) keywords: +patch nosy: +masamoto versions: +Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45163/cygwin-pyio-setmode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 18:09:41 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 20 Oct 2016 22:09:41 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1477001381.41.0.101179784213.issue28092@psf.upfronthosting.co.za> Ned Deily added the comment: "*** WARNING: renaming "_sqlite3" since importing it failed: build/lib.linux-x86_64-3.6/_sqlite3.cpython-36m-x86_64-linux-gnu.so: undefined symbol: sqlite3_stmt_readonly" That's a different issue: most likely you are building with an old version of libsqlite3. See, for example: https://github.com/ghaering/pysqlite/issues/85 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 18:26:45 2016 From: report at bugs.python.org (Thomas Waldmann) Date: Thu, 20 Oct 2016 22:26:45 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1477002405.21.0.814259301844.issue28494@psf.upfronthosting.co.za> Thomas Waldmann added the comment: patch for py2.7 The EOCD structure is at EOF. It either does not contain a comment (this is what the existing code checks first) or it contains a comment of the length that is specified in the structure. The patch checks consistency specified length vs. real length (end of fixed part of structure up to EOF). If this does not match, it is likely not a zip file, but just a file that happens to have the magic 4 bytes somewhere in its last 64kB. ---------- keywords: +patch Added file: http://bugs.python.org/file45164/isz_fail_fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 18:35:23 2016 From: report at bugs.python.org (Thomas Waldmann) Date: Thu, 20 Oct 2016 22:35:23 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1477002923.24.0.629186410253.issue28494@psf.upfronthosting.co.za> Thomas Waldmann added the comment: Note: checking the first bytes of the file (PK..) might be another option. But this has the "problem" that a self-extracting zip starts with an executable that has different first bytes. So whether this is an option or not depends on whether is_zipfile() should return truish for self-extracting ZIP files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 19:08:59 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 23:08:59 +0000 Subject: [issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL" In-Reply-To: <1476818317.21.0.812477817972.issue28471@psf.upfronthosting.co.za> Message-ID: <20161020230855.25293.57723.EF76444A@psf.io> Roundup Robot added the comment: New changeset 2fd92794f775 by Martin Panter in branch '3.6': Issue #28471: Avoid ResourceWarning by detaching test socket https://hg.python.org/cpython/rev/2fd92794f775 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 19:08:59 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 23:08:59 +0000 Subject: [issue28484] test_capi, test_regrtest fail when multithreading disabled In-Reply-To: <1476948409.33.0.578194967575.issue28484@psf.upfronthosting.co.za> Message-ID: <20161020230855.25293.91420.B0B15C52@psf.io> Roundup Robot added the comment: New changeset b811ec148337 by Martin Panter in branch '3.6': Issue #28484: Skip tests if GIL is not used or multithreading is disabled https://hg.python.org/cpython/rev/b811ec148337 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 19:21:57 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 20 Oct 2016 23:21:57 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1477005717.75.0.313919352736.issue26240@psf.upfronthosting.co.za> Martin Panter added the comment: V3 looks good to me ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 19:32:26 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 20 Oct 2016 23:32:26 +0000 Subject: [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1477006346.3.0.990602142645.issue28489@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 19:39:09 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 20 Oct 2016 23:39:09 +0000 Subject: [issue28484] test_capi, test_regrtest fail when multithreading disabled In-Reply-To: <1476948409.33.0.578194967575.issue28484@psf.upfronthosting.co.za> Message-ID: <1477006749.45.0.148414235417.issue28484@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 20:17:07 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 00:17:07 +0000 Subject: [issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1) In-Reply-To: <1420854382.8.0.44417983014.issue23214@psf.upfronthosting.co.za> Message-ID: <20161021001655.25135.16925.619EE865@psf.io> Roundup Robot added the comment: New changeset b6886ac88e28 by Martin Panter in branch 'default': Issue #23214: Implement optional BufferedReader, BytesIO read1() argument https://hg.python.org/cpython/rev/b6886ac88e28 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 20:51:31 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 21 Oct 2016 00:51:31 +0000 Subject: [issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet) In-Reply-To: <1453293464.25.0.570690037157.issue26163@psf.upfronthosting.co.za> Message-ID: <1477011091.29.0.32843262498.issue26163@psf.upfronthosting.co.za> Martin Panter added the comment: I just got this failure again today. I think I have seen it once or twice before. Is the failure actually indicating a problem with Python, or is the test just too strict? It seems that it may be like a test ensuring that a random.randint(1, 100) is never equal to 81: the probability of it failing is low, but not close enough to zero to rely on it never failing. On the other hand, a test ensuring that a 512-bit cryptographic hash doesn?t collide might be valid because the probability is low enough. ---------- nosy: +martin.panter versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 21:37:15 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Oct 2016 01:37:15 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail In-Reply-To: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> Message-ID: <1477013835.37.0.953989899588.issue28430@psf.upfronthosting.co.za> INADA Naoki added the comment: pure Python Future.__iter__ don't use what yield-ed. def __iter__(self): if not self.done(): self._asyncio_future_blocking = True yield self # This tells Task to wait for completion. assert self.done(), "yield from wasn't used with future" return self.result() # May raise too. I felt no-None value is sent by iter.send(val) wasn't make sense. But Tornado did it (maybe, for compatibility to Tornado's generator.) So this patch ignores when non-None value is passed. Additionally, I moved NEWS entry about C Future from "core and builtin" section to "library" section. ---------- keywords: +patch stage: -> commit review Added file: http://bugs.python.org/file45165/future-iter-send.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 21:50:22 2016 From: report at bugs.python.org (Tim Peters) Date: Fri, 21 Oct 2016 01:50:22 +0000 Subject: [issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet) In-Reply-To: <1453293464.25.0.570690037157.issue26163@psf.upfronthosting.co.za> Message-ID: <1477014622.77.0.30995255318.issue26163@psf.upfronthosting.co.za> Tim Peters added the comment: I think Raymond will have to chime in. I assume this is due to the `letter_range` portion of the test suffering hash randomization dealing it a bad hand - but the underlying string hash is "supposed to be" strong regardless of seed. The self.assertGreater(4*u, t) AssertionError: 124 not greater than 128 failure says 128 distinct sets hashed to only u = 124/4 = 31 distinct values across their hashes' last 7 bits, and that's worth complaining about. It's way too many collisions. It _may_ be a flaw in the set hash, or in the string hash, or just plain bad luck, but there's really no way to know which without digging into details. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 22:00:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 02:00:18 +0000 Subject: [issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1) In-Reply-To: <1420854382.8.0.44417983014.issue23214@psf.upfronthosting.co.za> Message-ID: <20161021020014.18023.50216.FE6EFA31@psf.io> Roundup Robot added the comment: New changeset d4fce64b1c65 by Martin Panter in branch 'default': Issue #23214: Remove BufferedReader.read1(-1) workaround https://hg.python.org/cpython/rev/d4fce64b1c65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 22:06:08 2016 From: report at bugs.python.org (=?utf-8?b?0KHQtdGA0LPQtdC5INCS0LDRgNGO0YXQuNC9?=) Date: Fri, 21 Oct 2016 02:06:08 +0000 Subject: =?utf-8?q?=5Bissue28495=5D_MagickMock_created_by_pat=D1=81h_annotation_re?= =?utf-8?q?fuses_to_apply_function_side=5Feffect_at_second_time?= Message-ID: <1477015568.71.0.157250761627.issue28495@psf.upfronthosting.co.za> New submission from ?????? ???????: You can see example in test.py. It should fails with AssertionErorr if mock works as expected. But it not fails. ---------- components: Library (Lib) files: test.py messages: 279098 nosy: ?????? ??????? priority: normal severity: normal status: open title: MagickMock created by pat?h annotation refuses to apply function side_effect at second time type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file45166/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 22:07:31 2016 From: report at bugs.python.org (Georgey) Date: Fri, 21 Oct 2016 02:07:31 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1477015651.06.0.8344476997.issue28447@psf.upfronthosting.co.za> Georgey added the comment: Hello David, Yes I had the same thought with you that the information of socket is lost at operating syetem level. However, I hope at Python level this kind of information will not be lost. Once the socket has been created by incoming connection, the address information of 'laddr' and 'raddr' has been known, and print(socket) will show them. It is not necessarily lost when the connection is broken. Any static method, like assigning an attribute of address to the socket will help. To the the least, Python shall not automatically destroy the socket object simply because it has been closed by Windows. Otherwise any attempt to record the address information of the socket will fail after it is destoyed. The error shown in message 278968 has clearly shown that even as a key, the socket object cannot function because it is already destroyed. ---------------------- sock_err @ Exception in thread Thread-1: Traceback (most recent call last): File "C:/Users/user/Desktop/SelectWinServer.py", line 39, in handle_sock_err addr_del = sock.getpeername() OSError: [WinError 10038] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python34\lib\threading.py", line 911, in _bootstrap_inner self.run() File "C:/Users/user/Desktop/SelectWinServer.py", line 67, in run handle_sock_err(msg[1]) File "C:/Users/user/Desktop/SelectWinServer.py", line 41, in handle_sock_err addr_del = socks2addr[sock] KeyError: ================= ---------- resolution: not a bug -> remind status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 22:28:14 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Oct 2016 02:28:14 +0000 Subject: [issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1) In-Reply-To: <1420854382.8.0.44417983014.issue23214@psf.upfronthosting.co.za> Message-ID: <1477016894.68.0.807918280783.issue23214@psf.upfronthosting.co.za> STINNER Victor added the comment: - .. method:: read1(size=-1) + .. method:: read1([size]) I don't understand this change: the default size is documented as -1. Did I miss something? + If *size* is ?1 (the default) Is the "?" character deliberate in "?1"? I would expected ``-1``. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 23:15:19 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Oct 2016 03:15:19 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477019719.09.0.579346006172.issue18219@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hello, please review my patch. I used set subtraction to calculate wrong_fields, added more test cases, and clarify documentation with regards to extrasaction parameter. Please let me know if this works. Thanks :) ---------- nosy: +Mariatta Added file: http://bugs.python.org/file45167/issue18219.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 23:17:35 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 21 Oct 2016 03:17:35 +0000 Subject: [issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1) In-Reply-To: <1420854382.8.0.44417983014.issue23214@psf.upfronthosting.co.za> Message-ID: <1477019855.41.0.456585659493.issue23214@psf.upfronthosting.co.za> Martin Panter added the comment: The minus sign might have been deliberate at some stage, but I realize it is more accessible etc if it was ASCII -1, so I will change that. The idea of changing the signature is to avoid people thinking it accepts a keyword argument. See e.g. Issue 25030 for seek(offset, whence=SEEK_SET), Issue 14586 for truncate(size=None). ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 23:22:42 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Oct 2016 03:22:42 +0000 Subject: [issue28492] C implementation of asyncio.Future doesn't set value of StopIteration correctly In-Reply-To: <1476992564.36.0.624486466512.issue28492@psf.upfronthosting.co.za> Message-ID: <1477020162.83.0.862949625153.issue28492@psf.upfronthosting.co.za> INADA Naoki added the comment: Confirmed, thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 23:23:50 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Oct 2016 03:23:50 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail In-Reply-To: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> Message-ID: <1477020230.16.0.303647726447.issue28430@psf.upfronthosting.co.za> INADA Naoki added the comment: Test failure in GNS3 seems not relating to this. It may be fixed via #28492, maybe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 23:27:23 2016 From: report at bugs.python.org (Hugh Brown) Date: Fri, 21 Oct 2016 03:27:23 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477020443.25.0.775592330154.issue18219@psf.upfronthosting.co.za> Hugh Brown added the comment: Fabulous. Looks great. Let's ship! It is not the *optimal* fix for 3.x platforms. A better fix would calculate the set of fieldnames only once in __init__ (or only as often as fieldnames is changed). But I stress that it is a robust change that works in versions 2.7 through 3.x for sure. And it is *way* better than the alternative of searching a list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 23:33:12 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 03:33:12 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows In-Reply-To: <1476497368.18.0.628065389536.issue28448@psf.upfronthosting.co.za> Message-ID: <20161021033308.110755.59936.6D72C0FB@psf.io> Roundup Robot added the comment: New changeset 6d20d6fe9b41 by INADA Naoki in branch '3.6': Issue #28448: Fix C implemented asyncio.Future didn't work on Windows https://hg.python.org/cpython/rev/6d20d6fe9b41 New changeset a9a136c9d857 by INADA Naoki in branch 'default': Issue #28448: Fix C implemented asyncio.Future didn't work on Windows (merge 3.6) https://hg.python.org/cpython/rev/a9a136c9d857 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 23:33:49 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Oct 2016 03:33:49 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows In-Reply-To: <1476497368.18.0.628065389536.issue28448@psf.upfronthosting.co.za> Message-ID: <1477020829.04.0.978819156182.issue28448@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 00:20:11 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Oct 2016 04:20:11 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477023611.48.0.125033395098.issue18219@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks Hugh, Are you thinking of something like the following? class DictWriter: def __init__(self, f, fieldnames, restval="", extrasaction="raise", dialect="excel", *args, **kwds): self._fieldnames = fieldnames # list of keys for the dict self._fieldnames_set = set(self._fieldnames) @property def fieldnames(self): return self._fieldnames @fieldnames.setter def fieldnames(self, value): self._fieldnames = value self._fieldnames_set = set(self._fieldnames) def _dict_to_list(self, rowdict): if self.extrasaction == "raise": wrong_fields = rowdict.keys() - self._fieldnames_set ... If so, I can work on another patch. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 00:24:09 2016 From: report at bugs.python.org (Hugh Brown) Date: Fri, 21 Oct 2016 04:24:09 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477023849.98.0.798356883064.issue18219@psf.upfronthosting.co.za> Hugh Brown added the comment: Mariatta: Yes, that is what I was thinking of. That takes my 12 execution time down to 10 seconds. (Or, at least, a fix I did of this nature had that effect -- I have not timed your patch but it should be the same.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 00:29:58 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Oct 2016 04:29:58 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477024198.4.0.309926477267.issue18219@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks, Hugh. Please check the updated patch :) ---------- Added file: http://bugs.python.org/file45168/issue18219v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 01:39:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 05:39:51 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <20161021053947.110892.53010.93B323EB@psf.io> Roundup Robot added the comment: New changeset fd9a4bd16587 by Benjamin Peterson in branch '3.6': mark dtrace stubs as static inline; remove stubs https://hg.python.org/cpython/rev/fd9a4bd16587 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 01:41:06 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 21 Oct 2016 05:41:06 +0000 Subject: [issue28092] Build failure for 3.6 on Centos 5.11 In-Reply-To: <1473650219.02.0.385206047793.issue28092@psf.upfronthosting.co.za> Message-ID: <1477028466.73.0.740795689879.issue28092@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I changed the dtrace stubs to static inline. Probably should reopen an investigation for 3.7. I would like to have exportable inlines. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 02:42:44 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 21 Oct 2016 06:42:44 +0000 Subject: [issue28099] Drop Mac OS X Tiger support in Python 3.6 In-Reply-To: <1473677501.77.0.96699360086.issue28099@psf.upfronthosting.co.za> Message-ID: <1477032164.98.0.900309981835.issue28099@psf.upfronthosting.co.za> Ned Deily added the comment: With the recent changes (fd9a4bd16587) in Issue28092 to make the dtrace stubs static inline, 3.6 once again compiles and links with the Xcode 2.5 gcc4.0 on Mac OS X 10.4. We can look at this again for 3.7. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 04:20:22 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Oct 2016 08:20:22 +0000 Subject: [issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1) In-Reply-To: <1477019855.41.0.456585659493.issue23214@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2016-10-21 5:17 GMT+02:00 Martin Panter : > The idea of changing the signature is to avoid people thinking it accepts a keyword argument. See e.g. Issue 25030 for seek(offset, whence=SEEK_SET), Issue 14586 for truncate(size=None). Ah. Maybe we should modify the code to accept a keyword argument? :-) Or we might use the strange "read1(\, size=1)" syntax of Argument Clinic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 05:27:07 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Oct 2016 09:27:07 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477042027.02.0.295699984841.issue18219@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : Added file: http://bugs.python.org/file45169/issue18219v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 05:44:55 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Oct 2016 09:44:55 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477043095.06.0.431217451957.issue18219@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : Added file: http://bugs.python.org/file45170/issue18219v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:07:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Oct 2016 10:07:27 +0000 Subject: [issue28496] Mark up constants 0, 1, -1 in C API docs Message-ID: <1477044445.15.0.0158550181363.issue28496@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch marks up constants 0, 1 and -1 (mostly return values) in C API documentation as literal test. Most occurrences already are marked up. It also changes :const:`ULONG_MAX + 1` to ``ULONG_MAX + 1``, since this is not a constant name. ---------- assignee: serhiy.storchaka components: Documentation files: doc_consts_01.patch keywords: patch messages: 279114 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Mark up constants 0, 1, -1 in C API docs type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45171/doc_consts_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:09:58 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Oct 2016 10:09:58 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477044598.63.0.255325822331.issue18219@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : Added file: http://bugs.python.org/file45172/issue18219v5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:11:49 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Oct 2016 10:11:49 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477044709.38.0.393647714464.issue18219@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : Added file: http://bugs.python.org/file45173/issue18219v6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:19:36 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Oct 2016 10:19:36 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477045176.0.0.299097277274.issue18219@psf.upfronthosting.co.za> INADA Naoki added the comment: LGTM, Thanks Mariatta. (But one more LGTM from coredev is required for commit) ---------- nosy: +inada.naoki versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:22:26 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Oct 2016 10:22:26 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477045346.97.0.53673681563.issue18219@psf.upfronthosting.co.za> STINNER Victor added the comment: issue18219v6.patch: LGTM, but I added a minor PEP 8 comment. INADA Naoki: "LGTM, Thanks Mariatta. (But one more LGTM from coredev is required for commit)" If you are confident (ex: if the change is simple, like this one), you can push it directly. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:28:01 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Oct 2016 10:28:01 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477045681.31.0.306013125969.issue18219@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Inada-san, Victor, thank you. Here is the updated patch. ---------- Added file: http://bugs.python.org/file45174/issue18219v7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:37:59 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Oct 2016 10:37:59 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477046279.7.0.722245419908.issue18219@psf.upfronthosting.co.za> INADA Naoki added the comment: > If you are confident (ex: if the change is simple, like this one), you can push it directly. My mentor (Yury) prohibit it while I'm beginner. And as you saw, I missed PEP 8 violation :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:45:16 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Oct 2016 10:45:16 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1477046279.7.0.722245419908.issue18219@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > My mentor (Yury) prohibit it while I'm beginner. Oh right, trust your mentor more than me ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:48:17 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Oct 2016 10:48:17 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477046897.58.0.445088643499.issue18219@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : Added file: http://bugs.python.org/file45175/issue18219v8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:53:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 10:53:41 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <20161021105338.110755.90692.BA3A6C49@psf.io> Roundup Robot added the comment: New changeset 1928074e6519 by INADA Naoki in branch '3.6': Issue #18219: Optimize csv.DictWriter for large number of columns. https://hg.python.org/cpython/rev/1928074e6519 New changeset 6f1602dfa4d5 by INADA Naoki in branch 'default': Issue #18219: Optimize csv.DictWriter for large number of columns. https://hg.python.org/cpython/rev/6f1602dfa4d5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 06:54:34 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Oct 2016 10:54:34 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477047274.87.0.16350252438.issue18219@psf.upfronthosting.co.za> INADA Naoki added the comment: committed. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 07:25:21 2016 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 21 Oct 2016 11:25:21 +0000 Subject: [issue28491] Remove bundled libffi for OSX In-Reply-To: <1476988827.6.0.878520006506.issue28491@psf.upfronthosting.co.za> Message-ID: <1477049121.06.0.949040962854.issue28491@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Does the upstream libffi work reliably on OSX by this time? The bundled version of libffi was extracted from PyObjC, and that copy is itself a patched version of the system libffi on OSX. The reason I don't use the system libffi is both that I don't want to rely on older version of libffi, and because the system libffi causes crashes in PyObjC's testsuite (which contains a lot of edge cases). I haven't looked into using the upstream version of libffi yet. PyObjC's version of libffi is a fairly old fork of upstream libffi where support for other systems was removed and support for darwin/x86 (and later darwin/x86-64) as added. The former at a time that the upstream libffi didn't support darwin/x86 at all (and at a time that darwin/x86 itself wasn't available on consumer devices). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 07:30:28 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 21 Oct 2016 11:30:28 +0000 Subject: [issue28491] Remove bundled libffi for OSX In-Reply-To: <1476988827.6.0.878520006506.issue28491@psf.upfronthosting.co.za> Message-ID: <1477049428.97.0.92543711468.issue28491@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Ronald, As you can see in my message #msg279069 I have tested with the last version of libffi (installed with HomeBrew), so in this case, I think we can say "Yes" to your question, the current release of libffi works fine with OSX. Now, I can check more deeply and give you a feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 07:35:59 2016 From: report at bugs.python.org (Kubilay Kocak) Date: Fri, 21 Oct 2016 11:35:59 +0000 Subject: [issue28491] Remove bundled libffi for OSX In-Reply-To: <1476988827.6.0.878520006506.issue28491@psf.upfronthosting.co.za> Message-ID: <1477049759.85.0.0260766959186.issue28491@psf.upfronthosting.co.za> Changes by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 09:13:08 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Oct 2016 13:13:08 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477055588.92.0.988741258998.issue18219@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Shouldn't docs changes and new tests be added to 3.5? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 09:23:03 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 13:23:03 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <20161021132133.25529.35752.36E61833@psf.io> Roundup Robot added the comment: New changeset 81666d3e4a37 by Serhiy Storchaka in branch '3.5': Issue #28410: Keep the traceback of original exception in _PyErr_ChainExceptions(). https://hg.python.org/cpython/rev/81666d3e4a37 New changeset 23a1d9ec35d5 by Serhiy Storchaka in branch '3.6': Issue #28410: Keep the traceback of original exception in _PyErr_ChainExceptions(). https://hg.python.org/cpython/rev/23a1d9ec35d5 New changeset e853492da42c by Serhiy Storchaka in branch 'default': Issue #28410: Keep the traceback of original exception in _PyErr_ChainExceptions(). https://hg.python.org/cpython/rev/e853492da42c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 09:39:46 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 21 Oct 2016 13:39:46 +0000 Subject: =?utf-8?q?=5Bissue28495=5D_MagickMock_created_by_pat=D1=81h_annotation_re?= =?utf-8?q?fuses_to_apply_function_side=5Feffect_at_second_time?= In-Reply-To: <1477015568.71.0.157250761627.issue28495@psf.upfronthosting.co.za> Message-ID: <1477057186.66.0.450483076655.issue28495@psf.upfronthosting.co.za> R. David Murray added the comment: Your test file only compiles the function definitions, it doesn't actually run any code. If I convert it into a unittest, it works as expected. If this is minimized example of code where you actually found a problem, I suspect there's something else wrong with the original code. ---------- nosy: +r.david.murray resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 09:44:40 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 21 Oct 2016 13:44:40 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1477057480.4.0.490085495686.issue28447@psf.upfronthosting.co.za> R. David Murray added the comment: The socket module is a relatively thin wrapper around the C socket library. 'getpeername' is inspecting the *current* peer of the socket, and if there is no current peer, there is no current peer name. Retaining information the socket library does not is out of scope for the python socket library. It could be done via a higher level wrapper library, but that would be out of scope for the stdlib unless someone develops something that is widely popular and used by many many people. ---------- resolution: remind -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:01:42 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 21 Oct 2016 14:01:42 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477058502.78.0.270326358146.issue18219@psf.upfronthosting.co.za> R. David Murray added the comment: Serhiy: I know you prefer applying test changes to the maint version, and I don't disagree, but there are others who prefer not to and we really don't have an official policy on it at this point. (We used to say no, a few years ago :) The doc change looks wrong to me. It looks like a rst source paragraph was split into separate lines instead of being a flowed paragraph in the source? I don't understand why that was done. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:15:53 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 21 Oct 2016 14:15:53 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1477059353.88.0.142747652674.issue18219@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks David. I uploaded patch to address your concern with the docs. Can you please check? Serhiy, with regards to applying docs and test to 3.5, does that require a different patch than what I have? Thanks. ---------- Added file: http://bugs.python.org/file45176/issue18219v9.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:16:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 14:16:11 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <20161021141540.12298.84560.95BD08E2@psf.io> Roundup Robot added the comment: New changeset f7e1e39ccddd by Serhiy Storchaka in branch '3.6': Issue #28214: Improved exception reporting for problematic __set_name__ https://hg.python.org/cpython/rev/f7e1e39ccddd New changeset 7c3ec24f4582 by Serhiy Storchaka in branch 'default': Issue #28214: Improved exception reporting for problematic __set_name__ https://hg.python.org/cpython/rev/7c3ec24f4582 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:16:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 14:16:11 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <20161021141540.12298.94922.F3ACAEC6@psf.io> Roundup Robot added the comment: New changeset 969c8bfe8872 by Serhiy Storchaka in branch '3.6': Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raising https://hg.python.org/cpython/rev/969c8bfe8872 New changeset 2119cb0beace by Serhiy Storchaka in branch 'default': Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raising https://hg.python.org/cpython/rev/2119cb0beace ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:18:00 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Oct 2016 14:18:00 +0000 Subject: [issue28410] Add convenient C API for "raise ... from ..." In-Reply-To: <1476129027.52.0.516927582831.issue28410@psf.upfronthosting.co.za> Message-ID: <1477059480.47.0.360955553783.issue28410@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:18:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Oct 2016 14:18:53 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1477059533.62.0.869862067981.issue28214@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:25:03 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 21 Oct 2016 14:25:03 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1477059903.62.0.0236153423523.issue24658@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Victor, could you check the new patch ? ---------- Added file: http://bugs.python.org/file45177/issue24658-2-3.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:35:11 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Oct 2016 14:35:11 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1477060511.11.0.317916361356.issue28426@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Marc-Andre, what are your thoughts about this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:36:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Oct 2016 14:36:19 +0000 Subject: [issue28439] Remove redundant checks in PyUnicode_EncodeLocale and PyUnicode_DecodeLocaleAndSize Message-ID: <1477060579.37.0.0489425759415.issue28439@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:54:54 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 21 Oct 2016 14:54:54 +0000 Subject: [issue28208] update sqlite to 3.14.2 In-Reply-To: <1474317408.19.0.662096879681.issue28208@psf.upfronthosting.co.za> Message-ID: <1477061694.0.0.751949741426.issue28208@psf.upfronthosting.co.za> St?phane Wirtel added the comment: how to build the osx installer ? Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 10:59:49 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Oct 2016 14:59:49 +0000 Subject: [issue28492] C implementation of asyncio.Future doesn't set value of StopIteration correctly In-Reply-To: <1476992564.36.0.624486466512.issue28492@psf.upfronthosting.co.za> Message-ID: <1477061989.23.0.560484853246.issue28492@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- stage: commit review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 11:28:56 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 21 Oct 2016 15:28:56 +0000 Subject: [issue28496] Mark up constants 0, 1, -1 in C API docs In-Reply-To: <1477044445.15.0.0158550181363.issue28496@psf.upfronthosting.co.za> Message-ID: <1477063736.2.0.908782643237.issue28496@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Serhiy, I think you can commit it. ---------- nosy: +matrixise stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 11:40:01 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 21 Oct 2016 15:40:01 +0000 Subject: [issue28281] Remove year limits from calendar In-Reply-To: <1474922646.39.0.781731359123.issue28281@psf.upfronthosting.co.za> Message-ID: <1477064401.45.0.693754295916.issue28281@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 11:40:53 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 21 Oct 2016 15:40:53 +0000 Subject: [issue28281] Remove year limits from calendar In-Reply-To: <1474922646.39.0.781731359123.issue28281@psf.upfronthosting.co.za> Message-ID: <1477064453.87.0.493626301527.issue28281@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Who can merge this patch ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 11:43:25 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Oct 2016 15:43:25 +0000 Subject: [issue21081] missing vietnamese codec TCVN 5712:1993 in Python In-Reply-To: <1395970721.88.0.828263715521.issue21081@psf.upfronthosting.co.za> Message-ID: <1477064605.67.0.784421758429.issue21081@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since no Unicode mapping table is found at the Unicode website, we need at least the link to public official document that specifies the encoding. If VN3 is a subset of VN2, which itself is a subset of VN1, VN1 definitely looks the most preferable choice for including in Python distribution. Especially if it was chosen by other popular software. ---------- stage: needs patch -> patch review versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 11:50:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Oct 2016 15:50:55 +0000 Subject: [issue28439] Remove redundant checks in PyUnicode_EncodeLocale and PyUnicode_DecodeLocaleAndSize Message-ID: <1477065055.99.0.780975210956.issue28439@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Added comments on Rietveld. Xiang, seem you have provided wrong e-mail address for Rietveld. I constantly get error messages "Undelivered Mail Returned to Sender" after pushing comments to patches that your are following. I suppose you don't receive Rietveld notifications. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 15:55:29 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 21 Oct 2016 19:55:29 +0000 Subject: [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477079729.81.0.592321786536.issue25152@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 15:16:57 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 21 Oct 2016 19:16:57 +0000 Subject: [issue28396] Remove *.pyo references from man page In-Reply-To: <1476481047.43.0.417931922217.issue28396@psf.upfronthosting.co.za> Message-ID: <1477077417.35.0.301236951282.issue28396@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the patch, Ville! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 15:54:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 19:54:41 +0000 Subject: [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <20161021195438.16719.78423.D0050D59@psf.io> Roundup Robot added the comment: New changeset 9feff7ba89b2 by Brett Cannon in branch '3.5': Issue #25152: Mention the deprecation of pyvenv https://hg.python.org/cpython/rev/9feff7ba89b2 New changeset 126ff1f3b6cd by Brett Cannon in branch '3.6': Merge (issue #25152) https://hg.python.org/cpython/rev/126ff1f3b6cd New changeset 53bee4ef1d0a by Brett Cannon in branch 'default': Merge (issue #25152) https://hg.python.org/cpython/rev/53bee4ef1d0a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 15:16:39 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 19:16:39 +0000 Subject: [issue28396] Remove *.pyo references from man page In-Reply-To: <1476481047.43.0.417931922217.issue28396@psf.upfronthosting.co.za> Message-ID: <20161021191620.25236.30273.5AF5DC58@psf.io> Roundup Robot added the comment: New changeset 0c298486d879 by Brett Cannon in branch '3.5': Issue #28396: Remove any mention of .pyo files from the man page. https://hg.python.org/cpython/rev/0c298486d879 New changeset b33c7055220e by Brett Cannon in branch '3.6': Merge (issue #28396) https://hg.python.org/cpython/rev/b33c7055220e New changeset ef6c4e76f110 by Brett Cannon in branch 'default': Merge (issue #28396) https://hg.python.org/cpython/rev/ef6c4e76f110 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 14:10:06 2016 From: report at bugs.python.org (David MacKenzie) Date: Fri, 21 Oct 2016 18:10:06 +0000 Subject: [issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers In-Reply-To: <1439823540.4.0.657998470812.issue24882@psf.upfronthosting.co.za> Message-ID: <1477073406.08.0.690025664222.issue24882@psf.upfronthosting.co.za> David MacKenzie added the comment: This issue seems to overlap with 14119. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 12:38:11 2016 From: report at bugs.python.org (Miguel) Date: Fri, 21 Oct 2016 16:38:11 +0000 Subject: [issue28497] future in tkinter Message-ID: <1477067891.18.0.627340061363.issue28497@psf.upfronthosting.co.za> New submission from Miguel: I load the future package. In the new package installed here: python2.7/dist-packages/tkinter/__init__.py it's not possible to import _default_root. One possible solution is to create a method in tkinter module that returns the _default_root object. ``` def default_root(): return _default_root ``` ---------- components: Tkinter messages: 279139 nosy: tkinter priority: normal severity: normal status: open title: future in tkinter versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 13:43:18 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 21 Oct 2016 17:43:18 +0000 Subject: [issue28439] Remove redundant checks in PyUnicode_EncodeLocale and PyUnicode_DecodeLocaleAndSize In-Reply-To: <1477065055.99.0.780975210956.issue28439@psf.upfronthosting.co.za> Message-ID: <1477071798.43.0.295246720972.issue28439@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for your review Serhiy. I don't receive the notification. :-( Honestly speaking I miss some notification emails from time to time, but not all. I'll consider choosing another ISP. I have to manually check the Rietveld now to avoid missing any comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 16:03:23 2016 From: report at bugs.python.org (Antti Haapala) Date: Fri, 21 Oct 2016 20:03:23 +0000 Subject: [issue21081] missing vietnamese codec TCVN 5712:1993 in Python In-Reply-To: <1395970721.88.0.828263715521.issue21081@psf.upfronthosting.co.za> Message-ID: <1477080203.39.0.062821452022.issue21081@psf.upfronthosting.co.za> Antti Haapala added the comment: I found the full document on SlideShare: http://www.slideshare.net/sacobat/tcvn-5712-1993-cng-ngh-thng-tin-b-m-chun-8bit-k-t-vit-dng-trong-trao-i-thng-tin As far as I can understand, they're "subsets" of each other only in the sense that VN1 has the widest mapping of characters, but this also partially overlaps with C0 and C1 ranges of control characters in ISO code pages - there are 139 additional characters! VN2 then lets the C0 and C1 retain the meanings of ISO-8859 by sacrificing some capital vowels (Ezio perhaps remembers that Italy is ? in Vietnamese - sorry, can't write it in upper case in VN2). VN3 then sacrifices even more for some more spaces left for possibly application-specific uses (the standard is very vague about that); The text of the standard is copy-pasteable at http://luatvn.net/tieu-chuan-viet-nam/tieu-chuan-viet-nam-tcvn5712_1993.2.171673.html - however, it lacks some of the tables. The standard additionally has both UCS-2 mappings and Unicode names of the characters, but they're in pictures; so it would be preferable to get the mapping from the iconv output, say. ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 13:22:21 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 21 Oct 2016 17:22:21 +0000 Subject: [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1477070541.66.0.606094607391.issue28499@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Pierre, Thank you for your issue and mainly for me ;-) Now, I am really interested by your feedback or the feedback of Florian Strzelecki because he can give us the organization of the sections and maybe we can try to improve the current documentation of the logging module with his recommendations. Have you receive some recommendations from Florian ? ---------- nosy: +matrixise stage: -> needs patch versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 13:19:17 2016 From: report at bugs.python.org (Pierre Bousquie) Date: Fri, 21 Oct 2016 17:19:17 +0000 Subject: [issue28499] Logging module documentation needs a rework. Message-ID: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> New submission from Pierre Bousquie: At pyconf-fr 2016 Florian Strzelecki (@Exirel) made a great talk on how to make good documentation. At one time he asked "python logging doc?, did you realy found it clear and helpfull?" clear answer from the crowd: not at all. Stephane Wirtel ask us (the unhappy folks) : Hey send a bug request, then the pull request and... i'll be there to help :). So i'm here for first step: fill the bug issue. I'm willing to fix this doc! ---------- assignee: docs at python components: Documentation messages: 279141 nosy: Pierre Bousquie, docs at python priority: normal severity: normal status: open title: Logging module documentation needs a rework. type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:00:01 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Oct 2016 21:00:01 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail In-Reply-To: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> Message-ID: <1477083601.66.0.306993611361.issue28430@psf.upfronthosting.co.za> Yury Selivanov added the comment: The patch looks good. 2 things: - It appears it also touches Misc/NEWS a bit too much. Please make sure to not to commit that. - I'd also add a comment explaining why we ignore values passed to FI.send() and simply send None. The reason is how Future.__iter__ is designed: class Future: def __iter__(self): if not self.done(): self._asyncio_future_blocking = True yield self # This tells Task to wait for completion. assert self.done(), "yield from wasn't used with future" return self.result() # May raise too. ^-- Future.__iter__ doesn't care about values that are pushed to the generator, it just returns "self.result()". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:02:40 2016 From: report at bugs.python.org (Antti Haapala) Date: Fri, 21 Oct 2016 21:02:40 +0000 Subject: [issue21081] missing vietnamese codec TCVN 5712:1993 in Python In-Reply-To: <1395970721.88.0.828263715521.issue21081@psf.upfronthosting.co.za> Message-ID: <1477083760.3.0.682076123946.issue21081@psf.upfronthosting.co.za> Antti Haapala added the comment: Ah there was something that I overlooked before - the VN1 and VN2 both have combining accents too. If I read correctly, the main letter should precede the combining character, just as in Unicode; VN3 seems to lack combining characters altogether. Thus, for simple text conversion from VN* to Unicode, VN1 should be enough, but some VN2/VN3 control/application specific codes might show up as accented capital letters. --- The following script rips the table from iconv: import subprocess mapping = subprocess.run('iconv -f TCVN -t UTF-8'.split(), input=bytes(range(256)), stdout=subprocess.PIPE).stdout.decode() There were several aliases but all of them seemed to produce identical output. Output matches the VN1 from the tables. And the luatvn.net additionally *did* have a copyable VN1 - UCS2 table ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 13:03:43 2016 From: report at bugs.python.org (Miguel) Date: Fri, 21 Oct 2016 17:03:43 +0000 Subject: [issue28498] tk busy command Message-ID: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> New submission from Miguel: tcl tk 8.6.6 has a new busy command. The new tkinter library doesn't provide an interface for this command. https://www.tcl.tk/man/tcl/TkCmd/busy.htm The solution is to add to the class Misc of tkinter these methods: def tk_busy(self, *args, **kw): self.tk_busy_hold(*args, **kw) def tk_buy_hold(self, cnf=None, **kw) self.tk.call(('tk', 'busy', 'hold', self._w) + self._options(cnf, kw)) def tk_buy_configure(self, cnf=None, **kw): self.tk.call(('tk', 'busy', 'configure', self._w) + self._options(cnf, kw)) def tk_cget(self, option): return self.tk.call('tk', 'busy', 'cget', self._w, option) def tk_busy_forget(self): self.tk_call('tk', 'busy', 'forget', self._w) def tk_busy_current(self, pattern=None): if pattern is None: self.tk.call('tk', 'busy', 'current') else: self.tk.call('tk', 'busy', 'current', pattern) def tk_busy_status(self): return self.tk.call('tk', 'busy', 'status', self._w) ---------- components: Tkinter messages: 279140 nosy: tkinter priority: normal severity: normal status: open title: tk busy command versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:04:20 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Oct 2016 21:04:20 +0000 Subject: [issue28213] asyncio SSLProtocol _app_transport is private In-Reply-To: <1474363317.54.0.62853026596.issue28213@psf.upfronthosting.co.za> Message-ID: <1477083860.6.0.89172868527.issue28213@psf.upfronthosting.co.za> Yury Selivanov added the comment: Closing this one. I don't think we want to expose/document _app_transport. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:05:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Oct 2016 21:05:57 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477083957.47.0.0145137020163.issue28498@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka components: +Library (Lib) nosy: +serhiy.storchaka stage: -> needs patch type: -> enhancement versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:06:03 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Oct 2016 21:06:03 +0000 Subject: [issue28212] Closing server in asyncio is not efficient In-Reply-To: <1474362608.68.0.912694843367.issue28212@psf.upfronthosting.co.za> Message-ID: <1477083963.36.0.225811429641.issue28212@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Seems that its not so hard - in loop.remove_reader add If you have a patch in mind, please create a PR on github.com/python/asyncio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:11:10 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Oct 2016 21:11:10 +0000 Subject: [issue28500] pep 525/asyncio: Handle when async generators are GCed from another thread Message-ID: <1477084270.15.0.264547427844.issue28500@psf.upfronthosting.co.za> New submission from Yury Selivanov: Proxy for https://github.com/python/asyncio/pull/447 ---------- assignee: yselivanov components: asyncio messages: 279154 nosy: gvanrossum, yselivanov priority: normal severity: normal stage: resolved status: open title: pep 525/asyncio: Handle when async generators are GCed from another thread versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:11:17 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Oct 2016 21:11:17 +0000 Subject: [issue28500] pep 525/asyncio: Handle when async generators are GCed from another thread In-Reply-To: <1477084270.15.0.264547427844.issue28500@psf.upfronthosting.co.za> Message-ID: <1477084277.4.0.196120178737.issue28500@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:14:26 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 21:14:26 +0000 Subject: [issue28500] pep 525/asyncio: Handle when async generators are GCed from another thread In-Reply-To: <1477084270.15.0.264547427844.issue28500@psf.upfronthosting.co.za> Message-ID: <20161021211422.11958.40264.C1019704@psf.io> Roundup Robot added the comment: New changeset 3908f432d0ac by Yury Selivanov in branch '3.6': Issue #28500: Fix asyncio to handle async gens GC from another thread. https://hg.python.org/cpython/rev/3908f432d0ac New changeset 3c82fa5b7b52 by Yury Selivanov in branch 'default': Merge 3.6 (issue #28500) https://hg.python.org/cpython/rev/3c82fa5b7b52 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:18:35 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Oct 2016 21:18:35 +0000 Subject: [issue28497] future in tkinter In-Reply-To: <1477067891.18.0.627340061363.issue28497@psf.upfronthosting.co.za> Message-ID: <1477084715.78.0.0688074039965.issue28497@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not Python issue, this is an issue of the future module. _default_root is dynamic attribute, it shouldn't be imported. And it is is private undocumented implementation detail, be careful with its using. ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:24:39 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 21 Oct 2016 21:24:39 +0000 Subject: [issue28482] test_typing fails if asyncio unavailable In-Reply-To: <1476937394.99.0.275548920794.issue28482@psf.upfronthosting.co.za> Message-ID: <1477085079.01.0.0695599107846.issue28482@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:25:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 21:25:13 +0000 Subject: [issue26923] asyncio.gather drops cancellation In-Reply-To: <1462279806.1.0.880381545595.issue26923@psf.upfronthosting.co.za> Message-ID: <20161021212510.38659.19617.197B17E8@psf.io> Roundup Robot added the comment: New changeset b1aa485fad1b by Yury Selivanov in branch '3.5': Issue #26923: Fix asyncio.Gather to refuse being cancelled once all children are done. https://hg.python.org/cpython/rev/b1aa485fad1b New changeset b0af901b1e2a by Yury Selivanov in branch '3.6': Merge 3.5 (issue #26923) https://hg.python.org/cpython/rev/b0af901b1e2a New changeset 2a228b03ea16 by Yury Selivanov in branch 'default': Merge 3.6 (issue #26923) https://hg.python.org/cpython/rev/2a228b03ea16 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:26:49 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Oct 2016 21:26:49 +0000 Subject: [issue26923] asyncio.gather drops cancellation In-Reply-To: <1462279806.1.0.880381545595.issue26923@psf.upfronthosting.co.za> Message-ID: <1477085209.89.0.885145059253.issue26923@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you, Johannes! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 13:54:16 2016 From: report at bugs.python.org (David MacKenzie) Date: Fri, 21 Oct 2016 17:54:16 +0000 Subject: [issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers In-Reply-To: <1439823540.4.0.657998470812.issue24882@psf.upfronthosting.co.za> Message-ID: <1477072456.41.0.495456862009.issue24882@psf.upfronthosting.co.za> David MacKenzie added the comment: If each worker thread ties up other resources in an application, such as handles to server connections, conserving threads could have a significant impact. That's the situation for an application I am involved with. I've written and tested a patch to make this change, using a second Queue for the worker threads to notify the executor in the main thread by sending a None when they finish a WorkItem and are therefore idle and ready for more work. It's a fairly simple patch. It does add a little more overhead to executing a job, inevitably. I can submit the patch if there's interest. Otherwise, perhaps the TODO comment in thread.py should be rewritten to explain why it's not worth doing. ---------- nosy: +dmacnet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:38:27 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 21 Oct 2016 21:38:27 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1477085907.92.0.76697241349.issue24658@psf.upfronthosting.co.za> St?phane Wirtel added the comment: upload a new version ---------- Added file: http://bugs.python.org/file45178/issue24658-3-3.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:41:43 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 21 Oct 2016 21:41:43 +0000 Subject: [issue28482] test_typing fails if asyncio unavailable In-Reply-To: <1476937394.99.0.275548920794.issue28482@psf.upfronthosting.co.za> Message-ID: <1477086103.65.0.57450805555.issue28482@psf.upfronthosting.co.za> Guido van Rossum added the comment: Ivan, if you want to apply it upstream be my guest! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:42:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 21:42:08 +0000 Subject: [issue26796] BaseEventLoop.run_in_executor shouldn't specify max_workers for default Executor In-Reply-To: <1460990639.79.0.271352232569.issue26796@psf.upfronthosting.co.za> Message-ID: <20161021214204.27140.92895.C0722423@psf.io> Roundup Robot added the comment: New changeset 785597e758a1 by Yury Selivanov in branch '3.5': Issue #26796: Don't configure the number of workers for default threadpool executor. https://hg.python.org/cpython/rev/785597e758a1 New changeset 99941cacfc38 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #26796) https://hg.python.org/cpython/rev/99941cacfc38 New changeset a475f2e39c6f by Yury Selivanov in branch 'default': Merge 3.6 (issue #26796) https://hg.python.org/cpython/rev/a475f2e39c6f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:42:35 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Oct 2016 21:42:35 +0000 Subject: [issue26796] BaseEventLoop.run_in_executor shouldn't specify max_workers for default Executor In-Reply-To: <1460990639.79.0.271352232569.issue26796@psf.upfronthosting.co.za> Message-ID: <1477086155.59.0.976636043358.issue26796@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you, Hans! ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:49:49 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 21 Oct 2016 21:49:49 +0000 Subject: [issue28208] update sqlite to 3.14.2 In-Reply-To: <1474317408.19.0.662096879681.issue28208@psf.upfronthosting.co.za> Message-ID: <1477086589.93.0.0357738829996.issue28208@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:51:35 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 21 Oct 2016 21:51:35 +0000 Subject: [issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1) In-Reply-To: <1420854382.8.0.44417983014.issue23214@psf.upfronthosting.co.za> Message-ID: <1477086695.42.0.557691453329.issue23214@psf.upfronthosting.co.za> Martin Panter added the comment: Modifying the API to accept a keyword argument is not worthwhile IMO. That means modifying modules like http.client and zipfile (which use the wrong keyword name), and user-defined implementations may become incompatible. The question of documentation is discussed more in Issue 23738. I think one or two people were concerned about using the Arg Clinic slash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:53:34 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 21 Oct 2016 21:53:34 +0000 Subject: [issue28482] test_typing fails if asyncio unavailable In-Reply-To: <1476937394.99.0.275548920794.issue28482@psf.upfronthosting.co.za> Message-ID: <1477086814.39.0.590005873572.issue28482@psf.upfronthosting.co.za> Martin Panter added the comment: I will this to Git Hub when I get a chance to get set up, if that helps though :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:55:32 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Oct 2016 21:55:32 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1477086932.85.0.683806733169.issue28414@psf.upfronthosting.co.za> Yury Selivanov added the comment: Christian, what's the status on this one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:57:58 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 21 Oct 2016 21:57:58 +0000 Subject: [issue28482] test_typing fails if asyncio unavailable In-Reply-To: <1476937394.99.0.275548920794.issue28482@psf.upfronthosting.co.za> Message-ID: <1477087078.84.0.351599917837.issue28482@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Martin, I have opened a PR with your patch at python/typing https://github.com/python/typing/pull/304 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 18:12:41 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 21 Oct 2016 22:12:41 +0000 Subject: [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1477087961.6.0.0437100042057.issue28499@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 19:00:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 23:00:51 +0000 Subject: [issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1) In-Reply-To: <1420854382.8.0.44417983014.issue23214@psf.upfronthosting.co.za> Message-ID: <20161021230048.18327.1027.7DD17D3E@psf.io> Roundup Robot added the comment: New changeset 2af6d94de492 by Martin Panter in branch 'default': Issue #23214: Fix formatting of -1 https://hg.python.org/cpython/rev/2af6d94de492 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 19:10:03 2016 From: report at bugs.python.org (klappnase) Date: Fri, 21 Oct 2016 23:10:03 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477091403.82.0.255247034214.issue28498@psf.upfronthosting.co.za> klappnase added the comment: Funny thing, just today I came across the same issue. So far I came up with an a little bit refined version of the OP's suggestions. Until now I have tested this with Python-2.7.9 and tk-8.6.0 on debian Jessie, I think the same code should work for Python-3 , too. The busy_current() function here always reports only the root window (the same when called from within wish, apparently a bug in this early version of Tk-8.6) so I was not able to figure out how to use and test the "pattern" option. def busy(self, **kw): '''Shortcut for the busy_hold() command.''' self.tk.call(('tk', 'busy', self._w) + self._options(kw)) def busy_cget(self, option): '''Queries the busy command configuration options for this window. The window must have been previously made busy by the busy_hold() command. Returns the present value of the specified option. Option may have any of the values accepted by busy_hold().''' return(self.tk.call('tk', 'busy', 'cget', self._w, '-'+option)) def busy_configure(self, cnf=None, **kw): '''Queries or modifies the tk busy command configuration options. The window must have been previously made busy by busy_hold(). Option may have any of the values accepted by busy_hold(). Please note that the option database is referenced by the window. For example, if a Frame widget is to be made busy, the busy cursor can be specified for it by : w.option_add("*Frame.BusyCursor", "gumby")''' if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmerge(cnf) if cnf is None: return(self._getconfigure( 'tk', 'busy', 'configure', self._w)) if type(cnf) is StringType: return(self._getconfigure1( 'tk', 'busy', 'configure', self._w, '-'+cnf)) self.tk.call(( 'tk', 'busy', 'configure', self._w) + self._options(cnf)) busy_config = busy_configure def busy_current(self, pattern=None): '''Returns the widget objects of all widgets that are currently busy. If a pattern is given, only the path names of busy widgets matching PATTERN are returned. ''' return([self._nametowidget(x) for x in self.tk.splitlist(self.tk.call( 'tk', 'busy', 'current', self._w, pattern))]) def busy_forget(self): '''Releases resources allocated by the busy() command for this window, including the transparent window. User events will again be received by the window. Resources are also released when the window is destroyed. The window must have been specified in the busy_hold() operation, otherwise an exception is raised.''' self.tk.call('tk', 'busy', 'forget', self._w) def busy_hold(self, **kw): '''Makes this window (and its descendants in the Tk window hierarchy) appear busy. A transparent window is put in front of the specified window. This transparent window is mapped the next time idle tasks are processed, and the specified window and its descendants will be blocked from user interactions. Normally update() should be called immediately afterward to insure that the hold operation is in effect before the application starts its processing. The following configuration options are valid: -cursor cursorName Specifies the cursor to be displayed when the widget is made busy. CursorName can be in any form accepted by Tk_GetCursor. The default cursor is "wait" on Windows and "watch" on other platforms.''' self.tk.call(( 'tk', 'busy', 'hold', self._w) + self._options(kw)) def busy_status(self): '''Returns the busy status of this window. If the window presently can not receive user interactions, True is returned, otherwise False.''' return((self.tk.getboolean(self.tk.call( 'tk', 'busy', 'status', self._w)) and True) or False) ---------- nosy: +klappnase _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 19:13:33 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 23:13:33 +0000 Subject: [issue28482] test_typing fails if asyncio unavailable In-Reply-To: <1476937394.99.0.275548920794.issue28482@psf.upfronthosting.co.za> Message-ID: <20161021231330.33252.35673.CC67520D@psf.io> Roundup Robot added the comment: New changeset c3363f684a2d by Guido van Rossum in branch '3.5': Issue #28482: Skip a few test_typing tests if asyncio unavailable https://hg.python.org/cpython/rev/c3363f684a2d New changeset 8f3b4779afaf by Guido van Rossum in branch '3.6': Issue #28482: Skip a few test_typing tests if asyncio unavailable (3.5->3.6) https://hg.python.org/cpython/rev/8f3b4779afaf New changeset c5fb5ac84f1e by Guido van Rossum in branch 'default': Issue #28482: Skip a few test_typing tests if asyncio unavailable (3.6->3.7) https://hg.python.org/cpython/rev/c5fb5ac84f1e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 19:20:19 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 21 Oct 2016 23:20:19 +0000 Subject: [issue28482] test_typing fails if asyncio unavailable In-Reply-To: <1476937394.99.0.275548920794.issue28482@psf.upfronthosting.co.za> Message-ID: <1477092019.28.0.144451653589.issue28482@psf.upfronthosting.co.za> Guido van Rossum added the comment: Martin can you verify that this worked? ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 19:40:30 2016 From: report at bugs.python.org (klappnase) Date: Fri, 21 Oct 2016 23:40:30 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477093230.56.0.625587275765.issue28498@psf.upfronthosting.co.za> klappnase added the comment: Oops, just made a quick test with Python3, and found that I had missed that types.StringType is no longer present. So to be compatible with Python3 the busy_configure() func ought to look like: def busy_configure(self, cnf=None, **kw): if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmerge(cnf) if cnf is None: return(self._getconfigure( 'tk', 'busy', 'configure', self._w)) if isinstance(cnf, str): return(self._getconfigure1( 'tk', 'busy', 'configure', self._w, '-'+cnf)) self.tk.call(( 'tk', 'busy', 'configure', self._w) + self._options(cnf)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 20:21:27 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 22 Oct 2016 00:21:27 +0000 Subject: [issue27321] Email parser creates a message object that can't be flattened In-Reply-To: <1465930372.53.0.0254623453508.issue27321@psf.upfronthosting.co.za> Message-ID: <1477095687.18.0.901065206083.issue27321@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: While I was reviewing https://gitlab.com/mailman/mailman/merge_requests/197/diffs I noticed the KeyError and it made me thing "hmm, I wonder if this should be turned into one of the email package errors"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 20:23:06 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 22 Oct 2016 00:23:06 +0000 Subject: [issue28482] test_typing fails if asyncio unavailable In-Reply-To: <1476937394.99.0.275548920794.issue28482@psf.upfronthosting.co.za> Message-ID: <1477095786.56.0.737087790398.issue28482@psf.upfronthosting.co.za> Martin Panter added the comment: Yep, working well. Thanks Guido & Ivan. ---------- stage: commit review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 20:24:26 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 22 Oct 2016 00:24:26 +0000 Subject: [issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1) In-Reply-To: <1420854382.8.0.44417983014.issue23214@psf.upfronthosting.co.za> Message-ID: <1477095866.42.0.611306837525.issue23214@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 20:55:44 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 22 Oct 2016 00:55:44 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1477097744.33.0.0691257181393.issue26240@psf.upfronthosting.co.za> Martin Panter added the comment: Here are corresponding patches for 3.5 and 2.7. ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file45179/subprocess3-3.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 20:55:59 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 22 Oct 2016 00:55:59 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1477097759.28.0.697581963871.issue26240@psf.upfronthosting.co.za> Changes by Martin Panter : Added file: http://bugs.python.org/file45180/subprocess3-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 21:19:53 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Oct 2016 01:19:53 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1477099193.01.0.905190143572.issue27755@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Your ping got me to look at the doc for tk_optionMenu, which is a function rather than a widget (http://www.tcl.tk/man/tcl8.6/TkCmd/optionMenu.htm), the code for tkinter.OptionMenu (the only accurate doc I know of), which is a widget with the function API, the code for DynOptionMenu(OptionMenu), which is both too general-purpose and too special-cased, the doc (and a bit of code) for ttk.Combobox, and finally your patch. Conclusion: I really want to replace DynOptionMenu with Combobox, but not with the current patch. Micro-issue: it is too late to add anything to tkinter. In any case, it should be a separate issue, with possible a check for anything else that is missing. IDLE can easily define the constant if needed, though I prefer literal strings myself. Real issue: no tests. Tests for a new class, if any, can await finalization of the API. However, I want to have automated tests for configdialog before making substantive changes. (Justin, what OS are you working on?) A plus for the patch is that aside from inessential name changes, it is nearly a drop-in replacement. I could *almost* be persuaded that it would be safe to just do it. However, this is a result of perpetuating what I consider to be an awful API. I will come back to this, but on to the methods. Enable/disable: I am not a fan of trivial half-line functions. "Cb.enable()" would be the same as "Cb['state'] = 'readonly', Beside this, the cb for font size should perhaps eventually be 'normal' so users can type in a font size. The current patch will not apply cleanly because I since augmented the list with sizes needed for code projection on classroom screens. That itself was a substitute for entry or other adjustmen method. On_select: I believe "self.variable.set(self.get())" should be redundant, so that '<>' can be bound directly to command when there is one (currently only one case, but I might want to change this. Reset: passing a display string should not be options, and IDLE always passes one. 'self.variable.set(selection)' should be redundant. This leaves two lines to set the entry and the option list. For one or two boxes, a wrapper function would not be worthwhile. But for multiple instances, it might be, whether as helper function or wrapper class method. .__init__: IDLE never passes anything for '*values' and always passes None for 'value'. This ends up as the default '' for the current value. Both parameters and the corresponding lines can go. So can 'self.enable': the initial state should be added to kwargs. If 'variable' is needed, it should be passed in the normal widget way: 'textvariable=mystringvar'. 'self.set(variable.get())' is redundant because 'variable is initially '' and so it the entry. But are textvariables needed? Not for setting and getting Combobox entry values. IDLE uses them to trace changes to the current selection. But with Combobox, the change functions could be bound to '<>' instead of the Var tracer. I think I would prefer this, as the tracer bindings have to be explicitly removed separately from .destroy(). Do I want this binding combined with initialization? Currently the change handler bindings are done in one function. There is a lot of duplication, and I am working to factor some of it out. (But I need tests before applying.) So I may want to leave them together, which means no wrapper class. Testing a dialog requires two things: simulating user actions and capturing the result. The first depends on the widget, so it makes sense to focus on testing one widget class (like Combobox) rather than, say, one pane with mixed widget types. The second requires a mock that captures the changes sent to the config database when [Ok] or [Apply] are invoked. ---------- resolution: duplicate -> stage: resolved -> test needed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 22:00:24 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Oct 2016 02:00:24 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1477101624.19.0.107961430125.issue27755@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I did some experiments that cleared up some previous puzzlements about seemingly inconsistent behavior between interactive commands and those in scripts. The following prints '.mycombo' twice, on two lines, after selecting 'beta'. import tkinter as tk from tkinter import ttk root = tk.Tk() #root.withdraw() cb = ttk.Combobox(root, name='mycombo', values=('alpha', 'beta')) cb.pack() def here(event): print(event.widget) cb.bind('<>', here) cb.set('none') root.update() cb.event_generate('') root.update() cb.event_generate('') root.update() cb.event_generate('') root.update() cb.event_generate('<>') root.update() cb.set does *not* trigger ComboboxSelected. Key_Return after Button-1 does. So does directly generating the event. Uncomment .withdraw() and Key-Return does not trigger. But the directly generating the pseudoevent still works. About a month ago, I added .withdraw to tests to stop (obnoxious) screen flashes. I don't call it for shell interaction. Removing at least some of the .update()s will also stop triggering. In IDLE's interactive mode, tcl update is called 20 times a second, which is at least once per statement types and entered. Hence scripted and interactive statements had different effects. Directly simulating user actions is more satisfying than generating the pseudoevent, but IDLE tests do not need to verify that Combobox works as advertised -- there is a ttk gui test for that. So I believe set('value') + generate('ComboboxSelected') should be sufficient on the input end (after conversion to Combobox and event binding). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 23:22:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 22 Oct 2016 03:22:50 +0000 Subject: [issue26620] Fix ResourceWarning warnings in test_urllib2_localnet In-Reply-To: <1458730745.01.0.796601838932.issue26620@psf.upfronthosting.co.za> Message-ID: <20161022032248.12127.9521.EB73EC6D@psf.io> Roundup Robot added the comment: New changeset d76fccbad014 by Martin Panter in branch '3.5': Issue #26620: Fix ResourceWarning in test_urllib2_localnet https://hg.python.org/cpython/rev/d76fccbad014 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 23:22:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 22 Oct 2016 03:22:50 +0000 Subject: [issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env In-Reply-To: <1476389226.43.0.0474537923373.issue28435@psf.upfronthosting.co.za> Message-ID: <20161022032247.12127.77886.2D6C0290@psf.io> Roundup Robot added the comment: New changeset 8f4424bdeadc by Martin Panter in branch '2.7': Issue #28435: Avoid no_proxy environment variable interfering with tests https://hg.python.org/cpython/rev/8f4424bdeadc New changeset dc9ad44125de by Martin Panter in branch '3.5': Issue #28435: Avoid no_proxy environment variable interfering with tests https://hg.python.org/cpython/rev/dc9ad44125de New changeset 05c3fbaa8fcf by Martin Panter in branch '3.6': Issue #28435: Merge urllib test fixes from 3.5 into 3.6 https://hg.python.org/cpython/rev/05c3fbaa8fcf New changeset 4b6e6a77e501 by Martin Panter in branch 'default': Issue #28435: Merge urllib test fixes from 3.6 https://hg.python.org/cpython/rev/4b6e6a77e501 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 00:18:40 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 22 Oct 2016 04:18:40 +0000 Subject: [issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env In-Reply-To: <1476389226.43.0.0474537923373.issue28435@psf.upfronthosting.co.za> Message-ID: <1477109920.2.0.756032170543.issue28435@psf.upfronthosting.co.za> Martin Panter added the comment: I altered the comment (looks like it was a copy from code forcing proxies to be bypassed). Also, I didn?t port the second no_proxy fix to 2.7; it looks like there is a different workaround there which is not affected by the environment. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 01:17:07 2016 From: report at bugs.python.org (Ed Schouten) Date: Sat, 22 Oct 2016 05:17:07 +0000 Subject: [issue27701] [posixmodule] [Refactoring patch] Simply call into *at() functions unconditionally when present In-Reply-To: <1470559556.18.0.347536673064.issue27701@psf.upfronthosting.co.za> Message-ID: <1477113427.61.0.57231696026.issue27701@psf.upfronthosting.co.za> Ed Schouten added the comment: Attached is an updated version of the patch that applies cleanly against Python 3.6.0b2. ---------- Added file: http://bugs.python.org/file45181/27701.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 01:27:18 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 22 Oct 2016 05:27:18 +0000 Subject: [issue20847] asyncio docs should call out that network logging is a no-no In-Reply-To: <1393877540.32.0.826428021059.issue20847@psf.upfronthosting.co.za> Message-ID: <1477114038.63.0.583450338913.issue20847@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, I added to asyncio logging doc that the log file should point to a file on local filesystem. Please review. Thanks :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45182/issue20847.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 01:31:45 2016 From: report at bugs.python.org (Ed Schouten) Date: Sat, 22 Oct 2016 05:31:45 +0000 Subject: [issue28501] [Patch] Make os.umask() optional Message-ID: <1477114305.1.0.982549548127.issue28501@psf.upfronthosting.co.za> New submission from Ed Schouten: CloudABI is a POSIX-like strongly sandboxed runtime environment, for which we got Python to work (https://mail.python.org/pipermail/python-dev/2016-July/145708.html). Patches for this are slowly being upstreamed. As CloudABI uses a capability-based security model as opposed to a discretionary access control system, there is no support for UNIX credentials and permissions. This means that umask() is also absent. It looks like umask() is only used by Python in its posixmodule. The attached patch adds a new Autoconf check and adds the proper #if logic around its implementation. Changes to the Autoconf/Automake files are not provided by this patch, as my versions of these tools generate files containing unnecessary changes. ---------- components: Extension Modules files: umask-optional.diff keywords: patch messages: 279182 nosy: EdSchouten priority: normal severity: normal status: open title: [Patch] Make os.umask() optional versions: Python 3.6 Added file: http://bugs.python.org/file45183/umask-optional.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 01:46:35 2016 From: report at bugs.python.org (Ed Schouten) Date: Sat, 22 Oct 2016 05:46:35 +0000 Subject: [issue28502] [Patch] Make os.chdir() optional Message-ID: <1477115195.1.0.580287867342.issue28502@psf.upfronthosting.co.za> New submission from Ed Schouten: CloudABI is a POSIX-like strongly sandboxed runtime environment, for which we got Python to work (https://mail.python.org/pipermail/python-dev/2016-July/145708.html). Patches for this are slowly being upstreamed. CloudABI uses a capability-based security model, similar to Capsicum (https://www.cl.cam.ac.uk/research/security/capsicum/). With this model, the file system can only be accessed by using file descriptors to directories. Files inside of them can be used by using openat() (in Python: os.open(dirfd=...). This means that there is no need to provide support for process working directories. chdir() is therefore entirely absent. It looks like chdir() is only used by Python in its posixmodule. The attached patch adds a new Autoconf check and adds the proper #if logic around its implementation. Changes to the Autoconf/Automake files are not provided by this patch, as my versions of these tools generate files containing unnecessary changes. ---------- components: Extension Modules files: chdir-optional.diff keywords: patch messages: 279183 nosy: EdSchouten priority: normal severity: normal status: open title: [Patch] Make os.chdir() optional versions: Python 3.6 Added file: http://bugs.python.org/file45184/chdir-optional.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 03:05:47 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 22 Oct 2016 07:05:47 +0000 Subject: [issue20847] asyncio docs should call out that network logging is a no-no In-Reply-To: <1477114038.63.0.583450338913.issue20847@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: +Logs for :mod:`asyncio` module should always point to a file on the local +filesystem. Using any kind of network logging will block the event loop. Well... even writing to a local file can block :-/ By "network", what about the local UNIX socket used by syslog? I guess that the safest option would be a new asyncio library running all logs functions to a thread, or maybe using loop.run_in_executor(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 03:50:47 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 22 Oct 2016 07:50:47 +0000 Subject: [issue20357] Mention buildbots in the core dev section of the devguide In-Reply-To: <1390447097.09.0.000203036921559.issue20357@psf.upfronthosting.co.za> Message-ID: <1477122647.33.0.232031661449.issue20357@psf.upfronthosting.co.za> Berker Peksag added the comment: Moved to https://github.com/python/devguide/issues/70 ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 03:52:55 2016 From: report at bugs.python.org (Ed Schouten) Date: Sat, 22 Oct 2016 07:52:55 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available Message-ID: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> New submission from Ed Schouten: The '_crypt' module provides a binding to the C crypt(3) function. It is used by the crypt.crypt() function. Looking at the C code, there are a couple of things we can improve: - Because crypt() only depends on primitive C types, we currently get away with calling it without it being declared. Ensure that we include , which is the POSIX header file declaring this. - The disadvantage of crypt() is that it's thread-unsafe. Systems like Linux and recent versions of FreeBSD nowadays provide crypt_r() as a replacement. This function allows you to pass in a 'crypt_data' object that will hold the resulting string for you. Extend the code to use this function when available. This patch is actually needed to make this module build on CloudABI (https://mail.python.org/pipermail/python-dev/2016-July/145708.html). CloudABI's C library doesn't provide any thread-unsafe functions, meaning that crypt_r() is the only way you can crypt passwords. ---------- components: Extension Modules files: crypt.diff keywords: patch messages: 279186 nosy: EdSchouten priority: normal severity: normal status: open title: [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available versions: Python 3.6 Added file: http://bugs.python.org/file45185/crypt.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 04:30:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 08:30:57 +0000 Subject: [issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10 In-Reply-To: <1476807191.35.0.710869100873.issue28469@psf.upfronthosting.co.za> Message-ID: <1477125057.74.0.486896482274.issue28469@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Following patch takes numbers from the sequence 1, 2, 5, 10, 20, 50, ... It also updates the documentation and tests. ---------- components: +Library (Lib) stage: -> patch review Added file: http://bugs.python.org/file45186/timeit_autorange_numbers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 05:23:17 2016 From: report at bugs.python.org (Pierre Bousquie) Date: Sat, 22 Oct 2016 09:23:17 +0000 Subject: [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1477128197.84.0.181145852831.issue28499@psf.upfronthosting.co.za> Pierre Bousquie added the comment: Hi stephane, I have tweeted Florian and he is still interested. I think the doc has a lot of information but does not organize it efficiently. My notes from the conference: - Logging reccord attribute is at 16.6.7 (middle of the doc) and that's a must to fine tune the message. - Configuration: the "interesting" (read: must read for use in production) is in advanced tutorial: configuration... https://docs.python.org/3.7/howto/logging.html#configuring-logging aaaandd in : https://docs.python.org/3.7/library/logging.config.html#module-logging.config - Lots of information are also in the "See also" section. and I had a personal fail time with logrotate... wich will work with python logging only if it used with WatchFileHandler. https://docs.python.org/3.7/library/logging.handlers.html#logging.handlers.WatchedFileHandler This is in the doc but only in handles section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 06:46:13 2016 From: report at bugs.python.org (irdb) Date: Sat, 22 Oct 2016 10:46:13 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1477133173.54.0.0892282350871.issue1602@psf.upfronthosting.co.za> Changes by irdb : ---------- nosy: +irdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 07:38:05 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 22 Oct 2016 11:38:05 +0000 Subject: [issue25953] re fails to identify invalid numeric group references in replacement strings In-Reply-To: <1451072808.1.0.287523380704.issue25953@psf.upfronthosting.co.za> Message-ID: <1477136285.48.0.117593208194.issue25953@psf.upfronthosting.co.za> SilentGhost added the comment: I've modified addgroup to take a pos argument, this seem to introduce minimal disturbance. ---------- Added file: http://bugs.python.org/file45187/25953_4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 10:05:28 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 22 Oct 2016 14:05:28 +0000 Subject: [issue27989] incomplete signature with help function using typing In-Reply-To: <1473214790.93.0.488939251151.issue27989@psf.upfronthosting.co.za> Message-ID: <1477145128.5.0.154053492481.issue27989@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Here is the patch according to the discussion (modifying inspect). I didn't change the rendering of docs for classes (neither stripped 'typing.' nor changed __bases__ to __orig_bases__). First, collections.abc.X are widely used as base classes, so that plain Mapping could be confused with collections.abc.Mapping. Second, seeing the actual runtime type-erased bases suggests that one should use isinstance() and issubclass() with those (not with, e.g., Mapping[int, str], the latter will raise TypeError). ---------- keywords: +patch nosy: +yselivanov Added file: http://bugs.python.org/file45188/typing-pydoc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 10:35:18 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 22 Oct 2016 14:35:18 +0000 Subject: [issue27989] incomplete signature with help function using typing In-Reply-To: <1473214790.93.0.488939251151.issue27989@psf.upfronthosting.co.za> Message-ID: <1477146918.21.0.288834462479.issue27989@psf.upfronthosting.co.za> Guido van Rossum added the comment: Hm, I actually like the original proposal better. Perhaps collections.abc.Mapping is more common than typing.Mapping, but is it more common *in function annotations*? I don't think so. Also, I like showing e.g. Iterator[Tuple[int, Any]] rather than just Iterator. This is documentation we're talking about, and the parameter types are very useful as documentation. (However, abbreviating List[Any] as List is fine, since they mean the same thing.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 10:41:33 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 22 Oct 2016 14:41:33 +0000 Subject: [issue27989] incomplete signature with help function using typing In-Reply-To: <1473214790.93.0.488939251151.issue27989@psf.upfronthosting.co.za> Message-ID: <1477147293.13.0.226073010614.issue27989@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: For function annotations I did as originally proposed. In my previous comment I was talking about documentation for classes. For example: class C(Generic[T], Mapping[int, str]): ... pydoc.render_doc(C) will show "class C(typing.Mapping)". while for function annotations typing is indeed much more common so that pydoc.render_doc(foo) will show foo(data: List[Any]) -> Iterator[Tuple[int, Any]] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 10:53:15 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 22 Oct 2016 14:53:15 +0000 Subject: [issue27989] incomplete signature with help function using typing In-Reply-To: <1473214790.93.0.488939251151.issue27989@psf.upfronthosting.co.za> Message-ID: <1477147995.14.0.738083351941.issue27989@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, sounds good then. I guess most of the work was in typing.py, not in inspect. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 10:55:22 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 22 Oct 2016 14:55:22 +0000 Subject: [issue27989] incomplete signature with help function using typing In-Reply-To: <1473214790.93.0.488939251151.issue27989@psf.upfronthosting.co.za> Message-ID: <1477148122.79.0.652782035483.issue27989@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Actually, for classes, it is probably worth adding a separate section "Generic type info" that will render information using __orig_bases__, __parameters__, and __args__. At the same time the "header" will be the same as now, listing runtime __bases__. What do you think about this? Should I open a separate issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 10:58:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 22 Oct 2016 14:58:11 +0000 Subject: [issue27989] incomplete signature with help function using typing In-Reply-To: <1473214790.93.0.488939251151.issue27989@psf.upfronthosting.co.za> Message-ID: <20161022145808.38632.28344.92C84F98@psf.io> Roundup Robot added the comment: New changeset dc030d15f80d by Guido van Rossum in branch '3.5': Issue #27989: Tweak inspect.formatannotation() to improve pydoc rendering of function annotations. Ivan L. https://hg.python.org/cpython/rev/dc030d15f80d New changeset 3937502c149d by Guido van Rossum in branch '3.6': Issue #27989: Tweak inspect.formatannotation() to improve pydoc rendering of function annotations. Ivan L. (3.5->3.6) https://hg.python.org/cpython/rev/3937502c149d New changeset 62127e60e7b0 by Guido van Rossum in branch 'default': Issue #27989: Tweak inspect.formatannotation() to improve pydoc rendering of function annotations. Ivan L. (3.6->3.7) https://hg.python.org/cpython/rev/62127e60e7b0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 10:58:13 2016 From: report at bugs.python.org (Miguel) Date: Sat, 22 Oct 2016 14:58:13 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477148293.96.0.719052385772.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Maybe it's better to add also these methods: busy = tk_busy busy_cget = tk_busy_cget busy_configure = tk_busy_configure busy_current = tk_busy_current busy_forget = tk_busy_forget busy_hold = tk_busy_hold busy_status = tk_busy_status Many other methods in tkinter module follow the same pattern. For example: iconbitmap = wm_iconbitmap iconify = wm_iconify group = wm_group geometry = wm_geometry focusmodel = wm_focusmodel frame = wm_frame ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 10:58:34 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 22 Oct 2016 14:58:34 +0000 Subject: [issue27989] incomplete signature with help function using typing In-Reply-To: <1473214790.93.0.488939251151.issue27989@psf.upfronthosting.co.za> Message-ID: <1477148314.79.0.826216149171.issue27989@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 11:01:01 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 22 Oct 2016 15:01:01 +0000 Subject: [issue27989] incomplete signature with help function using typing In-Reply-To: <1473214790.93.0.488939251151.issue27989@psf.upfronthosting.co.za> Message-ID: <1477148461.04.0.878447834285.issue27989@psf.upfronthosting.co.za> Guido van Rossum added the comment: Honestly I think pydoc is already too verbose. It would be better if the class header looked more like what was written in the source code -- that is the most compact way to render it. I say open a separate issue since this issue is about functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 11:25:14 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 22 Oct 2016 15:25:14 +0000 Subject: [issue28504] Cleanup unicode_decode_call_errorhandler_wchar/writer Message-ID: <1477149914.47.0.152397016067.issue28504@psf.upfronthosting.co.za> New submission from Xiang Zhang: The patch makes several cleanups to unicode_decode_call_errorhandler_wchar/writer: 1. Use U instead O! for argument parser, it ought to be more efficient and write less code. 2. In theory, if inputobj is not bytes, there needs to be a goto onError, or it could crash. But PyUnicodeDecodeError_GetObject is guaranteed to return bytes, so we can remove the incomplete branch. 3. On success, we don't need Xdecref. ---------- components: Interpreter Core files: unicode_decode_call_errorhandler_*.patch keywords: patch messages: 279198 nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Cleanup unicode_decode_call_errorhandler_wchar/writer type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45189/unicode_decode_call_errorhandler_*.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 11:47:17 2016 From: report at bugs.python.org (Wojtek Swiatek) Date: Sat, 22 Oct 2016 15:47:17 +0000 Subject: [issue28505] pip installation issues with default path on Windows Message-ID: <1477151237.91.0.234072346279.issue28505@psf.upfronthosting.co.za> New submission from Wojtek Swiatek: When installing Python 3.5 on Windows (I checked the 64bits installer but I believe the same issue will be with the 32bits), the default installation path when installing for "everyone" is now C:\ Program Files\Python35. When subsequently installing packages via pip, the installation crashes midway with a cryptic error about "permission denied" (if I remember correctly). I checked with the cryptography module. It is not an issue with access rights but with the whitespace in "Program Files". Reinstalling Python to C:\Python35 fixes the issue (pip install cryptography runs correctly). ---------- components: Installation messages: 279199 nosy: Wojtek Swiatek priority: normal severity: normal status: open title: pip installation issues with default path on Windows type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 12:04:43 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 16:04:43 +0000 Subject: [issue28504] Cleanup unicode_decode_call_errorhandler_wchar/writer In-Reply-To: <1477149914.47.0.152397016067.issue28504@psf.upfronthosting.co.za> Message-ID: <1477152283.55.0.280063652436.issue28504@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 12:30:52 2016 From: report at bugs.python.org (Justin Ting) Date: Sat, 22 Oct 2016 16:30:52 +0000 Subject: [issue28506] Multiprocessing Pool starmap - struct.error: 'i' format requires -2e10<=n<=2e10 Message-ID: <1477153852.62.0.286648862234.issue28506@psf.upfronthosting.co.za> New submission from Justin Ting: Multiprocessing is throwing this error when dealing with large amounts of data (all floating points an integers), but none of which exceeds the number boundaries in the error that it throws: File "/root/anaconda3/lib/python3.5/multiprocessing/pool.py", line 268, in starmap return self._map_async(func, iterable, starmapstar, chunksize).get() File "/root/anaconda3/lib/python3.5/multiprocessing/pool.py", line 608, in get raise self._value File "/root/anaconda3/lib/python3.5/multiprocessing/pool.py", line 385, in _handle_tasks put(task) File "/root/anaconda3/lib/python3.5/multiprocessing/connection.py", line 206, in send self._send_bytes(ForkingPickler.dumps(obj)) File "/root/anaconda3/lib/python3.5/multiprocessing/connection.py", line 393, in _send_bytes header = struct.pack("!i", n) struct.error: 'i' format requires -2147483648 <= number <= 2147483647 > /root/anaconda3/lib/python3.5/multiprocessing/connection.py(393)_send_bytes() -> header = struct.pack("!i", n) It works fine on any number of subsets of this data, but not when put together. ---------- components: Library (Lib) messages: 279200 nosy: Justin Ting priority: normal severity: normal status: open title: Multiprocessing Pool starmap - struct.error: 'i' format requires -2e10<=n<=2e10 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 12:48:33 2016 From: report at bugs.python.org (Tim Peters) Date: Sat, 22 Oct 2016 16:48:33 +0000 Subject: [issue28506] Multiprocessing Pool starmap - struct.error: 'i' format requires -2e10<=n<=2e10 In-Reply-To: <1477153852.62.0.286648862234.issue28506@psf.upfronthosting.co.za> Message-ID: <1477154913.3.0.618080276923.issue28506@psf.upfronthosting.co.za> Tim Peters added the comment: This has nothing to do with the _values_ you're passing - it has to do with the length of the pickle string: def _send_bytes(self, buf): n = len(buf) # For wire compatibility with 3.2 and lower header = struct.pack("!i", n) IT'S BLOWING UP HERE if n > 16384: ... self._send(header) self._send(buf) where the traceback shows it's called here: self._send_bytes(ForkingPickler.dumps(obj)) Of course the less data you're passing, the smaller the pickle, and that's why it doesn't blow up if you pass subsets of the data. I'd suggest rethinking how you're sharing data, as pushing two-gigabyte pickle strings around is bound to be the least efficient way possible even if it didn't blow up ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 12:52:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 16:52:24 +0000 Subject: [issue28506] Multiprocessing Pool starmap - struct.error: 'i' format requires -2e10<=n<=2e10 In-Reply-To: <1477153852.62.0.286648862234.issue28506@psf.upfronthosting.co.za> Message-ID: <1477155144.36.0.964734584612.issue28506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This looks as a duplicate of issue17560. ---------- nosy: +serhiy.storchaka resolution: -> duplicate superseder: -> problem using multiprocessing with really big objects? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 12:53:24 2016 From: report at bugs.python.org (Justin Ting) Date: Sat, 22 Oct 2016 16:53:24 +0000 Subject: [issue28506] Multiprocessing Pool starmap - struct.error: 'i' format requires -2e10<=n<=2e10 In-Reply-To: <1477154913.3.0.618080276923.issue28506@psf.upfronthosting.co.za> Message-ID: Justin Ting added the comment: Ah, should have picked that up, coding at 3:30am doesn't do wonders for keeping a clear head. Thanks Tim, I'll keep that in mind! *Justin Ting* *E* justingling at gmail.com | *M* +61 424 751 665 | *L* *https://au.linkedin.com/in/justinyting * | *G *https://github.com/jyting On Sun, Oct 23, 2016 at 3:48 AM, Tim Peters wrote: > > Tim Peters added the comment: > > This has nothing to do with the _values_ you're passing - it has to do > with the length of the pickle string: > > def _send_bytes(self, buf): > n = len(buf) > # For wire compatibility with 3.2 and lower > header = struct.pack("!i", n) IT'S BLOWING UP HERE > if n > 16384: > ... > self._send(header) > self._send(buf) > > where the traceback shows it's called here: > > self._send_bytes(ForkingPickler.dumps(obj)) > > Of course the less data you're passing, the smaller the pickle, and that's > why it doesn't blow up if you pass subsets of the data. > > I'd suggest rethinking how you're sharing data, as pushing two-gigabyte > pickle strings around is bound to be the least efficient way possible even > if it didn't blow up ;-) > > ---------- > nosy: +tim.peters > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 12:56:11 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 22 Oct 2016 16:56:11 +0000 Subject: [issue28507] Regenerate ./configure on the default branch Message-ID: <1477155371.02.0.736357632927.issue28507@psf.upfronthosting.co.za> New submission from Chi Hsuan Yen: In 0ea088671bc2 and 3ce29b2452f0, --runstatedir was added to ./configure. Seems Benjamin uses a slightly different version of autoconf than 2.69. As a result, modifying ./configure.ac leads to unrelated changes in ./configure. Later in 17bd5239b886, this option is removed from 3.6 branch. The issue is still in the default branch. Can anyone apply 17bd5239b886 to the default branch? Added authors of aforementioned commits. ---------- components: Build messages: 279204 nosy: Chi Hsuan Yen, benjamin.peterson, ned.deily priority: normal severity: normal status: open title: Regenerate ./configure on the default branch type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 13:04:20 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 22 Oct 2016 17:04:20 +0000 Subject: [issue28507] Regenerate ./configure on the default branch In-Reply-To: <1477155371.02.0.736357632927.issue28507@psf.upfronthosting.co.za> Message-ID: <1477155860.14.0.766117375827.issue28507@psf.upfronthosting.co.za> Ned Deily added the comment: Don't worry about it. We will take care of it as necessary when we release. ---------- resolution: -> later stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 13:14:10 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 22 Oct 2016 17:14:10 +0000 Subject: [issue28507] Regenerate ./configure on the default branch In-Reply-To: <1477155371.02.0.736357632927.issue28507@psf.upfronthosting.co.za> Message-ID: <1477156450.12.0.603248914046.issue28507@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Thanks for the fast response. My main point is not that would affect users who compile from tarballs. The point is that if I modify configure.ac on the default branch, I can't generate a patch that applies to the default branch cleanly; there are always --runstatedir related changes, so line numbers are incorrect. Seems Rietveld doesn't handle patches with wrong line numbers. An example is ncurses.patch of issue28190. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 13:35:42 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 22 Oct 2016 17:35:42 +0000 Subject: [issue28508] Need way to expose incremental size of key sharing dicts Message-ID: <1477157742.67.0.432701852962.issue28508@psf.upfronthosting.co.za> New submission from Raymond Hettinger: In many Python programs much of the memory utilization is due to having many instances of the same object. We have key-sharing dicts that reduce the cost by storing only in the incremental values. It would be nice to have visibility to the savings. One possible way to do this is to have sys.getsizeof(d) report only the incremental space. That would let users make reasonable memory estimates in the form of n_instances * sizeof(vars(inst)). ---------- components: Interpreter Core messages: 279207 nosy: rhettinger priority: normal severity: normal status: open title: Need way to expose incremental size of key sharing dicts versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 14:04:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 18:04:53 +0000 Subject: [issue28508] Need way to expose incremental size of key sharing dicts In-Reply-To: <1477157742.67.0.432701852962.issue28508@psf.upfronthosting.co.za> Message-ID: <1477159493.26.0.333513569664.issue28508@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Isn't this already implemented? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 14:06:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 18:06:57 +0000 Subject: [issue28508] Need way to expose incremental size of key sharing dicts In-Reply-To: <1477157742.67.0.432701852962.issue28508@psf.upfronthosting.co.za> Message-ID: <1477159617.07.0.164179251875.issue28508@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >>> class C: ... def __init__(self): ... for i in range(682): ... setattr(self, 'a%d'%i, None) ... >>> sys.getsizeof(C().__dict__) / len(C().__dict__) 4.058651026392962 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 14:20:28 2016 From: report at bugs.python.org (klappnase) Date: Sat, 22 Oct 2016 18:20:28 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477160428.09.0.987831070723.issue28498@psf.upfronthosting.co.za> klappnase added the comment: Ok, I investigated this a little further. First I noticed another bug with the code from my first post, the "self._w" must be omitted from the call to busy_current(), so the func should look like: def busy_current(self, pattern=None): return([self._nametowidget(x) for x in self.tk.splitlist(self.tk.call( 'tk', 'busy', 'current', pattern))]) I did then some more testing, the code now seems to work flawlessly both with Python-3.5.2 on windows 10 and with Python 2.7 on debian Jessie. So I finally prepared a patch (against the __init__.py file from the 3.5.2 windows installer). Following Miguel's suggestion I also added aliases prefixed with tk_ to the various busy_... methods. Since I am not familiar with Python's "official" test mechanisms, for now I wrote a simple script that does a number of calls to the tk_busy_... functions to test if everything works as expected: try: import Tkinter except: import tkinter as Tkinter #Tkinter.wantobjects = False root = Tkinter.Tk() f = Tkinter.Frame(root, name='f') f.pack(fill='both', expand=1) b=Tkinter.Button(f, name='b', text='hi', command=root.bell) b.pack(padx=100, pady=100) top = Tkinter.Toplevel(root, name='top') def test1(): root.tk_busy() def test2(): root.tk_busy_forget() def test3(): root.tk_busy_hold(cursor='gumby') def test4(): root.tk_busy_forget() def test5(): root.tk_busy_hold() top.tk_busy(cursor='gumby') print(root.tk_busy_current()) print(root.tk_busy_current(pattern='*t*')) def test6(): print(root.tk_busy_current()) def test7(): root.tk_busy_configure(cursor='gumby') def test8(): print(root.tk_busy_configure()) print(root.tk_busy_configure('cursor')) print(root.tk_busy_cget('cursor')) def test9(): print(root.tk_busy_status()) def test10(): root.tk_busy_forget() print(root.tk_busy_status()) print(root.tk_busy_current()) delay = 0 for test in (test1, test2, test3, test4, test5, test6, test7, test8, test9, test10): delay += 1000 root.after(delay, test) root.mainloop() ---------- keywords: +patch Added file: http://bugs.python.org/file45190/tk_busy.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 14:25:43 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 22 Oct 2016 18:25:43 +0000 Subject: [issue28508] Need way to expose incremental size of key sharing dicts In-Reply-To: <1477157742.67.0.432701852962.issue28508@psf.upfronthosting.co.za> Message-ID: <1477160743.26.0.721305361283.issue28508@psf.upfronthosting.co.za> Xiang Zhang added the comment: > Isn't this already implemented? Get the same question. dict.__sizeof__ can identify shared dicts. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 14:57:03 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 22 Oct 2016 18:57:03 +0000 Subject: [issue28507] Regenerate ./configure on the default branch In-Reply-To: <1477155371.02.0.736357632927.issue28507@psf.upfronthosting.co.za> Message-ID: <1477162623.81.0.370510845317.issue28507@psf.upfronthosting.co.za> Ned Deily added the comment: That's why we suggest to not include configure changes in a patch, only configure.ac changes. It's the responsibility of the patch committer to ensure that generated files like configure are updated properly at commit time. But, yes, it would be better to not have spurious changes go in and out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 15:03:48 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 22 Oct 2016 19:03:48 +0000 Subject: [issue28507] Regenerate ./configure on the default branch In-Reply-To: <1477155371.02.0.736357632927.issue28507@psf.upfronthosting.co.za> Message-ID: <1477163028.11.0.224570759162.issue28507@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Well, I remember someone asked me to include ./configure in patches. Maybe it's worth to add a comment in devguide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 15:08:47 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 22 Oct 2016 19:08:47 +0000 Subject: [issue28505] pip installation issues with default path on Windows In-Reply-To: <1477151237.91.0.234072346279.issue28505@psf.upfronthosting.co.za> Message-ID: <1477163327.63.0.786769014602.issue28505@psf.upfronthosting.co.za> Eryk Sun added the comment: Issues with pip should be reported to its GitHub site. But installing to the "Program Files" directory certainly isn't a problem for pip. You need to run it with administrator rights. ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 15:13:37 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 19:13:37 +0000 Subject: [issue28509] Key-sharing dictionaries can inrease the memory consumption Message-ID: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The size of small key-sharing dictionary (PEP 412) can be larger than the size of normal dictionary. Python 3.6: >>> def dictsizes(k): ... d = {'a%d'%i: None for i in range(k)} ... class C: ... def __init__(self): ... self.__dict__.update(d) ... return sys.getsizeof(d), sys.getsizeof(C().__dict__) ... >>> for i in range(20): ... print(i, dictsizes(i)) ... 0 (128, 60) 1 (128, 60) 2 (128, 60) 3 (128, 60) 4 (128, 60) 5 (128, 60) 6 (196, 196) 7 (196, 196) 8 (196, 344) 9 (196, 344) 10 (196, 344) 11 (344, 344) 12 (344, 344) 13 (344, 344) 14 (344, 344) 15 (344, 344) 16 (344, 628) 17 (344, 628) 18 (344, 628) 19 (344, 628) Normal dictionaries of size 8-10 are more compact than corresponding key-sharing dictionaries. Python 3.5: >>> for i in range(20): ... print(i, dictsizes(i)) ... 0 (144, 48) 1 (144, 48) 2 (144, 48) 3 (144, 48) 4 (144, 240) 5 (144, 240) 6 (240, 240) 7 (240, 240) 8 (240, 432) 9 (240, 432) 10 (240, 432) 11 (240, 432) 12 (432, 432) 13 (432, 432) 14 (432, 432) 15 (432, 432) 16 (432, 816) 17 (432, 816) 18 (432, 816) 19 (432, 816) In Python 3.5 normal dictionaries of size 4-5 and 8-11 are more compact than corresponding key-sharing dictionaries. And note that key-sharing dictionaries of size 0-3 consume more memory on 3.6 that on 3.5. I think we should use more thrifty strategy for allocating key-sharing dictionaries. ---------- components: Interpreter Core messages: 279215 nosy: Mark.Shannon, benjamin.peterson, inada.naoki, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Key-sharing dictionaries can inrease the memory consumption type: resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 15:33:11 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 19:33:11 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477164791.64.0.858045616091.issue28498@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you provide a patch against the default branch? See https://docs.python.org/devguide/ for help. The patch should include not just changes to the tkinter module, but tests for new methods (add new class in Lib/tkinter/test/test_tkinter/test_widgets.py). Unfortunately there is no appropriate place for documenting this feature in the module documentation, but new methods should have docstrings. Would be nice to add an entry in Doc/whatsnew/3.7.rst. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 16:18:53 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 22 Oct 2016 20:18:53 +0000 Subject: [issue28504] Cleanup unicode_decode_call_errorhandler_wchar/writer In-Reply-To: <1477149914.47.0.152397016067.issue28504@psf.upfronthosting.co.za> Message-ID: <20161022201850.32942.62297.61168865@psf.io> Roundup Robot added the comment: New changeset 204a43c452cc by Serhiy Storchaka in branch 'default': Issue #28504: Cleanup unicode_decode_call_errorhandler_wchar/writer. https://hg.python.org/cpython/rev/204a43c452cc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 16:53:49 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 20:53:49 +0000 Subject: [issue28510] PyUnicodeDecodeError_GetObject always return bytes Message-ID: <1477169628.97.0.862291217974.issue28510@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Since PyUnicodeDecodeError_GetObject() always returns bytes object, following PyBytes_AsString() never fails and can be replaced with the PyBytes_AS_STRING() macro. This makes error handlers looking a littler clearer and a little faster. The patch is inspired by the patch of Xiang Zhang (issue28504). ---------- components: Interpreter Core files: unicodedecodeerror_object_is_bytes.patch keywords: patch messages: 279218 nosy: serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: PyUnicodeDecodeError_GetObject always return bytes type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45191/unicodedecodeerror_object_is_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 16:53:54 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 20:53:54 +0000 Subject: [issue28511] Use the "U" format for parsing Unicode object arg in PyArg_Parse* Message-ID: <1477169634.11.0.781122860843.issue28511@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch uses the "U" format in PyArg_Parse* functions instead of the "O!" format with &PyUnicode_Type argument. This makes code cleaner, faster, and allows to remove additional PyUnicode_READY checks. The patch is inspired by the patch of Xiang Zhang (issue28504). ---------- components: Interpreter Core files: parse_unicode_arg.patch keywords: patch messages: 279219 nosy: serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Use the "U" format for parsing Unicode object arg in PyArg_Parse* type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45192/parse_unicode_arg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 16:56:46 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 20:56:46 +0000 Subject: [issue28504] Cleanup unicode_decode_call_errorhandler_wchar/writer In-Reply-To: <1477149914.47.0.152397016067.issue28504@psf.upfronthosting.co.za> Message-ID: <1477169806.1.0.660744936728.issue28504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Thank you Xiang. I have extended your approach to all sources and have written other two patches: issues28510 and issue28511. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 17:15:07 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 22 Oct 2016 21:15:07 +0000 Subject: [issue28507] Regenerate ./configure on the default branch In-Reply-To: <1477155371.02.0.736357632927.issue28507@psf.upfronthosting.co.za> Message-ID: <1477170907.96.0.374175996683.issue28507@psf.upfronthosting.co.za> Ned Deily added the comment: https://docs.python.org/devguide/faq.html#how-do-i-regenerate-configure ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 17:30:37 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 22 Oct 2016 21:30:37 +0000 Subject: [issue28507] Regenerate ./configure on the default branch In-Reply-To: <1477155371.02.0.736357632927.issue28507@psf.upfronthosting.co.za> Message-ID: <1477171837.22.0.67251678841.issue28507@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Thanks. Sorry for not reading devguide carefully. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 17:47:25 2016 From: report at bugs.python.org (Miguel) Date: Sat, 22 Oct 2016 21:47:25 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477172845.84.0.699293574008.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Thanks klappnase for your collaboration. I dont understand this function: def busy_status(self): '''Returns the busy status of this window. If the window presently can not receive user interactions, True is returned, otherwise False.''' return((self.tk.getboolean(self.tk.call( 'tk', 'busy', 'status', self._w)) and True) or False) This pattern is not used in other functions that make use of self.tk.getboolean. These functions simply returns the value of self.tk.getboolean directly. The code of your function busy_configure() is very similar to Misc._configure(). I think that you are duplicating code. Other functions related to configuration like pack_configure() and place_configure() simply use self._options(). For example: def pack_configure(self, cnf={}, **kw): self.tk.call( ('pack', 'configure', self._w) + self._options(cnf, kw)) def place_configure(self, cnf={}, **kw): self.tk.call( ('place', 'configure', self._w) + self._options(cnf, kw)) I think that my proposal can do the job well. It follows the same pattern than the other functions: def tk_busy_configure(self, cnf=None, **kw): self.tk.call(('tk', 'busy', 'configure', self._w) + self._options(cnf, kw)) But I am not totally sure whether it's better to call directly Misc._configure or Misc._options in this situation. Also if we follow the naming convention used in tkinter, it seems that we have to define first tk_busy_configure and then make this assignation: busy_configure = tk_busy_configure ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 17:50:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 21:50:07 +0000 Subject: [issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None Message-ID: <1477173007.35.0.842183977255.issue28512@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The purpose of PyErr_SyntaxLocationEx() function (added in 00e4ce31d404) was setting the offset attribute of raised syntax error to specified value. But this never worked as expected. The offset attribute is set to integer value in Python/errors.c:1067, but then replaced with None in Python/errors.c:1083. ---------- components: Interpreter Core messages: 279224 nosy: benjamin.peterson, serhiy.storchaka priority: normal severity: normal status: open title: PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 17:53:42 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 21:53:42 +0000 Subject: [issue28281] Remove year limits from calendar In-Reply-To: <1474922646.39.0.781731359123.issue28281@psf.upfronthosting.co.za> Message-ID: <1477173222.42.0.965255368812.issue28281@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Alexander as core developer and the creator of this issue can merge the patch after making his review. But first we should make a decision whether it is worth to do at all. I'm +0 now. Raymond seems has objections. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 18:01:41 2016 From: report at bugs.python.org (Miguel) Date: Sat, 22 Oct 2016 22:01:41 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477173701.68.0.379594406028.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Misc._configure is only used when the first Tcl command is the name of the widget. Very probably my proposal for tk_busy_configure is a better candidate because it follows the conventions used in tkinter (it's similar to pack_configure and place_configure): def tk_busy_configure(self, cnf=None, **kw): self.tk.call(('tk', 'busy', 'configure', self._w) + self._options(cnf, kw)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 18:16:58 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 22 Oct 2016 22:16:58 +0000 Subject: [issue28508] Need way to expose incremental size of key sharing dicts In-Reply-To: <1477157742.67.0.432701852962.issue28508@psf.upfronthosting.co.za> Message-ID: <1477174618.9.0.903755499844.issue28508@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Isn't this already implemented? No. >>> class A: pass >>> d = dict.fromkeys('abcdefghi') >>> a = A() >>> a.__dict__.update(d) >>> b = A() >>> b.__dict__.update(d) >>> import sys >>> [sys.getsizeof(m) for m in [d, vars(a), vars(b)]] [368, 648, 648] >>> c = A() >>> c.__dict__.update(d) >>> [sys.getsizeof(m) for m in [d, vars(a), vars(b), vars(c)]] [368, 648, 648, 648] There is no benefit reported for key-sharing. Even if you make a thousand of these instances, the size reported is the same. Here is the relevant code: _PyDict_SizeOf(PyDictObject *mp) { Py_ssize_t size, usable, res; size = DK_SIZE(mp->ma_keys); usable = USABLE_FRACTION(size); res = _PyObject_SIZE(Py_TYPE(mp)); if (mp->ma_values) res += usable * sizeof(PyObject*); /* If the dictionary is split, the keys portion is accounted-for in the type object. */ if (mp->ma_keys->dk_refcnt == 1) res += (sizeof(PyDictKeysObject) - Py_MEMBER_SIZE(PyDictKeysObject, dk_indices) + DK_IXSIZE(mp->ma_keys) * size + sizeof(PyDictKeyEntry) * usable); return res; } It looks like the fixed overhead is included for every instance of a split-dictionary. Instead, it might make sense to take the fixed overhead and divide it by the number of instances sharing the keys (averaging the overhead across the multiple shared instances): res = _PyObject_SIZE(Py_TYPE(mp)) / num_instances; Perhaps use ceiling division: res = -(- _PyObject_SIZE(Py_TYPE(mp)) / num_instances); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 18:22:46 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 22 Oct 2016 22:22:46 +0000 Subject: [issue28281] Remove year limits from calendar In-Reply-To: <1474922646.39.0.781731359123.issue28281@psf.upfronthosting.co.za> Message-ID: <1477174966.19.0.924369457789.issue28281@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The patch should include an update to documentation. 1. We should probably explain that python -mcalendar does not reproduce the output of UNIX cal. For example, on Mac OS (and various Linux variants): $ cal 9 1752 September 1752 Su Mo Tu We Th Fr Sa 1 2 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 but $ python3 -mcalendar 1752 9 September 1752 Mo Tu We Th Fr Sa Su 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2. We should explain that while the calendar module relies on datetime, it implements an infinite calendar with a period of 400 years. 3. A reference should be made to ISO 8601 for our treatment of nonpositive years. Given ISO 8601 and the simplicity of this change, I don't think Raymond will insist that we continue imposing datetime-like limits, but I would like to give him a chance to renew his objection once the no-limits calendar is documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 19:00:11 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Oct 2016 23:00:11 +0000 Subject: [issue28508] Need way to expose incremental size of key sharing dicts In-Reply-To: <1477157742.67.0.432701852962.issue28508@psf.upfronthosting.co.za> Message-ID: <1477177211.52.0.676927542969.issue28508@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Hmm, seems no dict here is shared-key dict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 19:13:20 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 22 Oct 2016 23:13:20 +0000 Subject: [issue28508] Need way to expose incremental size of key sharing dicts In-Reply-To: <1477157742.67.0.432701852962.issue28508@psf.upfronthosting.co.za> Message-ID: <1477178000.43.0.240534901916.issue28508@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Hmm, seems no dict here is shared-key dict. Yes. That seems to be the case. Apparently, doing an update() to the inst dict cause it to recombine. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 19:15:16 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 22 Oct 2016 23:15:16 +0000 Subject: [issue28508] Need way to expose incremental size of key sharing dicts In-Reply-To: <1477157742.67.0.432701852962.issue28508@psf.upfronthosting.co.za> Message-ID: <1477178116.18.0.0731769927197.issue28508@psf.upfronthosting.co.za> Raymond Hettinger added the comment: >>> from sys import getsizeof >>> class A: def __init__(self, a, b, c, d, e, f): self.a = a self.b = b self.c = c self.d = d self.e = e self.f = f >>> a = A(10, 20, 30, 40, 50, 60) >>> b = A(10, 20, 30, 40, 50, 60) >>> c = A(10, 20, 30, 40, 50, 60) >>> d = A(10, 20, 30, 40, 50, 60) >>> [getsizeof(vars(inst)) for inst in [a, b, c, d]] [152, 152, 152, 152] >>> [getsizeof(dict(vars(inst))) for inst in [a, b, c, d]] [368, 368, 368, 368] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 19:32:24 2016 From: report at bugs.python.org (klappnase) Date: Sat, 22 Oct 2016 23:32:24 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477179144.89.0.658310859831.issue28498@psf.upfronthosting.co.za> klappnase added the comment: @Miguel About tk_busy_configure(): I strongly suggest that my version of tk_busy_configure() is better, since it behaves exactly like the usual configure() methods in Tkinter (which includes e.g. Canvas.itemconfigure() or Text.tag_configure()), i.e. you can not only change the values of the configuration options, but also query available options and their default values. I think *this* follows the usual Tkinter conventions. As you pointed out in your last post, I could not use _configure() directly for this, but had to "duplicate" the code with a slight modification, because of the order of arguments for tk_busy_configure(). The reason that this construct is not used for pack_configure() is simply that widget.pack_configure() does not return anything if called without arguments (in fact it appears to be the very same as widget.pack()). About busy_status(): the construct I use here is to work around the broken _getboolean() which does not always return True or False, but often returns None instead of False (if wantobjects==True). Therefore I used (unlike most Tkinter methods) tkapp.getboolean() directly, however quite a while ago I noticed that this was broken, too, and sometimes returned 0 or 1 instead of True or False. However I admit that I did not test right now if this is still the case, in fact I just copy'n'pasted it from code I already use and that works perfectly well (BTW, I suggested the same method to fix these issue with _getboolean() here some time ago, and of course I agree that it would be preferrable to fix _getboolean() and possibly tkapp.getboolean() in the first place). @Serhiy Thanks for the link, I did not find the source tree on the new python web site (I admit I did not look too hard :) . I now added a patch against the default branch'es __init__.py . Doc strings are (still :) included. I also changed the function names according to Miguel's suggestion. I'll see if I find the time to add a proper test class one of these days (you guys make it really hard for outsiders to help out ;) ---------- Added file: http://bugs.python.org/file45193/tk_busy.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 20:52:20 2016 From: report at bugs.python.org (Justin Ting) Date: Sun, 23 Oct 2016 00:52:20 +0000 Subject: [issue28506] Multiprocessing Pool starmap - struct.error: 'i' format requires -2e10<=n<=2e10 In-Reply-To: <1477153852.62.0.286648862234.issue28506@psf.upfronthosting.co.za> Message-ID: <1477183940.88.0.439572879899.issue28506@psf.upfronthosting.co.za> Justin Ting added the comment: Actually, on further inspection, I seem to be having a slightly different problem with the same error that I initially described now. Even after modifying my code so that each python forked off to another process was only given the following arguments: args = [(None, models_shape, False, None, [start, end], 'data/qp_red_features.npy') for start, end in jobs] where models_shape, start, and end are only single integers, the same error still comes up as a result. Within each process, I'm reading in a (relatively small, only 12MB) .npy ndarray and taking the [start:end] slice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 22:25:55 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 23 Oct 2016 02:25:55 +0000 Subject: [issue28509] Key-sharing dictionaries can inrease the memory consumption In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: > 0 (128, 60) > 1 (128, 60) > 2 (128, 60) > 3 (128, 60) > 4 (128, 60) > 5 (128, 60) Minimum dict keysize is 8, and it's capacity is 5. > 6 (196, 196) Dict is resized. And since __dict__.update() caused the resizing, both are normal (combined) dict. > 7 (196, 196) > 8 (196, 344) dict.update() cause faster increasing keysize. Adding to dict cause resizing when number of items reaches 2/3 of keysize. On the other hand, dict.update() targets 1/2 of keysize is filled. In this case, keysize is 16 and 16 * 2 // 3 = 10. Since 8 < 10, adding item to key doesn't increase it's size. Since 8 >= (16 / 2), dict.update() creates dict having keysize == 32. (note: My patch in http://bugs.python.org/issue28147 changes >= to >. So keysize == 16 when number of items == 8). But, while checking this, I found another bug in dict_merge. /* Do one big resize at the start, rather than * incrementally resizing as we insert new items. Expect * that there will be no (or few) overlapping keys. */ if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2) if (dictresize(mp, (mp->ma_used + other->ma_used)*2) != 0) return -1; dk_usable means "how many new items can be inserted without resizing". So this if statement should be: if (mp->ma_keys->dk_usable < other->ma_used) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 22:41:31 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 23 Oct 2016 02:41:31 +0000 Subject: [issue28509] Key-sharing dictionaries can inrease the memory consumption In-Reply-To: Message-ID: INADA Naoki added the comment: And I feel current target size of dict_merge is bit larger. When inserting new item: * ma_used = dk_size*2 / 3 when right before increasing keys * ma_used = dk_size / 3 when right after increasing keys On the other hand, current dict_merge creates: * ma_used = dk_size / 2 when all keys in two dict is distinct * ma_used = dk_size / 4 when all keys in two dict is same If changing it to dictresize(mp, (mp->ma_used + other->ma_used)*3/2), * ma_used = dk_size*2 / 3 when all keys in two dict is distinct * ma_used = dk_size / 3 when all keys in two dict is same I think this is more consistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 01:17:40 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 23 Oct 2016 05:17:40 +0000 Subject: [issue28509] Key-sharing dictionaries can inrease the memory consumption In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1477199860.15.0.805871363271.issue28509@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 01:24:10 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 23 Oct 2016 05:24:10 +0000 Subject: [issue28510] PyUnicodeDecodeError_GetObject always return bytes In-Reply-To: <1477169628.97.0.862291217974.issue28510@psf.upfronthosting.co.za> Message-ID: <1477200250.4.0.557951357858.issue28510@psf.upfronthosting.co.za> Xiang Zhang added the comment: LGTM. Actually I just read the codecs error handles codes last day but didn't think of this. :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 02:35:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 06:35:27 +0000 Subject: [issue28511] Use the "U" format for parsing Unicode object arg in PyArg_Parse* In-Reply-To: <1477169634.11.0.781122860843.issue28511@psf.upfronthosting.co.za> Message-ID: <1477204527.67.0.74528898904.issue28511@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Xiang. But seems your mail provider again is broken, and you will not receive the notification. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 02:45:16 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Oct 2016 06:45:16 +0000 Subject: [issue28510] PyUnicodeDecodeError_GetObject always return bytes In-Reply-To: <1477169628.97.0.862291217974.issue28510@psf.upfronthosting.co.za> Message-ID: <20161023064513.9357.19597.48A9D7AB@psf.io> Roundup Robot added the comment: New changeset e5e05ac07aee by Serhiy Storchaka in branch 'default': Issue #28510: Clean up decoding error handlers. https://hg.python.org/cpython/rev/e5e05ac07aee ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 02:46:22 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 06:46:22 +0000 Subject: [issue28510] PyUnicodeDecodeError_GetObject always return bytes In-Reply-To: <1477169628.97.0.862291217974.issue28510@psf.upfronthosting.co.za> Message-ID: <1477205182.52.0.385991632977.issue28510@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Xiang. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 03:15:54 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 07:15:54 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1477206954.45.0.453774738219.issue28509@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Dict is resized. And since __dict__.update() caused the resizing, both are normal (combined) dict. Ah, my bad, I missed this point. The original issue now disappears. Thanks Naoki. But dict.update (and maybe inserting) can use more economical allocation strategy. ---------- stage: -> needs patch title: Key-sharing dictionaries can inrease the memory consumption -> dict.update allocates too much versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 03:47:53 2016 From: report at bugs.python.org (SilentGhost) Date: Sun, 23 Oct 2016 07:47:53 +0000 Subject: [issue25953] re fails to identify invalid numeric group references in replacement strings In-Reply-To: <1451072808.1.0.287523380704.issue25953@psf.upfronthosting.co.za> Message-ID: <1477208873.26.0.339517958223.issue25953@psf.upfronthosting.co.za> SilentGhost added the comment: Updated patch fixing the position issue. ---------- Added file: http://bugs.python.org/file45194/25953_5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 04:18:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 08:18:24 +0000 Subject: [issue25953] re fails to identify invalid numeric group references in replacement strings In-Reply-To: <1451072808.1.0.287523380704.issue25953@psf.upfronthosting.co.za> Message-ID: <1477210704.06.0.956307195192.issue25953@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Thank you for your contribution SilentGhost. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 05:12:34 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Oct 2016 09:12:34 +0000 Subject: [issue25953] re fails to identify invalid numeric group references in replacement strings In-Reply-To: <1451072808.1.0.287523380704.issue25953@psf.upfronthosting.co.za> Message-ID: <20161023091231.68607.8848.3E3F348E@psf.io> Roundup Robot added the comment: New changeset cea983246919 by Serhiy Storchaka in branch '3.6': Issue #25953: re.sub() now raises an error for invalid numerical group https://hg.python.org/cpython/rev/cea983246919 New changeset 15e3695affa2 by Serhiy Storchaka in branch 'default': Issue #25953: re.sub() now raises an error for invalid numerical group https://hg.python.org/cpython/rev/15e3695affa2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 05:23:19 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 09:23:19 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477214599.89.0.700687661204.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Hi klappnase, you are right with the function tk_busy_configure(). Maybe there is a little bit of code duplicated. I think that it's better to directly change the Tkinter function _configure() to make it more general: def _configure(self, cmd, cnf, kw): """Internal function.""" if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmerge(cnf) if cnf is None: return self._getconfigure(cmd) if isinstance(cnf, str): return self._getconfigure1(cmd + ('-'+cnf,)) self.tk.call(cmd + self._options(cnf)) I think that it's interesting to do this change because the function is more general and maybe can be used again in the future for new features in Tcl Tk. This way, we avoid code duplication (Dont Repeat Yourself is one of the philosophes of Python). This is the new version of tk_busy_configure using the mentioned change: def tk_busy_configure(self, cnf=None, **kw): return self._configure(('tk', 'busy', 'configure', self._w), cnf, kw) It's more concise. I disagree with tk_busy_status(). It's better to be more predictable an return the same than the other methods that uses getboolean(). If there is a bug, it's better to solve that bug. Could you please guive me an code example that replicates the bug? The _getboolean function is implemented in _tkinter.c. This is the implementation: static PyObject * Tkapp_GetBoolean (self, args) PyObject *self; PyObject *args; { char *s; int v; if (!PyArg_Parse (args, "s", &s)) return NULL; if (Tcl_GetBoolean (Tkapp_Interp (self), s, &v) == TCL_ERROR) return Tkinter_Error (self); return Py_BuildValue ("i", v); } A priori , I can't appreciate any bug in this function. If there is some bug, it's in another place of the C code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 05:26:22 2016 From: report at bugs.python.org (STINNER Victor) Date: Sun, 23 Oct 2016 09:26:22 +0000 Subject: [issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10 In-Reply-To: <1477125057.74.0.486896482274.issue28469@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: timeit_autorange_numbers.patch: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 05:31:38 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 09:31:38 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477215098.01.0.961611825488.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Tcl_GetBoolean() converts a boolean string to an integer 0 or 1: https://www.tcl.tk/man/tcl8.6/TclLib/GetInt.htm and then Py_BuildValue() converts the integer to a Python object: https://docs.python.org/2/c-api/arg.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 05:38:12 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 09:38:12 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477215492.36.0.836713647971.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Ok. Maybe the bug is here: Misc.getboolean() This is the required change: def getboolean(self, s): """Return a boolean value for Tcl boolean values true and false given as parameter.""" return bool(self.tk.getboolean(s)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 05:52:45 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 09:52:45 +0000 Subject: [issue25953] re fails to identify invalid numeric group references in replacement strings In-Reply-To: <1451072808.1.0.287523380704.issue25953@psf.upfronthosting.co.za> Message-ID: <1477216365.15.0.127208864019.issue25953@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Committed with additional changes. Fixed yet one occurrence of "invalid group reference" without group index, and made small style changes. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 06:18:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Oct 2016 10:18:13 +0000 Subject: [issue28115] Use argparse for the zipfile module In-Reply-To: <1473750423.74.0.95052105427.issue28115@psf.upfronthosting.co.za> Message-ID: <20161023101720.18103.55713.9F1036DD@psf.io> Roundup Robot added the comment: New changeset 042c923c5b67 by Serhiy Storchaka in branch '2.7': Issue #28115: Added tests for CLI of the zipfile module. https://hg.python.org/cpython/rev/042c923c5b67 New changeset 900c47c98711 by Serhiy Storchaka in branch '3.5': Issue #28115: Added tests for CLI of the zipfile module. https://hg.python.org/cpython/rev/900c47c98711 New changeset a1975621bba2 by Serhiy Storchaka in branch '3.6': Issue #28115: Added tests for CLI of the zipfile module. https://hg.python.org/cpython/rev/a1975621bba2 New changeset 5edac3b55130 by Serhiy Storchaka in branch 'default': Issue #28115: Added tests for CLI of the zipfile module. https://hg.python.org/cpython/rev/5edac3b55130 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 06:36:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 10:36:17 +0000 Subject: [issue28513] Documment zipfile CLI Message-ID: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Command-line interface of the zipfile module is supported long time, but it is not documented. Proposed patch documents it. It is based on the documentation of tarfile CLI. ---------- assignee: docs at python components: Documentation files: zipfile_cli_docs.patch keywords: patch messages: 279250 nosy: alanmcintyre, berker.peksag, docs at python, serhiy.storchaka, twouters priority: normal severity: normal stage: patch review status: open title: Documment zipfile CLI type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45195/zipfile_cli_docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 07:05:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 11:05:52 +0000 Subject: [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477220752.8.0.309003121446.issue28513@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Documment zipfile CLI -> Document zipfile CLI _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:09:21 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Oct 2016 12:09:21 +0000 Subject: [issue28115] Use argparse for the zipfile module In-Reply-To: <1473750423.74.0.95052105427.issue28115@psf.upfronthosting.co.za> Message-ID: <20161023120918.25176.62041.069F6625@psf.io> Roundup Robot added the comment: New changeset fa275e570d52 by Serhiy Storchaka in branch 'default': Issue #28115: Command-line interface of the zipfile module now uses argparse. https://hg.python.org/cpython/rev/fa275e570d52 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:11:31 2016 From: report at bugs.python.org (klappnase) Date: Sun, 23 Oct 2016 12:11:31 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477224691.33.0.329999588254.issue28498@psf.upfronthosting.co.za> klappnase added the comment: As far as I can see, most internal Tkinter methods use _getboolean(), which currently looks like: def _getboolean(self, string): """Internal function.""" if string: return self.tk.getboolean(string) I am not 100% sure about this, but I figure that when this was written it was intentional that if "string" is an empty string, it should return None instead of (back then) 0 or 1. Today this would probably translate into something like: def _getboolean(self, value): if not value in ('', None): return bool(self.tk.getboolean(value)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:12:49 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Oct 2016 12:12:49 +0000 Subject: [issue28511] Use the "U" format for parsing Unicode object arg in PyArg_Parse* In-Reply-To: <1477169634.11.0.781122860843.issue28511@psf.upfronthosting.co.za> Message-ID: <20161023121245.9460.33419.FDA2F75E@psf.io> Roundup Robot added the comment: New changeset d667913a81c6 by Serhiy Storchaka in branch 'default': Issue #28511: Use the "U" format instead of "O!" in PyArg_Parse*. https://hg.python.org/cpython/rev/d667913a81c6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:18:00 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Oct 2016 12:18:00 +0000 Subject: [issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10 In-Reply-To: <1476807191.35.0.710869100873.issue28469@psf.upfronthosting.co.za> Message-ID: <20161023121757.25338.61668.F453BB61@psf.io> Roundup Robot added the comment: New changeset 8e6cc952adc6 by Serhiy Storchaka in branch 'default': Issue #28469: timeit now uses the sequence 1, 2, 5, 10, 20, 50,... instead https://hg.python.org/cpython/rev/8e6cc952adc6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:19:09 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 12:19:09 +0000 Subject: [issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10 In-Reply-To: <1476807191.35.0.710869100873.issue28469@psf.upfronthosting.co.za> Message-ID: <1477225149.86.0.18367725116.issue28469@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:20:14 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 23 Oct 2016 12:20:14 +0000 Subject: [issue28511] Use the "U" format for parsing Unicode object arg in PyArg_Parse* In-Reply-To: <1477169634.11.0.781122860843.issue28511@psf.upfronthosting.co.za> Message-ID: <1477225214.15.0.85340453684.issue28511@psf.upfronthosting.co.za> St?phane Wirtel added the comment: will you close the issue ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:24:16 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 23 Oct 2016 12:24:16 +0000 Subject: [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477225456.35.0.296531874343.issue28513@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Serhiy, your patch seems to be good, you can merge it, I have tested it with sphinx and the documentation is fine. Thanks ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:24:21 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 23 Oct 2016 12:24:21 +0000 Subject: [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477225461.21.0.20958905788.issue28513@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:42:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Oct 2016 12:42:18 +0000 Subject: [issue28439] Remove redundant checks in PyUnicode_EncodeLocale and PyUnicode_DecodeLocaleAndSize In-Reply-To: <1477065055.99.0.780975210956.issue28439@psf.upfronthosting.co.za> Message-ID: <20161023124215.68345.14949.B76116F4@psf.io> Roundup Robot added the comment: New changeset 94d34354bef1 by Serhiy Storchaka in branch 'default': Issue #28439: Remove redundant checks in PyUnicode_EncodeLocale and https://hg.python.org/cpython/rev/94d34354bef1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:42:54 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 12:42:54 +0000 Subject: [issue28439] Remove redundant checks in PyUnicode_EncodeLocale and PyUnicode_DecodeLocaleAndSize In-Reply-To: <1477065055.99.0.780975210956.issue28439@psf.upfronthosting.co.za> Message-ID: <1477226574.68.0.864352055771.issue28439@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:58:57 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Oct 2016 12:58:57 +0000 Subject: [issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong In-Reply-To: <1476968870.46.0.0294634101167.issue28488@psf.upfronthosting.co.za> Message-ID: <20161023125854.38734.74820.194B980D@psf.io> Roundup Robot added the comment: New changeset 847537b7924c by Serhiy Storchaka in branch '2.7': Issue #28488: shutil.make_archive() no longer adds entry "./" to ZIP archive. https://hg.python.org/cpython/rev/847537b7924c New changeset d4fce66ebe01 by Serhiy Storchaka in branch '3.5': Issue #28488: shutil.make_archive() no longer adds entry "./" to ZIP archive. https://hg.python.org/cpython/rev/d4fce66ebe01 New changeset e93149fee04d by Serhiy Storchaka in branch '3.6': Issue #28488: shutil.make_archive() no longer adds entry "./" to ZIP archive. https://hg.python.org/cpython/rev/e93149fee04d New changeset 72da53d3074b by Serhiy Storchaka in branch 'default': Issue #28488: shutil.make_archive() no longer adds entry "./" to ZIP archive. https://hg.python.org/cpython/rev/72da53d3074b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 09:05:39 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 23 Oct 2016 13:05:39 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1477227939.02.0.328765984658.issue26656@psf.upfronthosting.co.za> St?phane Wirtel added the comment: What do you propose for the doc of re.compile ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 10:02:50 2016 From: report at bugs.python.org (Kamran) Date: Sun, 23 Oct 2016 14:02:50 +0000 Subject: [issue28514] Crash Message-ID: New submission from Kamran: Hi, I am writing to inform you about the Python Program. Whenever I go onto the program it works but as soon as I save a piece of work it crashes and freezes. After that it says Python.exe has stopped working. The Windows that I am using is Windows 7 Proffessional. Is there any way you can fix this fault??? Please do this as soon as possibe as I need this piece of work ASAP?!? MANY THANKS *Kamran Muhammad* ---------- messages: 279260 nosy: Kamran priority: normal severity: normal status: open title: Crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 10:07:45 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sun, 23 Oct 2016 14:07:45 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: Message-ID: <1477231665.02.0.558967270305.issue28514@psf.upfronthosting.co.za> Emanuel Barry added the comment: Could provide more information on the issue? Which program exactly is failing? Is it the IDLE editor? If you don't know what you're using, you can provide a screenshot as a last resort (but don't provide one if you can figure out the program that freezes). ---------- nosy: +ebarry stage: -> test needed title: Crash -> Python (IDLE?) freezes on file save on Windows type: -> behavior versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 10:32:42 2016 From: report at bugs.python.org (klappnase) Date: Sun, 23 Oct 2016 14:32:42 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477233162.64.0.237221428586.issue28498@psf.upfronthosting.co.za> klappnase added the comment: Hi Miguel, about _configure() : the code you suggest: def _configure(self, cmd, cnf, kw): """Internal function.""" if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmerge(cnf) if cnf is None: return self._getconfigure(cmd) if isinstance(cnf, str): return self._getconfigure1(cmd + ('-'+cnf,)) self.tk.call(cmd + self._options(cnf)) will break all other methods that use configure() and friends. A possible way to work around this might be: def _configure(self, cmd, cnf, kw): """Internal function.""" if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmerge(cnf) if not self._w in cmd: cmd = _flatten((self._w, cmd)) if cnf is None: return self._getconfigure(cmd) if isinstance(cnf, str): return self._getconfigure1(cmd + ('-'+cnf,)) self.tk.call(cmd + self._options(cnf)) Not sure if this is smart, though, it might require some thorough testing. About getboolean() : it seems like tkapp.getboolean() returns 1 or 0 when it is passed an integer value, at least this is still true here for Python-3.4.2: $ python3 Python 3.4.2 (default, Oct 8 2014, 10:45:20) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from tkinter import * >>> r=Tk() >>> getboolean(1) 1 >>> getboolean('1') True >>> getboolean('yes') True >>> getboolean(True) True >>> Probably the best thing to do would be to fix this in the C code. The next best thing I think is to change tkinter.getboolean(), tkinter.Misc.getboolean() and tkinter.Misc._getboolean(). This however leaves a number of Tkinter methods like e.g. Text.compare() which directly use self.tk.getboolean() unresolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 10:42:10 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 14:42:10 +0000 Subject: [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477233730.81.0.519456693441.issue25152@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: http://buildbot.python.org/all/builders/Docs%203.x/builds/2710/steps/lint/logs/stdio python3 tools/rstlint.py -i tools -i venv [2] library/venv.rst:27: default role used 1 problem with severity 2 found. Makefile:156: recipe for target 'check' failed ---------- nosy: +serhiy.storchaka status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 10:59:02 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 23 Oct 2016 14:59:02 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: Message-ID: <1477234742.21.0.0657848323696.issue28514@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Sorry Kamran, but you don't produce any information, there is a stacktrace, a backtrace ? In this case, we can't reproduce your issue and we can't help you. And, we can't provide a patch because you need it ASAP :/ ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 11:04:44 2016 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 23 Oct 2016 15:04:44 +0000 Subject: [issue28487] missing _math.o target in 2.7 Makefile In-Reply-To: <1476965503.55.0.0398048530012.issue28487@psf.upfronthosting.co.za> Message-ID: <1477235084.35.0.929509793182.issue28487@psf.upfronthosting.co.za> Skip Montanaro added the comment: The problem is solved. It seems there were changes in my 2.7 checkout which hg update wouldn't overwrite. I vaguely remember applying somebody's patch for a bug quite awhile ago. Apparently, I failed to revert that change before moving on. I obviously wasn't paying close attention, but I'm still kind of surprised that hg update wouldn't tell me about files it couldn't update based on local changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 11:34:25 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 23 Oct 2016 15:34:25 +0000 Subject: [issue28511] Use the "U" format for parsing Unicode object arg in PyArg_Parse* In-Reply-To: <1477169634.11.0.781122860843.issue28511@psf.upfronthosting.co.za> Message-ID: <1477236865.93.0.290281569373.issue28511@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 11:42:04 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 23 Oct 2016 15:42:04 +0000 Subject: [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477237323.99.0.17339450285.issue25152@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: > [2] library/venv.rst:27: default role used > 1 problem with severity 2 found. I made a patch to address it. Please review. Thanks :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45196/issue25152.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 12:01:24 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 23 Oct 2016 16:01:24 +0000 Subject: [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477238484.98.0.148612156819.issue25152@psf.upfronthosting.co.za> St?phane Wirtel added the comment: we can merge the patch of Mariatta ---------- nosy: +matrixise stage: resolved -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 12:16:23 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 16:16:23 +0000 Subject: [issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong In-Reply-To: <1476968870.46.0.0294634101167.issue28488@psf.upfronthosting.co.za> Message-ID: <1477239383.84.0.891391503072.issue28488@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 12:29:34 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 16:29:34 +0000 Subject: [issue28515] Py3k warnings in Python 2.7 tests Message-ID: <1477240174.09.0.468374420689.issue28515@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Several warnings are emitted when run Python 2.7 tests with -Wd -3 options. 1. "DeprecationWarning: <> not supported in 3.x; use !=" and "DeprecationWarning: dict.has_key() not supported in 3.x; use the in operator" in Tools/scripts/fixcid.py. 2. "DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x" in Lib/test/pickletester.py. 3. "SyntaxWarning: tuple parameter unpacking has been removed in 3.x" in Lib/lib-tk/turtle.py. Proposed patch fixes these warnings. ---------- components: Tests files: tests_py3k_warns.patch keywords: patch messages: 279268 nosy: benjamin.peterson, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Py3k warnings in Python 2.7 tests versions: Python 2.7 Added file: http://bugs.python.org/file45197/tests_py3k_warns.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 12:40:33 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 23 Oct 2016 16:40:33 +0000 Subject: [issue28515] Py3k warnings in Python 2.7 tests In-Reply-To: <1477240174.09.0.468374420689.issue28515@psf.upfronthosting.co.za> Message-ID: <1477240833.55.0.261913812257.issue28515@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think it should ever be necessary to raise unhashable type from a __hash__ method. Can't you just set it to None? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 13:12:43 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 17:12:43 +0000 Subject: [issue28515] Py3k warnings in Python 2.7 tests In-Reply-To: <1477240174.09.0.468374420689.issue28515@psf.upfronthosting.co.za> Message-ID: <1477242763.68.0.264795267938.issue28515@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, this work just great! And even generate appropriate error message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 13:16:35 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 17:16:35 +0000 Subject: [issue28515] Py3k warnings in Python 2.7 tests In-Reply-To: <1477240174.09.0.468374420689.issue28515@psf.upfronthosting.co.za> Message-ID: <1477242995.61.0.60788660723.issue28515@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45198/tests_py3k_warns_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 14:27:44 2016 From: report at bugs.python.org (GNJ) Date: Sun, 23 Oct 2016 18:27:44 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477247264.01.0.0713412143967.issue28498@psf.upfronthosting.co.za> GNJ added the comment: http://www.gnjmotorsport.com/search-by-car/vauxhall/ ---------- nosy: +GNJ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 14:31:27 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 18:31:27 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477247487.85.0.913246669438.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Yes, sure. It will break code. Maybe it's better to be explicit than implicit (another Python motto). It's also necessary to change configure(). This is the code for my version of _configure() and configure(): def _configure(self, cmd, cnf, kw): """Internal function.""" if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmerge(cnf) if cnf is None: return self._getconfigure(cmd) if isinstance(cnf, str): return self._getconfigure1(cmd + ('-'+cnf,)) self.tk.call(cmd + self._options(cnf)) # These used to be defined in Widget: def configure(self, cnf=None, **kw): """Configure resources of a widget. The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys. """ return self._configure((self._w, 'configure'), cnf, kw) The semantics of getboolean is clear for me: Transform a true and false value in *Tcl* to an integer value: 1 or 0: def getboolean(s): """Convert true and false to integer values 1 and 0.""" return _default_root.tk.getboolean(s) I think that the C implementation of getboolean is right. The true values for Tcl are: 1, true, yes. And the false values are: 0, false, no >>> tk.getboolean("true") True >>> tk.getboolean("false") False >>> tk.getboolean("0") False >>> tk.getboolean("1") True >>> tk.getboolean("yes") True >>> tk.getboolean("no") False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 14:40:50 2016 From: report at bugs.python.org (Sworddragon) Date: Sun, 23 Oct 2016 18:40:50 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1477248050.65.0.435533741684.issue26656@psf.upfronthosting.co.za> Sworddragon added the comment: The proposal is in the startpost. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 15:01:11 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 19:01:11 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477249271.08.0.45862234361.issue28498@psf.upfronthosting.co.za> Miguel added the comment: It's also necessary in the same way to adapt these functions: itemconfigure(), entryconfigure(), image_configure(), tag_configure() and window_configure(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 15:26:35 2016 From: report at bugs.python.org (Michael Felt) Date: Sun, 23 Oct 2016 19:26:35 +0000 Subject: [issue28290] BETA report: Python-3.6 build messages to stderr: AIX and "not GCC" In-Reply-To: <1475001330.34.0.107474417097.issue28290@psf.upfronthosting.co.za> Message-ID: <1477250795.29.0.694800350283.issue28290@psf.upfronthosting.co.za> Michael Felt added the comment: re: the blake issue - I have ignored it as in not run any tests. Assistance would be to tell me how to easily test "blake" working or not working - before I head upstream. re: _POSIX_C_SOURCE and _XOPEN_SOURCE This is the logic in standards.h (AIX 5.3) +142 #if (!defined (_XOPEN_SOURCE)) && (!defined (_POSIX_SOURCE)) && (!defined (_ANSI_C_SOURCE)) +143 #define _XOPEN_SOURCE 600 +144 #define _XOPEN_SOURCE_EXTENDED 1 +145 #define _POSIX_SOURCE +146 #ifndef _POSIX_C_SOURCE +147 #define _POSIX_C_SOURCE 200112L +148 #endif And the same in AIX 6.1 (just different line numbers) +151 #if (!defined (_XOPEN_SOURCE)) && (!defined (_POSIX_SOURCE)) && (!defined (_ANSI_C_SOURCE)) +152 #define _XOPEN_SOURCE 600 +153 #define _XOPEN_SOURCE_EXTENDED 1 +154 #define _POSIX_SOURCE +155 #ifndef _POSIX_C_SOURCE +156 #define _POSIX_C_SOURCE 200112L +157 #endif However, AIX 7.1 has the "new" values: +160 #if (!defined (_XOPEN_SOURCE)) && (!defined (_POSIX_SOURCE)) && (!defined (_ANSI_C_SOURCE)) +161 #define _XOPEN_SOURCE 700 +162 #define _XOPEN_SOURCE_EXTENDED 1 +163 #define _POSIX_SOURCE +164 #ifndef _POSIX_C_SOURCE +165 #define _POSIX_C_SOURCE 200809L +166 #endif So, getting back to issue #17120 - and impact for AIX (and other older *nix platforms - is Python3 saying no support?) As to the question about how the compiler is called ... Using, as much as possible - defaults documented below. I use the invocation "xlc" generally - although I am thinking about changing to the "thread safe" invocation "xlc_r". The differences are defined in /etc/vac.cfg.{53|61|71} (and I expect .72 for the latest compiler). * -qlanglvl=extc99 C compiler with common extensions, UNIX headers xlc: use = DEFLT_C crt = /lib/crt0.o mcrt = /lib/mcrt0.o gcrt = /lib/gcrt0.o libraries = -L/usr/vac/lib,-lxlopt,-lxlipa,-lxl,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled options = -qlanglvl=extc99,-qcpluscmt,-qkeyword=inline,-qalias=ansi * standard c compiler aliased as xlc_r (53 Threads) xlc_r: use = DEFLT_C crt = /lib/crt0.o mcrt = /lib/mcrt0.o gcrt = /lib/gcrt0.o libraries = -L/usr/vac/lib,-lxlopt,-lxlipa,-lxl,-lpthreads,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled hdlibs = -L/usr/vac/lib,-lhmd options = -qlanglvl=extc99,-qcpluscmt,-qkeyword=inline,-qalias=ansi,-qthreaded,-D_THREAD_SAFE,-D__VACPP_MULTI__ As both have -qalias=ansi - that obviously does not define any of: +142 #if (!defined (_XOPEN_SOURCE)) && (!defined (_POSIX_SOURCE)) && (!defined (_ANSI_C_SOURCE)) FYI: the other defaults are here: DEFLT_C: use =DEFLT xlurt_cfg_path=/usr/vac/urt xlurt_cfg_name=urt_client.cfg DEFLT_CPP: use =DEFLT xlurt_cfg_path=/usr/vacpp/urt xlurt_cfg_name=urt_client.cfg DEFLT: cppcomp = /usr/vacpp/exe/xlCentry ccomp = /usr/vac/exe/xlcentry code = /usr/vac/exe/xlCcode cpp = /usr/vac/exe/xlCcpp munch = /usr/vacpp/exe/munch dis = /usr/vac/exe/dis xlC = /usr/vac/bin/xlc list = /usr/vac/exe/xllist xslt = /usr/vac/exe/XALAN transforms = /usr/vac/listings listlibs = /usr/vac/lib cppinc = /usr/vacpp/include ipa = /usr/vac/exe/ipa cppfilt = /usr/vacpp/bin/c++filt bolt = /usr/vac/exe/bolt as = /bin/as ld = /bin/ld artool = /bin/ar options = -D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_AIX50,-D_AIX51,-D_AIX52,-D_AIX53,-D_IBMR2,-D_POWER options32 = -bpT:0x10000000,-bpD:0x20000000 options32_bmaxdata = -bpT:0x10000000,-bpD:0x30000000 options64 = -bpT:0x100000000,-bpD:0x110000000 ldopt = "b:o:e:u:R:H:Y:Z:L:T:A:k:j:" hdlibs = -L/usr/vac/lib,-lhmd xlCcopt = -qlanglvl=extc99,-qcpluscmt,-qkeyword=inline,-qalias=ansi crt_64 = /lib/crt0_64.o mcrt_64 = /lib/mcrt0_64.o gcrt_64 = /lib/gcrt0_64.o smplibraries = -lxlsmp palibraries = -L/usr/vatools/lib,-lpahooks resexp = /usr/vacpp/lib/res.exp genexports = /usr/vac/bin/CreateExportList vac_path = /usr/vac vacpp_path = /usr/vacpp xlcmp_path = /usr/vac:/usr/vacpp xlc_c_stdinc = /usr/vac/include:/usr/include xlc_cpp_stdinc = /usr/vacpp/include:/usr/include xlurt_msg_cat_name=vacumsg.cat __GNUC_MINOR__ = 3 __GNUC_PATCHLEVEL__ = 4 __GNUC__ = 3 dfplibs = -ldecNumber oslevel = 5.3 os_variant = aix os_major = 5 os_minor = 3 inst_info = 5.3, 03 10 2015 16:09 I think the key "extra" is the default defines: options = -D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_AIX50,-D_AIX51,-D_AIX52,-D_AIX53,-D_IBMR2,-D_POWER Lastly, re: pointer sizes - my expectation is that a pointer size is a pointer size (and that size being dependent on ABI 4 bytes, or 8 bytes) - but I will have to find or write again my little "sizeof" program. Will do that later. I think IBM "lint" is just being very strict. However, I have learned with working on a port of dovecat that gcc and xlc have different "rules" aka permissiveness when it comes to "dynamic" structs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 15:34:06 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Oct 2016 19:34:06 +0000 Subject: [issue28115] Use argparse for the zipfile module In-Reply-To: <1473750423.74.0.95052105427.issue28115@psf.upfronthosting.co.za> Message-ID: <20161023193403.11928.50652.9A90C84B@psf.io> Roundup Robot added the comment: New changeset 7f01d9d471e5 by Serhiy Storchaka in branch '2.7': Issue #28115: ZIP creation test requires zlib. https://hg.python.org/cpython/rev/7f01d9d471e5 New changeset 7701e9cb8712 by Serhiy Storchaka in branch '3.5': Issue #28115: ZIP creation test requires zlib. https://hg.python.org/cpython/rev/7701e9cb8712 New changeset 5b779441d03e by Serhiy Storchaka in branch '3.6': Issue #28115: ZIP creation test requires zlib. https://hg.python.org/cpython/rev/5b779441d03e New changeset 3e7da46aead3 by Serhiy Storchaka in branch 'default': Issue #28115: ZIP creation test requires zlib. https://hg.python.org/cpython/rev/3e7da46aead3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 15:43:41 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 19:43:41 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477251821.19.0.337796355074.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Your proposal also makes an extra computation: an item (not) belongs to a list if not self._w in cmd: cmd = _flatten((self._w, cmd)) Also it's more efficient to use this than the function _flaten() in that situation: if not self._w in cmd: cmd = (self._w,) + cmd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 15:47:36 2016 From: report at bugs.python.org (Stefan Krah) Date: Sun, 23 Oct 2016 19:47:36 +0000 Subject: [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1477252056.32.0.422623056768.issue27779@psf.upfronthosting.co.za> Stefan Krah added the comment: Lisa, thanks for the patch. I've left some comments -- some docstrings in the Python version are outdated, some not quite correct, some are not very clear (to me). I don't know how to proceed. Initially I thought it would be as easy as just taking over all Python docstrings verbatim, but looks like there's more work involved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 15:54:18 2016 From: report at bugs.python.org (Michael Felt) Date: Sun, 23 Oct 2016 19:54:18 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1476487405.79.0.520118321388.issue18235@psf.upfronthosting.co.za> Message-ID: <7a456568-bc6c-50d0-b8cc-08cf1c44277f@gmail.com> Michael Felt added the comment: The value that works for LDSHARED is the value that LDCXXSHARED has. BLDSHARED is also broken (currently). 'BLDSHARED': './Modules/ld_so_aix xlc_r -bI:./Modules/python.exp -L/opt/lib', 'LDCXXSHARED': '/opt/lib/python2.7/config/ld_so_aix xlc_r -bI:/opt/lib/python2.7/config/python.exp', except neither BLDSHARED nor LDCXXSHARED have taken the extra LDFLAG that was exported before configure was called (in this case -L/opt/lib) In short: LDSHARED needs to be a full path, not relative and should include -L flags used during the build, if any. LDCXXSHARED should also add LDFLAGS -L entries (and perhaps, where relevant -R flags). BLDSHARED does not work when "builddir" is . and source_dir is ../src/python-X.W.Y because Modules/ld_so_aix is not in ".", but is at ../src/python-X.X.Y/Modules/ld_so_aix On 15-Oct-16 00:23, Martin Panter wrote: > Martin Panter added the comment: > > This is my understanding: > > We are talking about the code at that switches the values of LDSHARED and/or BLDSHARED. > > Yes, Michael H. was suggesting to both move and change (revert) back to overwriting LDSHARED with the value of BLDSHARED. Since he is moving the code into _init_posix(), which I think only gets called at run time, the state of _PYTHON_BUILD won?t affect the value of LDSHARED saved in the installed config file. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- nosy: +aixtools at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 15:54:46 2016 From: report at bugs.python.org (klappnase) Date: Sun, 23 Oct 2016 19:54:46 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477252486.36.0.352043266825.issue28498@psf.upfronthosting.co.za> klappnase added the comment: Your changed _configure() will also break Canvas/Listbox.itemconfigure(), Menu.entryconfigure() and a number of other methods, Tix is also affected. It will also break third party extensions that use _configure(), like pybwidget. As another python motto says "Special cases aren't special enough to break the rules." :) I believe that breaking existing code is not justified by the "special case" of the tk_busy_configure() syntax, resp. the desire to avoid 10 extra lines of code. The change to _configure() I suggested otoh leaves all the existing configure()-like methods intact, and it seems at least very unlikely that some third party module uses a configure()-like method that adds the window path name to the cmd-tuple (which indeed would break my _configure() example. However, following the "explicit is better than implicit" motto, I believe the best idea, if _configure() should be changed at all, is to add a new option to let the programmer decide if the window path should be added to the cmd tuple, which defaults to a value that keeps the old behavior intact, as in this example: def _configure(self, cmd, cnf, kw, usewinpath=True): """Internal function.""" if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmerge(cnf) if usewinpath: cmd = _flatten((self._w, cmd)) else: cmd = _flatten(cmd) if cnf is None: return self._getconfigure(cmd) if isinstance(cnf, str): return self._getconfigure1(cmd + ('-'+cnf,)) self.tk.call(cmd + self._options(cnf)) Then busy_configure might look like: def busy_configure(self, cnf=None, **kw): return self._configure(('tk', 'busy', 'configure', self._w), cnf, kw, usewinpath=False) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 15:56:13 2016 From: report at bugs.python.org (Michael Felt) Date: Sun, 23 Oct 2016 19:56:13 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <7a456568-bc6c-50d0-b8cc-08cf1c44277f@gmail.com> Message-ID: Michael Felt added the comment: correction: On 23-Oct-16 20:54, Michael Felt wrote: > except neither BLDSHARED nor LDCXXSHARED have taken the extra LDFLAG except neither LDSHARED nor LDCXXSHARED have taken the extra LDFLAG like BLDSHARED has. > that was exported before configure was called (in this case -L/opt/lib) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 16:01:31 2016 From: report at bugs.python.org (klappnase) Date: Sun, 23 Oct 2016 20:01:31 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477252891.46.0.556088007228.issue28498@psf.upfronthosting.co.za> klappnase added the comment: "Also it's more efficient to use this than the function _flaten() in that situation: if not self._w in cmd: cmd = (self._w,) + cmd " The construct with _flatten() was not my invention, it's probably something to discuss with Guido ;) The advantage of _flatten() may be, that it will also handle nested tuples properly, though I don't know if there is a real-life situation whee nested tuples might show up there. Anyway, thinking about optimisations on that level seems somewhat pointless to me, no one will probably iterate over configure() calls, and if yes, the bottleneck is clearly the self.tk.call() part. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 16:07:12 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 20:07:12 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477253232.26.0.357385041914.issue28498@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- Removed message: http://bugs.python.org/msg279271 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 16:11:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 20:11:17 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477253477.49.0.904922282022.issue28498@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Use "hg diff" command for creating a patch. ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file45199/tk_busy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 16:20:48 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 20:20:48 +0000 Subject: [issue5830] heapq item comparison problematic with sched's events In-Reply-To: <1240580106.04.0.721938894312.issue5830@psf.upfronthosting.co.za> Message-ID: <1477254048.71.0.469179255018.issue5830@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 16:25:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 20:25:07 +0000 Subject: [issue28457] Make public the current private known hash functions in the C-API In-Reply-To: <1476661343.12.0.903436836661.issue28457@psf.upfronthosting.co.za> Message-ID: <1477254307.74.0.984048578101.issue28457@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Semantic of _PyDict_GetItem_KnownHash is not clear. Should it correspond PyDict_GetItem or PyDict_GetItemWithError? See issue28123. ---------- dependencies: +_PyDict_GetItem_KnownHash ignores DKIX_ERROR return nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 16:28:11 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 20:28:11 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477254491.57.0.889702213183.issue28498@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45200/tk_busy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 16:28:22 2016 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 23 Oct 2016 20:28:22 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1477254502.69.0.203745167297.issue26656@psf.upfronthosting.co.za> Matthew Barnett added the comment: @Sworddragon: Your post says that it should be more generic or complete the list, but it doesn't make a suggestion as to what it should _actually_ say. Example: "Compile a regular expression pattern into a regular expression object, which can be used for matching and replacing using the methods described below." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 17:10:37 2016 From: report at bugs.python.org (SilentGhost) Date: Sun, 23 Oct 2016 21:10:37 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: Message-ID: <1477257037.05.0.827980106937.issue28514@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 17:54:39 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 21:54:39 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477259679.05.0.68906356.issue28498@psf.upfronthosting.co.za> Miguel added the comment: This is my point of view: These functions are easy to change: itemconfigure(), entryconfigure(), image_configure(), tag_configure() and window_configure() It's only to add self._w in the proper place. Only one line per method Other third party extensions should not rely on _configure() because it's an internal method (it starts with underscore). We have rights to change the semantics of this internal method in any moment without notification. ---------- components: +Installation -Library (Lib), Tkinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 18:03:42 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 22:03:42 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477260222.34.0.849970173508.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Hi Serhiy, I totally disagree of this change on your patch: + def tk_busy_status(self): + '''Returns the busy status of this window. + If the window presently can not receive user interactions, + True is returned, otherwise False.''' + return((self.tk.getboolean(self.tk.call( + 'tk', 'busy', 'status', self._w)) and True) or False) tk_busy_status should return the returned value of self.tk.getboolean directly like other methods in Tkinter using self.tk.getboolean. There is no test that shows that self.tk.getboolean is buggy. This is the right implementation: def tk_busy_status(self): '''Returns the busy status of this window. If the window presently can not receive user interactions, True is returned, otherwise False.''' return self.tk.getboolean(self.tk.call('tk', 'busy', 'status', self._w)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 18:42:53 2016 From: report at bugs.python.org (Mike Kaplinskiy) Date: Sun, 23 Oct 2016 22:42:53 +0000 Subject: [issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True) In-Reply-To: <1455835021.39.0.133039555561.issue26388@psf.upfronthosting.co.za> Message-ID: <1477262573.83.0.622019005628.issue26388@psf.upfronthosting.co.za> Mike Kaplinskiy added the comment: Hey Nick, Sorry for the long delay. Unfortunately Python isn't my main work language anymore so working on this has proved to be quite a context switch. I'm going to try to finish this up now. The attached patch implements a new pattern for wrapping runpy - one that I hope is a bit more general than just setting argv. In particular, using the new load_module/load_path doesn't automatically change argv at all when calling run. The callers can do pretty much whatever they want before calling run(). >From a docs perspective this is quite a bit easies to understand. You call runpy.load_* to find the module, change whatever you want: globals/module dict values/names/etc, and call .run(). We would even expose a convenient `with runpy.ModifiedArgv(argv):` to help with the argv swapping. "Simple" use-cases can continue to use runpy.run_* without needing to get into the save/restore we do here. Let me know what you think of this approach and I can flesh out the docs around it. Otherwise, I'm more than happy to implement the callback approach you suggested. Thanks, Mike. ---------- Added file: http://bugs.python.org/file45201/patch-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 19:07:11 2016 From: report at bugs.python.org (klappnase) Date: Sun, 23 Oct 2016 23:07:11 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477264031.44.0.290551422815.issue28498@psf.upfronthosting.co.za> klappnase added the comment: "This is my point of view: These functions are easy to change: itemconfigure(), entryconfigure(), image_configure(), tag_configure() and window_configure() It's only to add self._w in the proper place. Only one line per method" At least Tix would have to be changed, too. "Other third party extensions should not rely on _configure() because it's an internal method (it starts with underscore). We have rights to change the semantics of this internal method in any moment without notification." But why insist on your rights, if there is no actual need to do this? The function I posted in my previous message for example serves the same purpose without having to change any other function call and without breaking any third-party code that possibly uses _configure(). You sure have the right to do this, but I feel it is at least somewhat unfriendly if it is done without necessity. Besides, one thing I missed in my last post: "Also it's more efficient to use this than the function _flaten() in that situation: if not self._w in cmd: cmd = (self._w,) + cmd " If you want to discard the use of _flatten() you would also have to change Misc.configure() . ---------- components: +Library (Lib), Tkinter -Installation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 19:20:24 2016 From: report at bugs.python.org (klappnase) Date: Sun, 23 Oct 2016 23:20:24 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477264824.93.0.1342532451.issue28498@psf.upfronthosting.co.za> klappnase added the comment: And another thing: "There is no test that shows that self.tk.getboolean is buggy." Well... $ python3 Python 3.4.2 (default, Oct 8 2014, 10:45:20) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter >>> root=tkinter.Tk() >>> root.tk.getboolean(root.tk_strictMotif()) 0 >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 19:20:52 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 23:20:52 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477264852.38.0.162905889378.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Yes, its true. The semantics of configure() is affected then if I ommit _flaten. I like elegancy and to dont repeat myself for this reason I made that suggestion. But the drawback is that maybe other external code that shouldn't rely on internal methods like _configure, would be affected. I think that you agree with me about the fact there is no bug with getboolean and it has the expected behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 19:28:37 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 23:28:37 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477265317.84.0.860807899052.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Hi, I think that it's behaving well. Where is the bug here? root.tk.getboolean(root.tk_strictMotif()) getboolean() converts Tcl strings to Boolean Python values according to the definition of True and False in Tcl. getboolean is only used for converting strings to boolean Python values. It's undefined the behaviour for other things different than strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 19:29:33 2016 From: report at bugs.python.org (Miguel) Date: Sun, 23 Oct 2016 23:29:33 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477265373.83.0.179082133395.issue28498@psf.upfronthosting.co.za> Miguel added the comment: It's not defined the semantics for things different than strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 20:20:40 2016 From: report at bugs.python.org (klappnase) Date: Mon, 24 Oct 2016 00:20:40 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477268440.91.0.625727132848.issue28498@psf.upfronthosting.co.za> klappnase added the comment: The bug is that tk_strictMotif (which uses self.tk.getboolean() itself) returns 0 instead of False. I used the "nested" command to point out, that self.tk.getboolean() is broken when used with wantobjects=True, because it does *not* return proper boolean values , i.e. True or False. It is probably the reduction to handling strings only that you mentioned that causes this wrong behavior, because with wantobjects=True self.tk.call() will convert the "0" tk_strictMotif returns into 0 which is not handled properly. With wantobjects=False, it will retunr True/False as expected. Its behavior is not consistent, *that* is the bug. But to be honest, personally I don't give a dime if these calls return True/False or 1/0, I just wanted to make clear why I explicitely converted the output of self.tk.getboolean() in my tk_busy_status function. I believed that proper boolean values (True/False) were the desired thing. I personally agree with you about the busy_status function, my construct is not necessary, if someone does not like it to return 0/1 , tkapp.getboolean() should be fixed instead. And again I admit that I don't remember why I used that construct instead of just passing the result to bool(). I am quite sure I had a reason for this when I started to use this construct first some years ago, but back then tkapp.getboolean() behaved differently (and worse), some of which was apparently fixed in the meantime. And one more time about _configure(): "I like elegancy..." So do I, but can't expanding the functionality of a method by adding a new option be considered a more elegant solution than entirely changing its behavior with the effect of having to change a number of other things, too? (though I admit that the name for this option I picked first should seriously be reconsidered if it's supposed to be called "elegant", I confess that I am notoriously dumb in inventing names :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 21:37:31 2016 From: report at bugs.python.org (Miguel) Date: Mon, 24 Oct 2016 01:37:31 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477273051.14.0.954659007078.issue28498@psf.upfronthosting.co.za> Miguel added the comment: In the C source code that I am reading of tkinter: _tkinter.c. It seems that these parameters are not used: - wantobjects - useTk - syn - use It seems that it's dead code. I hope that somebody can tell me whether I am right. I suppose that now Python returns always Python objects instead of strings. For this reason, wantobjects is not any more necessary. This is the C code of Tkinter_Create that I am reading: static PyObject * Tkinter_Create (self, args) PyObject *self; PyObject *args; { char *screenName = NULL; char *baseName = NULL; char *className = NULL; int interactive = 0; baseName = strrchr (Py_GetProgramName (), '/'); if (baseName != NULL) baseName++; else baseName = Py_GetProgramName (); className = "Tk"; if (!PyArg_ParseTuple (args, "|zssi", &screenName, &baseName, &className, &interactive)) return NULL; return (PyObject *) Tkapp_New (screenName, baseName, className, interactive); } And this is the call to Tkinter_Create in Tkinter.py: self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 22:36:51 2016 From: report at bugs.python.org (Walker Hale IV) Date: Mon, 24 Oct 2016 02:36:51 +0000 Subject: [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior Message-ID: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> New submission from Walker Hale IV: contextlib.ExitStack implies but does not explicitly state that its __enter__ method trivially returns self. This means that if a user invokes pop_all and then uses the resulting ExitStack instance in a with statement, the user will be relying on undocumented behavior. Avoiding undocumented behavior forces the user to instead use a tedious try/finally construct, partially defeating the elegance of context managers. I propose that: 1. The ExitStack.__enter__ method be briefly mentioned as doing nothing besides returning self. 2. The example in pop_all documentation be expanded to show a following with statement that uses the new ExitStack instance. The discussion in section 29.6.3.2 is not sufficient to make this trivial point clear. ---------- messages: 279296 nosy: Walker Hale IV priority: normal severity: normal status: open title: contextlib.ExitStack.__enter__ has trivial but undocumented behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 01:16:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 05:16:39 +0000 Subject: [issue28517] Dead code in wordcode Message-ID: <1477286199.46.0.366284805485.issue28517@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: >>> def func(test): ... if test == 1: ... return 1 ... elif test == 2: ... return 2 ... return 3 ... >>> import dis >>> dis.dis(func) Python 3.5: 2 0 LOAD_FAST 0 (test) 3 LOAD_CONST 1 (1) 6 COMPARE_OP 2 (==) 9 POP_JUMP_IF_FALSE 16 3 12 LOAD_CONST 1 (1) 15 RETURN_VALUE 4 >> 16 LOAD_FAST 0 (test) 19 LOAD_CONST 2 (2) 22 COMPARE_OP 2 (==) 25 POP_JUMP_IF_FALSE 32 5 28 LOAD_CONST 2 (2) 31 RETURN_VALUE 6 >> 32 LOAD_CONST 3 (3) 35 RETURN_VALUE Python 3.6: 2 0 LOAD_FAST 0 (test) 2 LOAD_CONST 1 (1) 4 COMPARE_OP 2 (==) 6 POP_JUMP_IF_FALSE 14 3 8 LOAD_CONST 1 (1) 10 RETURN_VALUE 12 JUMP_FORWARD 12 (to 26) 4 >> 14 LOAD_FAST 0 (test) 16 LOAD_CONST 2 (2) 18 COMPARE_OP 2 (==) 20 POP_JUMP_IF_FALSE 26 5 22 LOAD_CONST 2 (2) 24 RETURN_VALUE 6 >> 26 LOAD_CONST 3 (3) 28 RETURN_VALUE Note JUMP_FORWARD after RETURN_VALUE in 3.6 listing. ---------- components: Interpreter Core messages: 279297 nosy: Demur Rumed, serhiy.storchaka priority: normal severity: normal status: open title: Dead code in wordcode type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 03:37:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 07:37:27 +0000 Subject: [issue28517] Dead code in wordcode In-Reply-To: <1477286199.46.0.366284805485.issue28517@psf.upfronthosting.co.za> Message-ID: <1477294647.03.0.581687511586.issue28517@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Proposed patch fixes removing unreachable code after RETURN_VALUE in peephole optimizer. ---------- assignee: -> serhiy.storchaka keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file45202/peephole_remove_unreachable_code.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 05:06:09 2016 From: report at bugs.python.org (Christoph Reiter) Date: Mon, 24 Oct 2016 09:06:09 +0000 Subject: [issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0 In-Reply-To: <1475449173.08.0.90782279022.issue28341@psf.upfronthosting.co.za> Message-ID: <1477299969.92.0.595610689148.issue28341@psf.upfronthosting.co.za> Christoph Reiter added the comment: I get the same error when building python on osx 10.12 + xcode 8 for 10.9+ and then running it on 10.11. Any idea what could be the problem? ---------- nosy: +lazka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 05:21:39 2016 From: report at bugs.python.org (klappnase) Date: Mon, 24 Oct 2016 09:21:39 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477300899.98.0.790604832096.issue28498@psf.upfronthosting.co.za> klappnase added the comment: At least with python 3.4 here wantobjects still is valid, and personally I really hope that it remains this way, because I use to set wantobjects=False in my own code to avoid having to deal with errors because of some method or other unexpectedly returning TclObjects instead of Python objects (which has been happening here occasionally ever since they were invented). I am practically illiterate with C, so I cannot tell what this code does, but at least I believe I see clearly here that it appears to be still used: static TkappObject * Tkapp_New(const char *screenName, const char *className, int interactive, int wantobjects, int wantTk, int sync, const char *use) { TkappObject *v; char *argv0; v = PyObject_New(TkappObject, (PyTypeObject *) Tkapp_Type); if (v == NULL) return NULL; Py_INCREF(Tkapp_Type); v->interp = Tcl_CreateInterp(); v->wantobjects = wantobjects; v->threaded = Tcl_GetVar2Ex(v->interp, "tcl_platform", "threaded", TCL_GLOBAL_ONLY) != NULL; v->thread_id = Tcl_GetCurrentThread(); v->dispatching = 0; (...) static PyObject* Tkapp_CallResult(TkappObject *self) { PyObject *res = NULL; Tcl_Obj *value = Tcl_GetObjResult(self->interp); if(self->wantobjects) { /* Not sure whether the IncrRef is necessary, but something may overwrite the interpreter result while we are converting it. */ Tcl_IncrRefCount(value); res = FromObj((PyObject*)self, value); Tcl_DecrRefCount(value); } else { res = unicodeFromTclObj(value); } return res; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 07:05:18 2016 From: report at bugs.python.org (Florian Schulze) Date: Mon, 24 Oct 2016 11:05:18 +0000 Subject: [issue28518] execute("begin immediate") throwing OperationalError Message-ID: <1477307118.31.0.70785963389.issue28518@psf.upfronthosting.co.za> New submission from Florian Schulze: Using: conn = sqlite3.connect(':memory:', isolation_level='IMMEDIATE') conn.execute('begin immediate') Throws: sqlite3.OperationalError: cannot start a transaction within a transaction This didn't happen in previous versions and the conn.in_transaction attribute is False right before the call to execute, so this situation doesn't seem to be detectable upfront for backward compatibility. ---------- components: Library (Lib) messages: 279301 nosy: fschulze priority: normal severity: normal status: open title: execute("begin immediate") throwing OperationalError type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 07:22:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 11:22:38 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477308158.55.0.397752889679.issue28498@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: First, thank you Miguel and klappnase for your patches. But they should be provided in different way, as described in Python Developer?s Guide [1]. > I totally disagree of this change on your patch: This is not my patch. This is regenerated klappnase's. I expected this will allow to use the Rietveld Code Review Tool for reviewing, but unfortunately Rietveld don't accept these patches [2]. Below I added comments to the patch. I agree, that all these complications are not needed. Just use getboolean(). It always returns bool in recent Python. And don't bother about _configure(). Just duplicate the code. It can be refactored later, in separate issue. Since this is a new feature, it can added only in developing version (future 3.7). Forgot about 2.7 and 3.5. If make the patch fast, there is a chance to get it in 3.6 (if release manager accept this). But tests are needed. > At least with python 3.4 here wantobjects still is valid, and personally I really hope that it remains this way, because I use to set wantobjects=False in my own code to avoid having to deal with errors because of some method or other unexpectedly returning TclObjects instead of Python objects (which has been happening here occasionally ever since they were invented). There was an attempt to deprecate wantobjects=False (issue3015), but it is useful for testing and I think third-party program still can use it. If you encounter an error because some standard method return Tcl_Object, please file a bug. This is considered as a bug, and several similar bugs was fixed in last years. Here are comments to the last klappnase's patch. Please add a serial number to your next patch for easier referring patches. + def tk_busy(self, **kw): Shouldn't it be just an alias to tk_busy_hold? + '''Queries the busy command configuration options for + this window. PEP 257: "Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description." + any of the values accepted by busy_hold().''' PEP 257: "Unless the entire docstring fits on a line, place the closing quotes on a line by themselves." + return(self.tk.call('tk', 'busy', 'cget', self._w, '-'+option)) Don't use parentheses around the return value. + the busy cursor can be specified for it by : Remove a space before colon, add an empty line after it. + def tk_busy_hold(self, **kw): Since the only supported option is cursor, just declare it. def tk_busy_hold(self, cursor=None): + -cursor cursorName "-cursor cursorName" is not Python syntax for passing arguments. + return((self.tk.getboolean(self.tk.call( + 'tk', 'busy', 'status', self._w)) and True) or False) Just return the result of self.tk.getboolean(). [1] https://docs.python.org/devguide/ [2] http://bugs.python.org/review/28498/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 07:25:44 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 11:25:44 +0000 Subject: [issue28518] execute("begin immediate") throwing OperationalError In-Reply-To: <1477307118.31.0.70785963389.issue28518@psf.upfronthosting.co.za> Message-ID: <1477308344.12.0.260229873872.issue28518@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +berker.peksag, ghaering, serhiy.storchaka, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 07:44:51 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Mon, 24 Oct 2016 11:44:51 +0000 Subject: [issue28518] execute("begin immediate") throwing OperationalError In-Reply-To: <1477307118.31.0.70785963389.issue28518@psf.upfronthosting.co.za> Message-ID: <1477309491.8.0.702067876326.issue28518@psf.upfronthosting.co.za> Changes by ???? ????????? : ---------- nosy: +mmarkk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 08:02:57 2016 From: report at bugs.python.org (Georgey) Date: Mon, 24 Oct 2016 12:02:57 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1477310577.05.0.897487293852.issue28447@psf.upfronthosting.co.za> Georgey added the comment: Not only does the getpeername() method not work, but the socket instance itself has been destroyed as garbage by python. - I understand the former, but cannot accept the latter. ---------- resolution: not a bug -> wont fix status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 08:03:04 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 24 Oct 2016 12:03:04 +0000 Subject: [issue28519] Update pydoc tool to support generic types Message-ID: <1477310584.34.0.261643270956.issue28519@psf.upfronthosting.co.za> New submission from Ivan Levkivskyi: It was proposed in the discussion of #27989 to update pydoc rendering of documentation of classes supporting generic types. Currently there are two ideas: 1. Keep the class header intact (i.e. listing actual runtime __bases__) and adding a separate section describing generic info using __orig_bases__ and __parameters__. For example: """ class MyClass(typing.List, typing.Mapping): ... (usual info) ... This is a generic class consistent with List[~T], Mapping[str, +VT_co] Type parameters: invariant T, covariant VT_co """ 2. Do not add a separate section, but modify the header to display __orig_bases__. For example: """ class MyClass(List[~T], Mapping[str, +VT_co]): ... (usual info) ... """ Guido prefers the second option. I am a bit afraid that this will cause people to use issubclass() with parameterized generics, but now issubclass(cls, List[T]) is a TypeError, only issubclass(cls, List) is allowed. So that I am more inclined towards first option. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 279304 nosy: docs at python, gvanrossum, levkivskyi priority: normal severity: normal status: open title: Update pydoc tool to support generic types type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 08:52:44 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 24 Oct 2016 12:52:44 +0000 Subject: [issue28518] execute("begin immediate") throwing OperationalError In-Reply-To: <1477307118.31.0.70785963389.issue28518@psf.upfronthosting.co.za> Message-ID: <1477313564.14.0.0471375254135.issue28518@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- nosy: +jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 09:27:00 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 24 Oct 2016 13:27:00 +0000 Subject: [issue28518] execute("begin immediate") throwing OperationalError In-Reply-To: <1477307118.31.0.70785963389.issue28518@psf.upfronthosting.co.za> Message-ID: <1477315620.01.0.231822763342.issue28518@psf.upfronthosting.co.za> Xiang Zhang added the comment: Looks like commit 284676cf2ac8 in #10740 introduces this. Haven't read through the thread yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 09:58:14 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Oct 2016 13:58:14 +0000 Subject: [issue28330] Use simpler and faster sched.Event definition In-Reply-To: <1475328402.1.0.435562335061.issue28330@psf.upfronthosting.co.za> Message-ID: <1477317494.31.0.0689530457548.issue28330@psf.upfronthosting.co.za> Raymond Hettinger added the comment: A Serhiy noted, this patch will break the class when two events are scheduled at the same time and priority. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 10:01:18 2016 From: report at bugs.python.org (=?utf-8?b?RnJhbsOnb2lz?=) Date: Mon, 24 Oct 2016 14:01:18 +0000 Subject: [issue23749] asyncio missing wrap_socket (starttls) In-Reply-To: <1427119199.61.0.485462184824.issue23749@psf.upfronthosting.co.za> Message-ID: <1477317678.52.0.421123601117.issue23749@psf.upfronthosting.co.za> Changes by Fran?ois : ---------- nosy: +Frzk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 10:13:45 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 14:13:45 +0000 Subject: [issue27939] Tkinter mainloop raises when setting the value of ttk.LabeledScale In-Reply-To: <1472811634.57.0.400970918265.issue27939@psf.upfronthosting.co.za> Message-ID: <1477318425.71.0.276317261348.issue27939@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is caused by replacing int() by self._tk.getint() in IntVar.get() (issue23880). But the failure can be reproduced even in 3.4 if set tk.wantobjects = 0 before creating root widget. One way is making getint() accepting floats. This fizes original example, but doesn't solve the issue for tk.wantobjects = 0. Other way is making IntVar.get() falling back to integer part of getdouble(). This fixes the example in both modes. Proposed patch goes this way. ---------- assignee: -> serhiy.storchaka keywords: +patch stage: needs patch -> patch review versions: +Python 3.7 Added file: http://bugs.python.org/file45203/tkinter_intvar_float_value.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 10:32:42 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Oct 2016 14:32:42 +0000 Subject: [issue5830] heapq item comparison problematic with sched's events In-Reply-To: <1240580106.04.0.721938894312.issue5830@psf.upfronthosting.co.za> Message-ID: <20161024143229.25529.38905.6349436B@psf.io> Roundup Robot added the comment: New changeset ee476248a74a by Raymond Hettinger in branch '3.6': Issue #5830: Remove old comment. Add empty slots. https://hg.python.org/cpython/rev/ee476248a74a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 10:32:58 2016 From: report at bugs.python.org (Jack Liu) Date: Mon, 24 Oct 2016 14:32:58 +0000 Subject: [issue28520] Failed to install Python 3.3.5 on OSX 10.11.6 Message-ID: <1477319578.41.0.653712093309.issue28520@psf.upfronthosting.co.za> New submission from Jack Liu: For some reason. I need to install Python 3.3.5 (64-bit) on OSX 10.11.6. I got installer from http://www.python.org/ftp/python/3.3.5/python-3.3.5-macosx10.6.dmg, failed to install Python 3.3.5 on OSX 10.11.6. See error in attached screenshot. I know it's able to install Python 3.3.5 (64-bit) through pyenv. But I want to know why it's failed to install Python 3.3.5 on OSX 10.11.6 through python official installer. How can I make the python official installer work. ---------- components: Installation files: large.png messages: 279309 nosy: Jack Liu priority: normal severity: normal status: open title: Failed to install Python 3.3.5 on OSX 10.11.6 versions: Python 3.3 Added file: http://bugs.python.org/file45204/large.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 10:46:25 2016 From: report at bugs.python.org (Jack Liu) Date: Mon, 24 Oct 2016 14:46:25 +0000 Subject: [issue20766] reference leaks in pdb In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za> Message-ID: <1477320385.25.0.0601126270137.issue20766@psf.upfronthosting.co.za> Jack Liu added the comment: Good to know the fix will be included Python official builds. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 11:02:56 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 24 Oct 2016 15:02:56 +0000 Subject: [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477321376.72.0.42504920619.issue28516@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. I guess we just assume it is obvious, given that the with statement examples name the variable 'stack', and the pop_all docs mention that no callbacks are called until it is closed "or at the end of a with statement". So, technically, using the result of a pop_all in a with statement is documented. I could be made clearer though if someone wants to propose a doc patch. I'm not sure it is worth expanding the example, though. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 11:06:14 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 24 Oct 2016 15:06:14 +0000 Subject: [issue23749] asyncio missing wrap_socket (starttls) In-Reply-To: <1427119199.61.0.485462184824.issue23749@psf.upfronthosting.co.za> Message-ID: <1477321574.67.0.634380609405.issue23749@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 11:18:23 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 24 Oct 2016 15:18:23 +0000 Subject: [issue28447] socket.getpeername() failure on broken TCP/IP connection In-Reply-To: <1476493997.73.0.778740758656.issue28447@psf.upfronthosting.co.za> Message-ID: <1477322303.99.0.25931599409.issue28447@psf.upfronthosting.co.za> R. David Murray added the comment: Your example does not show a destroyed socket object, so to what are you referring? Python won't recycle an object as garbage until there are no remaining references to it. If you think that there is information the socket object "knows" that it is throwing away when the socket is closed, you might be correct (I haven't checked the code), but that would be *correct* behavior at this API level and design: since the socket is no longer connected, that information is no longer valid. Please leave the issue closed until you convince us there's a bug :) If you want to propose some sort of enhancement, the correct forum for this level of enhancement would be the python-ideas mailing list. ---------- resolution: wont fix -> not a bug status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 11:32:25 2016 From: report at bugs.python.org (John Ehresman) Date: Mon, 24 Oct 2016 15:32:25 +0000 Subject: [issue28521] _PyEval_RequestCodeExtraIndex should return a globally valid index, not a ThreadState specific one Message-ID: <1477323145.97.0.665032370713.issue28521@psf.upfronthosting.co.za> New submission from John Ehresman: The index returned by _PyEval_RequestCodeExtraIndex is currently specific to the current thread state. This means that there will be problems if the index is used on another thread. It would be possible to set things up in my code so that _PyEval_RequestCodeExtraIndex was called once per thread state but there would be a possibility of getting different indices on the different threads and data set on one thread passed to the wrong free function registered on a different thread. ---------- components: Interpreter Core messages: 279314 nosy: jpe priority: normal severity: normal status: open title: _PyEval_RequestCodeExtraIndex should return a globally valid index, not a ThreadState specific one type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 12:21:58 2016 From: report at bugs.python.org (Kamran) Date: Mon, 24 Oct 2016 16:21:58 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: Message-ID: Kamran added the comment: it is idle *Kamran Muhammad* On Mon, Oct 24, 2016 at 4:24 PM, Kamran wrote: > > Kamran added the comment: > > Is *THIS* any help?[image: Inline image 1] > > *Kamran Muhammad* > > On Sun, Oct 23, 2016 at 10:10 PM, SilentGhost > wrote: > > > > > Changes by SilentGhost : > > > > > > ---------- > > status: open -> pending > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > ---------- > status: pending -> open > Added file: http://bugs.python.org/file45205/image.png > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 12:26:28 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 24 Oct 2016 16:26:28 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: Message-ID: <1477326388.05.0.635619794121.issue28514@psf.upfronthosting.co.za> St?phane Wirtel added the comment: We can't help you, there is no backtrace, no stacktrace, no dump, in fact, nothing. can you provide more details because without that, we can not reproduce your issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 12:28:28 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 24 Oct 2016 16:28:28 +0000 Subject: [issue28465] python 3.5 magic number In-Reply-To: <1476750546.36.0.931772637731.issue28465@psf.upfronthosting.co.za> Message-ID: <1477326508.73.0.141886509644.issue28465@psf.upfronthosting.co.za> Brett Cannon added the comment: Closing this as a third-party Debian issue (if it even matters as bytecode is an optimization local to a machine and so different magic numbers shouldn't matter). ---------- nosy: +brett.cannon resolution: -> third party status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 12:31:50 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 24 Oct 2016 16:31:50 +0000 Subject: [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477326710.33.0.357307914668.issue25152@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks, St?phane :) Perhaps this can be updated into patch review stage? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 12:47:44 2016 From: report at bugs.python.org (Pavel Savchenko) Date: Mon, 24 Oct 2016 16:47:44 +0000 Subject: [issue28054] Diff for visually comparing actual with expected in mock.assert_called_with. In-Reply-To: <1473461073.51.0.19108692382.issue28054@psf.upfronthosting.co.za> Message-ID: <1477327664.93.0.334868349467.issue28054@psf.upfronthosting.co.za> Pavel Savchenko added the comment: An implementation of this exists in pytest-mock. Recently an idea was brought up to shift the development of PR #57 into mock directly for everyone's benefit. https://github.com/pytest-dev/pytest-mock https://github.com/pytest-dev/pytest-mock/pull/58#issuecomment-253556301 ---------- nosy: +Pavel Savchenko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 12:56:44 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 24 Oct 2016 16:56:44 +0000 Subject: [issue28517] Dead code in wordcode In-Reply-To: <1477286199.46.0.366284805485.issue28517@psf.upfronthosting.co.za> Message-ID: <1477328204.53.0.867111794719.issue28517@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Serhiy, Could you help me, because I don't understand your patch ? because a RETURN_VALUE will go to the end of the block, and in this case, I don't understand why there is a JUMP_FORWARD at 12 in Python 3.6. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 13:30:48 2016 From: report at bugs.python.org (Kamran) Date: Mon, 24 Oct 2016 17:30:48 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: <1477326388.05.0.635619794121.issue28514@psf.upfronthosting.co.za> Message-ID: Kamran added the comment: what do u mean *Kamran Muhammad* On Mon, Oct 24, 2016 at 5:26 PM, St?phane Wirtel wrote: > > St?phane Wirtel added the comment: > > We can't help you, there is no backtrace, no stacktrace, no dump, in fact, > nothing. can you provide more details because without that, we can not > reproduce your issue. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 13:45:45 2016 From: report at bugs.python.org (klappnase) Date: Mon, 24 Oct 2016 17:45:45 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477331145.42.0.403048417301.issue28498@psf.upfronthosting.co.za> klappnase added the comment: Hi Serhiy, thanks for the feedback. "+ def tk_busy(self, **kw): Shouldn't it be just an alias to tk_busy_hold?" Not sure, I figured since it is a separate command in tk I would make it a separate command in Python, too. "+ def tk_busy_hold(self, **kw): Since the only supported option is cursor, just declare it. def tk_busy_hold(self, cursor=None): " I thought so at first, too, but is this really wise, since if future versions of tk add other options another patch would be required? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 14:16:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 18:16:19 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477331145.42.0.403048417301.issue28498@psf.upfronthosting.co.za> Message-ID: <1494522.Fnp4HYRXZc@xarax> Serhiy Storchaka added the comment: > Shouldn't it be just an alias to tk_busy_hold?" > > Not sure, I figured since it is a separate command in tk I would make it a > separate command in Python, too. place is just an alias to place_configure despites the fact that in Tk "place" and "place configure" are different commands. This is Tk sugar, we have Python sugar. > I thought so at first, too, but is this really wise, since if future > versions of tk add other options another patch would be required? Okay, let keep general kwarg. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 14:20:43 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Oct 2016 18:20:43 +0000 Subject: [issue28520] Failed to install Python 3.3.5 on OSX 10.11.6 In-Reply-To: <1477319578.41.0.653712093309.issue28520@psf.upfronthosting.co.za> Message-ID: <1477333243.42.0.328434591146.issue28520@psf.upfronthosting.co.za> Ned Deily added the comment: Interesting! Up until the Python 3.4.2 and 2.7.9 releases, the python.org installers for Mac operating systems were produced as old-style "bundle" installer packages and were shipped in a .dmg container. The bundle format had long been deprecated, supplanted by the newer "flat" installer package format, but the OS X Installer app was still able to install the old bundle-style packages. It looks like as of OS X 10.11 (El Capitan) the Installer no longer supports bundle packages. So, if you *really* need to use one of these old, unsupported releases on OS X, the options that come to mind are: 1. use the python.org dmg on OS X 10.10.* or earlier 2. for the most recent version of Python 3.3, install from MacPorts 3. build the desired version of Python from source 4. try to convert the python.org bundle package to a flat package using the OS X pkgbuild and productbuild utilities (not for the faint of heart!) But the best option, of course, is to use a more recent, supported version of Python 3. In any case, good luck! ---------- components: +macOS nosy: +ned.deily, ronaldoussoren resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 14:25:24 2016 From: report at bugs.python.org (Walker Hale IV) Date: Mon, 24 Oct 2016 18:25:24 +0000 Subject: [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477333524.21.0.804806363697.issue28516@psf.upfronthosting.co.za> Changes by Walker Hale IV : ---------- assignee: -> docs at python components: +Documentation keywords: +patch nosy: +docs at python Added file: http://bugs.python.org/file45206/issue28516.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 14:36:09 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Oct 2016 18:36:09 +0000 Subject: [issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0 In-Reply-To: <1475449173.08.0.90782279022.issue28341@psf.upfronthosting.co.za> Message-ID: <1477334169.14.0.0681262040421.issue28341@psf.upfronthosting.co.za> Ned Deily added the comment: Christoph, building on a newer OS X release for an older OS X release is tricky and out-of-scope for this closed issue. (But, it likely has the same root cause. The simplest solution is to build on the lowest-supported release, e.g. 10.9. You may also have success building on 10.12 by setting MACOSX_DEPLOYMENT_TARGET=10.9 and, if necessary, using the 10.9 SDK.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 14:36:57 2016 From: report at bugs.python.org (Walker Hale IV) Date: Mon, 24 Oct 2016 18:36:57 +0000 Subject: [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477334217.26.0.29571853037.issue28516@psf.upfronthosting.co.za> Walker Hale IV added the comment: This one-line patch should clarify the point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 14:40:14 2016 From: report at bugs.python.org (Christoph Reiter) Date: Mon, 24 Oct 2016 18:40:14 +0000 Subject: [issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0 In-Reply-To: <1475449173.08.0.90782279022.issue28341@psf.upfronthosting.co.za> Message-ID: <1477334414.26.0.571384279568.issue28341@psf.upfronthosting.co.za> Christoph Reiter added the comment: Thanks for your response. I'm using MACOSX_DEPLOYMENT_TARGET etc. and it has worked so far building on 10.9/10/11 for running on 10.6. If I find a cause/fix I'll open a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 14:51:21 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Oct 2016 18:51:21 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: Message-ID: <1477335081.91.0.5467494602.issue28514@psf.upfronthosting.co.za> Ned Deily added the comment: Kamran, the image you supplied shows that you are trying to use IDLE from Python 3.2.3. 3.2.3 is very old and no longer supported. Also, Windows 7 is very old. The last binary release of Python 3.2.x was 3.2.5 so you could try installing that version. Or, better, try a newer, supported version of Python 3. Otherwise, you should seek help elsewhere as this tracker is for specific problems with supported versions of Python. See the Python.org Help page for suggestions. Good luck! https://www.python.org/about/help/ ---------- keywords: +3.5regression nosy: +ned.deily resolution: -> out of date stage: test needed -> status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 14:57:23 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Oct 2016 18:57:23 +0000 Subject: [issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0 In-Reply-To: <1475449173.08.0.90782279022.issue28341@psf.upfronthosting.co.za> Message-ID: <1477335443.59.0.468690365541.issue28341@psf.upfronthosting.co.za> Ned Deily added the comment: There clearly was a specific problem introduced with the 10.12 SDK. It may be possible to work around by adding AVAILABILITY macros at appropriate spots in C code or some such. If someone is interested in supplying a patch, I'm willing to consider applying it but we don't claim to support downward-compatible building for reasons like this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:05:24 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 24 Oct 2016 19:05:24 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: Message-ID: <1477335924.8.0.73614926816.issue28514@psf.upfronthosting.co.za> Eryk Sun added the comment: > Windows 7 is very old. 3.8 will probably be the last Python version to support Windows 7 (2020-01 EOL). 3.6 is the last to support Vista. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:19:18 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 24 Oct 2016 19:19:18 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1477336758.85.0.947464890499.issue1100942@psf.upfronthosting.co.za> St?phane Wirtel added the comment: belopolsky, could you tell me what it is wrong with the doc about time.strptime ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 11:24:08 2016 From: report at bugs.python.org (Kamran) Date: Mon, 24 Oct 2016 15:24:08 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: <1477257037.08.0.488736597657.issue28514@psf.upfronthosting.co.za> Message-ID: Kamran added the comment: Is *THIS* any help?[image: Inline image 1] *Kamran Muhammad* On Sun, Oct 23, 2016 at 10:10 PM, SilentGhost wrote: > > Changes by SilentGhost : > > > ---------- > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ > ---------- status: pending -> open Added file: http://bugs.python.org/file45205/image.png _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 214396 bytes Desc: not available URL: From report at bugs.python.org Mon Oct 24 15:26:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 19:26:39 +0000 Subject: [issue27025] More human readable generated widget names In-Reply-To: <1463299445.94.0.887025569149.issue27025@psf.upfronthosting.co.za> Message-ID: <1477337199.78.0.566607430542.issue27025@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Now it is clear that '`' is bad prefix. There are 32 non-alphanumerical non-control ASCII characters: '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_', '`', '{', '|', '}', '~'. '{', '}', '"', '[', ']', '$', '\\' is basic part of Tcl syntax. '(' and ')' are used in array indexing. ';' is command delimiter. '#' is a commenting command (and what is more important, it is widely used in generated by Tk widget names). '.' is component delimiter in widget names. '-' starts an option. '%' starts a substitution in callbacks. '?' and '*' are used in patterns. "'", ',', and '`' look like grit on my screen. What is left? '!', '&', '+', '/', ':', '<', '=', '>', '@', '^', '_', '|', '~'. '@' starts coordinates or image path in some commands. '~' is expanded to home directory in paths. '!' is used for comments in X resources. '|' looks too distant from preceding dot and following name. Not all of these arguments are absolute stoppers. Personally I like '!', '?' and '@'. Unlikely generated names are saved in X resources or searched by patterns. If you need the widget being named, you just specify a name instead of allowing Tkinter generate arbitrary one. What are your preferences Terry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:30:09 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 24 Oct 2016 19:30:09 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1477337409.71.0.118178900031.issue1100942@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Shouldn't "time part" underlined in my previous note be "date part" instead? Also, does non-zero mean non-empty? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:31:13 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 24 Oct 2016 19:31:13 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1477337473.73.0.412105387574.issue1100942@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Never mind the second question. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:34:33 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 19:34:33 +0000 Subject: [issue26682] Ttk Notebook tabs do not show with 1-2 char names In-Reply-To: <1459470501.64.0.00235900367072.issue26682@psf.upfronthosting.co.za> Message-ID: <1477337673.78.0.656769764444.issue26682@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tk bug tracker is http://core.tcl.tk/tk/ticket. I don't think we can do something from our side. ---------- resolution: -> third party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:35:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 19:35:21 +0000 Subject: [issue22757] TclStackFree: incorrect freePtr. Call out of sequence? In-Reply-To: <1414552754.88.0.540025463882.issue22757@psf.upfronthosting.co.za> Message-ID: <1477337721.56.0.0174456235052.issue22757@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:46:11 2016 From: report at bugs.python.org (Zachary Ware) Date: Mon, 24 Oct 2016 19:46:11 +0000 Subject: [issue22757] TclStackFree: incorrect freePtr. Call out of sequence? In-Reply-To: <1414552754.88.0.540025463882.issue22757@psf.upfronthosting.co.za> Message-ID: <1477338371.09.0.331640531694.issue22757@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- resolution: -> not a bug stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:52:46 2016 From: report at bugs.python.org (Kyle Altendorf) Date: Mon, 24 Oct 2016 19:52:46 +0000 Subject: [issue26660] tempfile.TemporaryDirectory() cleanup exception on Windows if readonly files created In-Reply-To: <1459203748.81.0.389724870435.issue26660@psf.upfronthosting.co.za> Message-ID: <1477338766.46.0.420699572009.issue26660@psf.upfronthosting.co.za> Changes by Kyle Altendorf : ---------- nosy: +altendky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:57:10 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 19:57:10 +0000 Subject: [issue26340] modal dialog with transient method; parent window fails to iconify In-Reply-To: <1455210342.9.0.230352859774.issue26340@psf.upfronthosting.co.za> Message-ID: <1477339030.5.0.907833981041.issue26340@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:59:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 19:59:17 +0000 Subject: [issue26085] Tkinter spoils the input text In-Reply-To: <1452546756.92.0.853539899898.issue26085@psf.upfronthosting.co.za> Message-ID: <1477339157.75.0.546813215452.issue26085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Does anybody want to provide documentation patch? Otherwise this issue will be closed as "not a bug". ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 16:03:06 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 24 Oct 2016 20:03:06 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1477339386.37.0.678681849356.issue28426@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: As I already mentioned, PyUnicode_AsEncodedUnicode() needs to stay, since it's the C API for unicode.encode(). The others can be deprecated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 16:45:13 2016 From: report at bugs.python.org (Big Stone) Date: Mon, 24 Oct 2016 20:45:13 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 Message-ID: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> New submission from Big Stone: on WinPython-64bit-3.6.0.0Zerorc2.exe, python-3.6.0b2 based, I can't get IDLEX working with "python._pth". If I put "Lib\site-packages\" in python._pth, python.exe dies. If I put "#Lib\site-packages\", idlexlib is said "unable to located". Could it be a python-3.6.0b2 bug, or just a wrong-doing from WinPython ? "Python._pth"= . Lib import site DLLs #Lib/site-packages #python36.zip ---------- components: Windows messages: 279338 nosy: Big Stone, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: can't make IDLEX work with python._pth and python-3.6.0b2 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 16:50:23 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Oct 2016 20:50:23 +0000 Subject: [issue25464] Tix HList header_exists should be "exist" In-Reply-To: <1445555946.1.0.542845821493.issue25464@psf.upfronthosting.co.za> Message-ID: <20161024205020.11782.54442.FAED2826@psf.io> Roundup Robot added the comment: New changeset f57078cf5f13 by Serhiy Storchaka in branch '2.7': Issue #25464: Fixed HList.header_exists() in Tix module by adding https://hg.python.org/cpython/rev/f57078cf5f13 New changeset e928afbcc18a by Serhiy Storchaka in branch '3.5': Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin https://hg.python.org/cpython/rev/e928afbcc18a New changeset 523aecdb8d5f by Serhiy Storchaka in branch '3.6': Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin https://hg.python.org/cpython/rev/523aecdb8d5f New changeset 5b33829badcc by Serhiy Storchaka in branch 'default': Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin https://hg.python.org/cpython/rev/5b33829badcc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 16:53:40 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 20:53:40 +0000 Subject: [issue3015] tkinter with wantobjects=False has been broken for some time In-Reply-To: <1212187898.67.0.391803496997.issue3015@psf.upfronthosting.co.za> Message-ID: <1477342420.16.0.781229823826.issue3015@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 16:56:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 20:56:38 +0000 Subject: [issue25684] ttk.OptionMenu radiobuttons aren't unique between two instances of OptionMenu In-Reply-To: <1448040288.53.0.198369542776.issue25684@psf.upfronthosting.co.za> Message-ID: <1477342598.66.0.78229873947.issue25684@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 17:37:09 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Oct 2016 21:37:09 +0000 Subject: [issue28523] Idlelib.configdialog: use 'color' insteadof 'colour' Message-ID: <1477345028.99.0.578585352452.issue28523@psf.upfronthosting.co.za> New submission from Terry J. Reedy: idlelib.configdialog uses the British spelling 'colour' instead of the American spelling 'color' everywhere except for externally mandated import and parameter names and in some recent comments. idlelib uses 'color' everywhere else. # change 'colour' to 'color' in idlelib.configdialog 3.6 with open('F:/python/dev/36/lib/idlelib/configdialog.py', 'r+') as f: code = f.read().replace('Colour', 'Color').replace('colour', 'color') f.seek(0); f.truncate() f.write(code) produces the attached patch. I would like to apply this before 3.6.0rc. I might wait until a week before that in case I want to backport any configdialog changes to 3.5. (Any such changes might require regenerating the patch.) ---------- assignee: terry.reedy files: color.diff keywords: patch messages: 279340 nosy: terry.reedy priority: normal severity: normal stage: patch review status: open title: Idlelib.configdialog: use 'color' insteadof 'colour' type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45207/color.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 17:45:10 2016 From: report at bugs.python.org (Al Sweigart) Date: Mon, 24 Oct 2016 21:45:10 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL Message-ID: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> New submission from Al Sweigart: As a convenience, we could make the default argument for logging.disable()'s lvl argument as logging.CRITICAL. This would make disabling all logging messages: logging.disable() ...instead of the more verbose: logging.disable(logging.CRITICAL) This one-line change is backwards compatible. ---------- components: Library (Lib) files: default_critical.patch keywords: patch messages: 279341 nosy: Al.Sweigart priority: normal severity: normal status: open title: Set default argument of logging.disable() to logging.CRITICAL type: enhancement Added file: http://bugs.python.org/file45208/default_critical.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 17:46:17 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Oct 2016 21:46:17 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1477345577.32.0.308638709673.issue28524@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 17:53:56 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 24 Oct 2016 21:53:56 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477346036.42.0.853650051816.issue28522@psf.upfronthosting.co.za> Steve Dower added the comment: Might have to use a backslash in the path - I don't remember whether I tried to handle forward slashes or not, but I suspect not. Definitely tried it with site-packages though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 18:23:44 2016 From: report at bugs.python.org (Robert Harder) Date: Mon, 24 Oct 2016 22:23:44 +0000 Subject: [issue26571] turtle regression in 3.5 In-Reply-To: <1458104355.45.0.620158354917.issue26571@psf.upfronthosting.co.za> Message-ID: <1477347824.42.0.871916887208.issue26571@psf.upfronthosting.co.za> Robert Harder added the comment: Thanks for pointing out the workaround. Was driving me crazy. Possible fix is to add TurtleScreen._RUNNING = True ~line 967 in turtle.py, in TurtleScreen.__init__ function. ---------- nosy: +Robert Harder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 19:12:01 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Oct 2016 23:12:01 +0000 Subject: [issue26682] Ttk Notebook tabs do not show with 1-2 char names In-Reply-To: <1459470501.64.0.00235900367072.issue26682@psf.upfronthosting.co.za> Message-ID: <1477350721.8.0.615775944276.issue26682@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 19:58:54 2016 From: report at bugs.python.org (Javier Rey) Date: Mon, 24 Oct 2016 23:58:54 +0000 Subject: [issue28525] Incorrect documented parameter for gc.collect Message-ID: <1477353534.83.0.239839620837.issue28525@psf.upfronthosting.co.za> Changes by Javier Rey : ---------- assignee: docs at python components: Documentation files: gc_collect_doc_fix.patch keywords: patch nosy: docs at python, vierja priority: normal severity: normal status: open title: Incorrect documented parameter for gc.collect versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45209/gc_collect_doc_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 22:16:50 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 25 Oct 2016 02:16:50 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1477361810.26.0.09382470018.issue28426@psf.upfronthosting.co.za> Xiang Zhang added the comment: Marc-Andre, shouldn't the C API of unicode.encode() be PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedUnicode now? BTW Serhiy, how about PyUnicode_AsEncodedObject? Not see it in your deprecate list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 22:24:54 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 25 Oct 2016 02:24:54 +0000 Subject: [issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True) In-Reply-To: <1455835021.39.0.133039555561.issue26388@psf.upfronthosting.co.za> Message-ID: <1477362294.63.0.0858394776446.issue26388@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, very nice. (And no worries on taking an as-you-have-time approach to this - you'll see from the dates on some of the referenced issues below that even I'm in that situation where runpy is concerned) I think you're right that offering a 2-phase load/run API will make a lot of sense to folks already familiar with the find/exec model for imports, and it also aligns with this old design concept for making runpy friendlier to modules that need access to the created globals even if the execution step fails: http://bugs.python.org/issue9325#msg133833 I'd just completely missed that that idea was potentially relevant here as well :) I'll provide a few more detailed comments inline. The scale of the refactoring does make me wonder if there might be a way to account for the "target module" idea in http://bugs.python.org/issue19982 though. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 22:45:59 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 25 Oct 2016 02:45:59 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1477363559.63.0.583753196791.issue28524@psf.upfronthosting.co.za> Xiang Zhang added the comment: Is disabling all logging messages a common need? Maybe other levels are common but we can't know. And at least the doc patch needs a versionchanged tag. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 22:50:13 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 25 Oct 2016 02:50:13 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1477363813.35.0.240086118763.issue28524@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Given that a user can add their on levels, I think that having a default would be misleading (having no arguments implies total disabling but with custom levels the default of CRITICAL might not disable all messages). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 22:54:53 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 25 Oct 2016 02:54:53 +0000 Subject: [issue28517] Dead code in wordcode In-Reply-To: <1477286199.46.0.366284805485.issue28517@psf.upfronthosting.co.za> Message-ID: <1477364093.62.0.685387324022.issue28517@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +0 The situation this addresses isn't common and the patch will rarely produce a perceptable benefit (just making the disassembly look a little nicer). That said, change looks simple enough and doesn't add any overhead. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 23:08:39 2016 From: report at bugs.python.org (Al Sweigart) Date: Tue, 25 Oct 2016 03:08:39 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1477364919.57.0.838870536309.issue28524@psf.upfronthosting.co.za> Al Sweigart added the comment: xiang.zhang: The use case I've found is that I often have logging enabled while writing code, and then want to shut it off once I've finished. This might not be everyone's use case, but this is a backwards-compatible change since it's currently a required argument. If there's a sensible default, I think this is it. rhettinger: We could use sys.maxsize instead of logging.CRITICAL to disable any custom logging levels as well if this is a concern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 23:28:57 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 25 Oct 2016 03:28:57 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1477366137.36.0.706248062473.issue28524@psf.upfronthosting.co.za> Xiang Zhang added the comment: > We could use sys.maxsize instead of logging.CRITICAL to disable any custom logging levels as well if this is a concern. sys.maxsize is not the upper bound limit of integers in Python. There is no such value in Python3. > The use case I've found is that I often have logging enabled while writing code, and then want to shut it off once I've finished. How about logger.disabled = True. This can work even if there are custom levels. But it's not a documented feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 23:35:11 2016 From: report at bugs.python.org (Al Sweigart) Date: Tue, 25 Oct 2016 03:35:11 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1477366511.06.0.666464118021.issue28524@psf.upfronthosting.co.za> Al Sweigart added the comment: > How about logger.disabled = True. This seems to violate "there should be one and only one way to do it". What happens when logging.disabled is True but then logging.disable(logging.NOTSET) is called? I could see this being a gotcha. Since logging.CRITICAL is 50, I think it's reasonable to assume that no one would create a logging level larger than sys.maxsize. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 01:07:33 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Oct 2016 05:07:33 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477372053.78.0.622212725104.issue25002@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, Attached is the patch that adds pending deprecation warnings to asyncore and asynchat. Please review. Thanks :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45210/issue25002.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 01:21:51 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Oct 2016 05:21:51 +0000 Subject: [issue27025] More human readable generated widget names In-Reply-To: <1463299445.94.0.887025569149.issue27025@psf.upfronthosting.co.za> Message-ID: <1477372911.0.0.0816378049884.issue27025@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Agreed that ` is not best and should be changed. An alternative should be in next release. I looked back at the output in msg268406. ! is similar to | but shorter, and better for that. It is also, generally, thicker, which is better. With the font used on this page in FireFox, at my usual size setting, |is 1.5 pixels, so it tinged red or green depending on whether the half pixel is to the right or left. ! is 2 pixels and black, which is better. Smaller font sizes could reverse the situation, but unlikely for me. @ is email separator and twitter name prefix. Firefox recognizes this and colors the first @ and all names blue. I don't like this. Not an issue in code editors, etc, but code and especially results, get displayed elsewhere, as here. Aside from that, it is visually too heavy and I cannot avoid reading @ as 'at'. Let's skip it. I still like my previous 2nd choice, ^, but you apparently do not. I omitted ? before, I think just by oversight. Let's try both with ! also, isolated from other options. >>> for c in "^!?": print(".%stoplevel.%sframe.%sbutton\n" % (c, c, c)) .^toplevel.^frame.^button .!toplevel.!frame.!button .?toplevel.?frame.?button ? strikes me as slightly too heavy, but worse is the semantic meaning of doubt, close to negation. With the noise of other alternatives removed, and looking again several times, I like ! about as much as ^, both visually and semantically. Perhaps from knowing some Spanish, which uses inverted ! to begin sentences, I read ! as mild affirmation. I would be equally happy with either. If you prefer !, go with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 01:23:24 2016 From: report at bugs.python.org (Big Stone) Date: Tue, 25 Oct 2016 05:23:24 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477373004.82.0.0205666625684.issue28522@psf.upfronthosting.co.za> Big Stone added the comment: python.exe crashes when I try this python._pth: . Lib import site DLLs Lib\site-packages #python36.zip all variation I try on Lib\site-packages do fail, when I not commenting # the line... Nevertheless, jupyter/numpy/bokeh do work with original setting. I'm lost in thoughts: how adding a line in this file can make Python crash ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 01:47:32 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 25 Oct 2016 05:47:32 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1477374452.75.0.472602631863.issue28524@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Put me down for -0. I don't think the minor convenience is worth the loss in clarity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:00:39 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 06:00:39 +0000 Subject: [issue28525] Incorrect documented parameter for gc.collect Message-ID: <20161025060035.110784.85203.D891A2C9@psf.io> New submission from Roundup Robot: New changeset 05b5e1aaedc5 by Benjamin Peterson in branch '3.5': fix name of keyword parameter to gc.collect() (closes #28525) https://hg.python.org/cpython/rev/05b5e1aaedc5 New changeset f9a04afaeece by Benjamin Peterson in branch '3.6': merge 3.5 (#28525) https://hg.python.org/cpython/rev/f9a04afaeece New changeset ffaf02ec9d8b by Benjamin Peterson in branch 'default': merge 3.6 (#28525) https://hg.python.org/cpython/rev/ffaf02ec9d8b ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:09:24 2016 From: report at bugs.python.org (Al Sweigart) Date: Tue, 25 Oct 2016 06:09:24 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1477375764.17.0.636061223397.issue28524@psf.upfronthosting.co.za> Al Sweigart added the comment: As a general indicator, I did a google search for "logging.disable(logging.XXX)" for the different levels. The number of results passing ERROR, WARN, DEBUG, and INFO are under a couple dozen each. But the number of results for "logging.disable(logging.CRITICAL)" is 3,800. It's a rough estimate, but it shows that 95%+ of the time people call logging.disable() they want to disable all logging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:11:35 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 25 Oct 2016 06:11:35 +0000 Subject: [issue28147] Unbounded memory growth resizing split-table dicts In-Reply-To: <1473853453.13.0.556951743271.issue28147@psf.upfronthosting.co.za> Message-ID: <1477375895.81.0.876107654775.issue28147@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- priority: normal -> high stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:21:01 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 06:21:01 +0000 Subject: [issue28523] Idlelib.configdialog: use 'color' insteadof 'colour' In-Reply-To: <1477345028.99.0.578585352452.issue28523@psf.upfronthosting.co.za> Message-ID: <1477376461.07.0.020078543878.issue28523@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Offtopic. I would suggest you to install GNU sed. From GnuWin [1] or as a part of Cygwin distribution [2]. 4-line Python script can be replaced with one simple command: sed -i -re "s/([Cc])olour/\1olor/g" configdialog.py [1] http://gnuwin32.sourceforge.net/packages/sed.htm [2] http://cygwin.com/ ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:42:30 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 06:42:30 +0000 Subject: [issue28517] Dead code in wordcode In-Reply-To: <1477286199.46.0.366284805485.issue28517@psf.upfronthosting.co.za> Message-ID: <20161025064228.32881.72540.CBD1C8CF@psf.io> Roundup Robot added the comment: New changeset 5784cc37b5f4 by Serhiy Storchaka in branch '3.6': Issue #28517: Fixed of-by-one error in the peephole optimizer that caused https://hg.python.org/cpython/rev/5784cc37b5f4 New changeset 8d571fab4d66 by Serhiy Storchaka in branch 'default': Issue #28517: Fixed of-by-one error in the peephole optimizer that caused https://hg.python.org/cpython/rev/8d571fab4d66 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:47:07 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 06:47:07 +0000 Subject: [issue27025] More human readable generated widget names In-Reply-To: <1463299445.94.0.887025569149.issue27025@psf.upfronthosting.co.za> Message-ID: <20161025064702.27199.75669.E5C03FA9@psf.io> Roundup Robot added the comment: New changeset 603ac788ed27 by Serhiy Storchaka in branch '3.6': Issue #27025: Generated names for Tkinter widgets now start by the "!" prefix https://hg.python.org/cpython/rev/603ac788ed27 New changeset 505949cb2692 by Serhiy Storchaka in branch 'default': Issue #27025: Generated names for Tkinter widgets now start by the "!" prefix https://hg.python.org/cpython/rev/505949cb2692 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:52:00 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 06:52:00 +0000 Subject: [issue28515] Py3k warnings in Python 2.7 tests In-Reply-To: <1477240174.09.0.468374420689.issue28515@psf.upfronthosting.co.za> Message-ID: <20161025065157.18103.88766.1A5B7007@psf.io> Roundup Robot added the comment: New changeset 77571b528f6a by Serhiy Storchaka in branch '2.7': Issue #28515: Fixed py3k warnings. https://hg.python.org/cpython/rev/77571b528f6a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:53:04 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 06:53:04 +0000 Subject: [issue28515] Py3k warnings in Python 2.7 tests In-Reply-To: <1477240174.09.0.468374420689.issue28515@psf.upfronthosting.co.za> Message-ID: <1477378384.09.0.805279021614.issue28515@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you David for your advise. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:53:33 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 25 Oct 2016 06:53:33 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1477361810.26.0.09382470018.issue28426@psf.upfronthosting.co.za> Message-ID: <580F0169.7020709@egenix.com> Marc-Andre Lemburg added the comment: On 25.10.2016 04:16, Xiang Zhang wrote: > Marc-Andre, shouldn't the C API of unicode.encode() be PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedUnicode now? You're right. I got confused with all the slight variations. > BTW Serhiy, how about PyUnicode_AsEncodedObject? Not see it in your deprecate list. Let's see what we have: PyUnicode_AsEncodedString(): encode to bytes (unicode.encode()) PyUnicode_AsEncodedUnicode(): encode to unicode (for e.g. rot13) PyUnicode_AsEncodedObject(): encode to whatever the codec returns codecs.encode() can be used for the last two. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:57:16 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 06:57:16 +0000 Subject: [issue27025] More human readable generated widget names In-Reply-To: <1463299445.94.0.887025569149.issue27025@psf.upfronthosting.co.za> Message-ID: <1477378636.14.0.486609712201.issue27025@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good point about "@". I missed this. Thanks Terry. "!" LGTM. Committed to 3.6 too. I consider this as the fix of the bug in 3.6 feature. ---------- resolution: -> fixed status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:59:21 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Oct 2016 06:59:21 +0000 Subject: [issue26085] Document default tk Text class bindings for tkinter and IDLE In-Reply-To: <1452546756.92.0.853539899898.issue26085@psf.upfronthosting.co.za> Message-ID: <1477378761.32.0.840219497835.issue26085@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I want to recast this as a doc issue. The BINDINGS section of http://www.tcl.tk/man/tcl8.6/TkCmd/text.htm, near the bottom, has a list with 33 numbered items. The main categories of action include selection modification, cursor movement, and text deletion. Minor categories include insertion, transposition, undo/redo. However, the items are not neatly grouped this way. Some of these actions are IDLE menu items and are listed in the IDLE menu doc. Many more are documented in https://docs.python.org/3/library/idle.html#editing-and-navigation. Some useful actions, such as ^t Tranposition Right, are omitted. Some of this IDLE doc is wrong, at least for IDLE, at least on Windows. For instance, at least on Windows, ^a in IDLE is Select All, not Move Beginning of Line. For working on IDLE, it would be very helpful to have a *categorized* listing of class-bound actions that are verified to work for tkinter Text, with notes on any OS differences. I can then check what works on IDLE and how it changes the bindings on either some or all systems. I can and someday will do this for Windows, but I currently would need help for other OSes. To help people avoid clashes such as Nick ran into, the tkinter doc should also have a sorted and abbreviated list of bound event sequences. "Text comes with bindings for the following event sequences for keys: Control-a, ..., z; Control-Shift-?, ...,z, Meta-...(Unix), Command-...(Mac). For mice, ..." Follow with a note on what can or cannot be unbound and the need to use 'break' when overriding. A function to produce for IDLE a similar list that includes IDLE's system-specific add-ons and a user's customizations, would be a separate but very useful issue. Not knowing current bindings makes customization hard. Another spinoff issue would be making actions available via the IDLE menu system. ---------- assignee: docs at python -> terry.reedy stage: -> needs patch title: Tkinter spoils the input text -> Document default tk Text class bindings for tkinter and IDLE versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 03:03:40 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 07:03:40 +0000 Subject: [issue28517] Dead code in wordcode In-Reply-To: <1477286199.46.0.366284805485.issue28517@psf.upfronthosting.co.za> Message-ID: <1477379020.78.0.245920091375.issue28517@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The main problem was that this bug caused unnecessary breakage of tests in Victor's bytecode [1]. St?phane, the number of opcodes to the end of the block was counted incorrectly. Just off-by-one error. One unreachable opcode always was left. [1] https://github.com/haypo/bytecode ---------- resolution: -> fixed stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 03:10:03 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Oct 2016 07:10:03 +0000 Subject: [issue28517] Dead code in wordcode In-Reply-To: <1477286199.46.0.366284805485.issue28517@psf.upfronthosting.co.za> Message-ID: <1477379403.82.0.323457787832.issue28517@psf.upfronthosting.co.za> St?phane Wirtel added the comment: ah ok, thanks for the explanation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 03:18:52 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 07:18:52 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <20161025071849.32991.18101.8416D7E1@psf.io> Roundup Robot added the comment: New changeset 71dce630dc02 by Serhiy Storchaka in branch '3.4': Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug build. https://hg.python.org/cpython/rev/71dce630dc02 New changeset 74569ecd67e4 by Serhiy Storchaka in branch '3.5': Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug build. https://hg.python.org/cpython/rev/74569ecd67e4 New changeset 6af1a26e655f by Serhiy Storchaka in branch '3.6': Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug build. https://hg.python.org/cpython/rev/6af1a26e655f New changeset 1ab1fd00e9d6 by Serhiy Storchaka in branch 'default': Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug build. https://hg.python.org/cpython/rev/1ab1fd00e9d6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 03:20:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 07:20:39 +0000 Subject: [issue28517] Dead code in wordcode In-Reply-To: <1477286199.46.0.366284805485.issue28517@psf.upfronthosting.co.za> Message-ID: <1477380039.34.0.607764072071.issue28517@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 03:32:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 07:32:19 +0000 Subject: [issue25464] Tix HList header_exists should be "exist" In-Reply-To: <1445555946.1.0.542845821493.issue25464@psf.upfronthosting.co.za> Message-ID: <1477380739.56.0.613252020155.issue25464@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is hard to add tests because testing infrastructure for Tix doesn't exist. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 03:38:24 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 07:38:24 +0000 Subject: [issue28314] ElementTree: Element.getiterator(tag) broken in 3.6 In-Reply-To: <1475178246.36.0.289281608925.issue28314@psf.upfronthosting.co.za> Message-ID: <20161025073820.33099.17601.B0F534F4@psf.io> Roundup Robot added the comment: New changeset ca1b91829edf by Serhiy Storchaka in branch '3.5': Issue #28314: Added tests for xml.etree.ElementTree.Element.getiterator(). https://hg.python.org/cpython/rev/ca1b91829edf New changeset c14a2d2a3b19 by Serhiy Storchaka in branch '3.6': Issue #28314: Added tests for xml.etree.ElementTree.Element.getiterator(). https://hg.python.org/cpython/rev/c14a2d2a3b19 New changeset 17334c1d9245 by Serhiy Storchaka in branch 'default': Issue #28314: Added tests for xml.etree.ElementTree.Element.getiterator(). https://hg.python.org/cpython/rev/17334c1d9245 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 03:38:56 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 07:38:56 +0000 Subject: [issue28314] ElementTree: Element.getiterator(tag) broken in 3.6 In-Reply-To: <1475178246.36.0.289281608925.issue28314@psf.upfronthosting.co.za> Message-ID: <1477381136.18.0.109865223773.issue28314@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 03:47:47 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 25 Oct 2016 07:47:47 +0000 Subject: [issue20847] asyncio docs should call out that network logging is a no-no In-Reply-To: <1393877540.32.0.826428021059.issue20847@psf.upfronthosting.co.za> Message-ID: <1477381667.59.0.159744061557.issue20847@psf.upfronthosting.co.za> ???? ????????? added the comment: Typical network logging is using syslog UDP. Sending UDP is never block. ---------- nosy: +mmarkk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 03:52:41 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Oct 2016 07:52:41 +0000 Subject: [issue28523] Idlelib.configdialog: use 'color' insteadof 'colour' In-Reply-To: <1477345028.99.0.578585352452.issue28523@psf.upfronthosting.co.za> Message-ID: <1477381961.86.0.45731844988.issue28523@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Hmmm. I believe the Win10 Anniversary Update is supposed to include the new Ubuntu-bash-linux subsystem. I presume it should include sed. I need to see if I have the update and the subsystem, and what it includes. I could have done this one, within one file, with replace-all. But I expect to be doing some multifile name changes, and I presume sed will do that. I decided to apply this tomorrow after re-checking the changes. I checked current configdialog issues and decided not to worry about backports. Planned and proposed cosmetic fixups -- PEP8 renamings, ttk replacements (see #27755, for instance), and revised layouts will be bigger issues. And I want to start on these next. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 04:00:40 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Oct 2016 08:00:40 +0000 Subject: [issue25464] Tix HList header_exists should be "exist" In-Reply-To: <1445555946.1.0.542845821493.issue25464@psf.upfronthosting.co.za> Message-ID: <1477382440.51.0.254814006053.issue25464@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Subsequent to me suggesting a test, the 3.6 doc gained this: "Deprecated since version 3.6: This Tk extension is unmaintained and should not be used in new code." This answers my question about using it in IDLE. Good to apply this anyway, but no test is fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 04:14:34 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 25 Oct 2016 08:14:34 +0000 Subject: [issue28107] Update typing module dicumentation for NamedTuple In-Reply-To: <1473707242.23.0.095655840586.issue28107@psf.upfronthosting.co.za> Message-ID: <1477383274.03.0.625416067166.issue28107@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Guido, > Honestly I think it's better if this remains a "hidden" feature until we have support for it in mypy. So let's wait for that. This patch now could be applied (since the mypy PR for this is merged). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 04:33:16 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 08:33:16 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1477384396.13.0.108861399776.issue28426@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > BTW Serhiy, how about PyUnicode_AsEncodedObject? Not see it in your deprecate list. Indeed. It is not such useless as other functions (that support only the rot13 encoding), but it can be replaced with either PyUnicode_AsEncodedString or PyCodec_Encode (both exists in 2.7). Updated patch deprecates PyUnicode_AsEncodedObject too. Please make a review of warning messages, I'm not sure about the wording. ---------- versions: -Python 3.4, Python 3.5 Added file: http://bugs.python.org/file45211/deprecate-str-to-str-coding-unicode-api-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 04:38:25 2016 From: report at bugs.python.org (=?utf-8?b?5pu55b+g?=) Date: Tue, 25 Oct 2016 08:38:25 +0000 Subject: [issue28465] python 3.5 magic number In-Reply-To: <1477326508.73.0.141886509644.issue28465@psf.upfronthosting.co.za> Message-ID: ?? added the comment: Thanks, I see. Brett Cannon ?2016?10?25? ?? 00:28??? Brett Cannon added the comment: Closing this as a third-party Debian issue (if it even matters as bytecode is an optimization local to a machine and so different magic numbers shouldn't matter). ---------- nosy: +brett.cannon resolution: -> third party status: open -> closed _______________________________________ Python tracker _______________________________________ -- Thanks & Best Regards! ? ?(Joo Tsao) ?????????????? Address: ????????12???3A02? Mobile: 137 6331 0068 Tel: +86 020 3829 6735 Fax: +86 020 3829 6726 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 04:42:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 08:42:38 +0000 Subject: [issue28526] Use PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedObject Message-ID: <1477384958.56.0.348226525615.issue28526@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: PyUnicode_AsEncodedObject() can return an object of arbitrary type, while PyUnicode_AsEncodedString() always returns bytes. The code that uses PyUnicode_AsEncodedObject() in the _curses module expects bytes, but does not check the type of the result. This can cause undefined behavior, including a crash. Using PyUnicode_AsEncodedString() is more correct in this case. ---------- assignee: serhiy.storchaka components: Extension Modules files: curses-PyUnicode_AsEncodedString.patch keywords: patch messages: 279377 nosy: serhiy.storchaka, twouters priority: normal severity: normal stage: patch review status: open title: Use PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedObject type: crash versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45212/curses-PyUnicode_AsEncodedString.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 04:42:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 08:42:57 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1477384977.94.0.850799313364.issue28426@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka dependencies: +Use PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedObject _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 04:43:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 08:43:24 +0000 Subject: [issue28107] Update typing module documentation for NamedTuple In-Reply-To: <1473707242.23.0.095655840586.issue28107@psf.upfronthosting.co.za> Message-ID: <1477385004.17.0.718552713748.issue28107@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Update typing module dicumentation for NamedTuple -> Update typing module documentation for NamedTuple _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 04:52:27 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 25 Oct 2016 08:52:27 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1477385547.12.0.941286211784.issue28426@psf.upfronthosting.co.za> Xiang Zhang added the comment: LGTM. I can understand the wording. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 05:11:04 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 09:11:04 +0000 Subject: [issue5830] heapq item comparison problematic with sched's events In-Reply-To: <1240580106.04.0.721938894312.issue5830@psf.upfronthosting.co.za> Message-ID: <1477386664.52.0.281208849829.issue5830@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a test. ---------- keywords: +patch versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.0, Python 3.1 Added file: http://bugs.python.org/file45213/test_sched_noncomparable_args.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 05:11:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 09:11:38 +0000 Subject: [issue5830] heapq item comparison problematic with sched's events In-Reply-To: <1240580106.04.0.721938894312.issue5830@psf.upfronthosting.co.za> Message-ID: <1477386698.94.0.0581564888427.issue5830@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file45213/test_sched_noncomparable_args.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 05:11:49 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 09:11:49 +0000 Subject: [issue5830] heapq item comparison problematic with sched's events In-Reply-To: <1240580106.04.0.721938894312.issue5830@psf.upfronthosting.co.za> Message-ID: <1477386709.28.0.670964666614.issue5830@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45214/test_sched_noncomparable_args.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 05:51:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 09:51:55 +0000 Subject: [issue28427] WeakValueDictionary next bug (with multithreading) In-Reply-To: <1476354989.22.0.575160455599.issue28427@psf.upfronthosting.co.za> Message-ID: <1477389115.45.0.0148403266002.issue28427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Following patch fixes more cases. But I don't think it fixes race conditions, it just makes them less likely. Increased priority because this bug makes weakref.WeakValueDictionary unusable in multithread program. ---------- components: +Library (Lib) priority: normal -> critical Added file: http://bugs.python.org/file45215/issue28427-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:05:26 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 10:05:26 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477389926.78.0.718035321149.issue23262@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Would not be easier to drop a support of SeaMonkey 1.x and other ancient browsers? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:11:52 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 10:11:52 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail In-Reply-To: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> Message-ID: <20161025101149.16687.50439.CF82EEC4@psf.io> Roundup Robot added the comment: New changeset b471447352ac by INADA Naoki in branch '3.6': Issue #28430: Fix iterator of C implemented asyncio.Future doesn't https://hg.python.org/cpython/rev/b471447352ac New changeset bd141ec2973a by INADA Naoki in branch 'default': Issue #28430: Fix iterator of C implemented asyncio.Future doesn't https://hg.python.org/cpython/rev/bd141ec2973a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:14:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 10:14:52 +0000 Subject: [issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish In-Reply-To: <1476119616.69.0.933399987937.issue28408@psf.upfronthosting.co.za> Message-ID: <1477390492.08.0.29677417578.issue28408@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- assignee: -> serhiy.storchaka stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:16:50 2016 From: report at bugs.python.org (Oleg Broytman) Date: Tue, 25 Oct 2016 10:16:50 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477390610.14.0.55819161887.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: I don't think Firefox versions <36 are too old to be dropped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:21:14 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 10:21:14 +0000 Subject: [issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish In-Reply-To: <1476119616.69.0.933399987937.issue28408@psf.upfronthosting.co.za> Message-ID: <1477390874.56.0.603087847541.issue28408@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 3.5 is free from both problems. They were introduced in f33433d9c163. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:23:40 2016 From: report at bugs.python.org (Jonathan Hogg) Date: Tue, 25 Oct 2016 10:23:40 +0000 Subject: [issue28527] Hack in `genericpath.commonprefix()` crashes if `m` argument is not indexable Message-ID: <1477391020.72.0.151602828725.issue28527@psf.upfronthosting.co.za> New submission from Jonathan Hogg: If `genericpath.commonprefix()` is called with a non-indexable argument, then the check for passing in a list of lists/tuples will raise an exception due to the `m[0]` test. ---------- components: Library (Lib) messages: 279386 nosy: jonathanhogg priority: normal severity: normal status: open title: Hack in `genericpath.commonprefix()` crashes if `m` argument is not indexable type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:27:15 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 25 Oct 2016 10:27:15 +0000 Subject: [issue28527] Hack in `genericpath.commonprefix()` crashes if `m` argument is not indexable In-Reply-To: <1477391020.72.0.151602828725.issue28527@psf.upfronthosting.co.za> Message-ID: <1477391235.92.0.48081953232.issue28527@psf.upfronthosting.co.za> Christian Heimes added the comment: That's correct. The function raises a TypeError when you pass in a wrong type. ---------- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:31:07 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 25 Oct 2016 10:31:07 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail In-Reply-To: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> Message-ID: <1477391467.38.0.484146193256.issue28430@psf.upfronthosting.co.za> INADA Naoki added the comment: > - It appears it also touches Misc/NEWS a bit too much. Please make sure to not to commit that. I wont to move move this entry from "Core and Builtins" section to "Library" section: - Issue #26081: Added C implementation of asyncio.Future. Original patch by Yury Selivanov. May I do it? ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:36:30 2016 From: report at bugs.python.org (Jonathan Hogg) Date: Tue, 25 Oct 2016 10:36:30 +0000 Subject: [issue28527] Hack in `genericpath.commonprefix()` crashes if `m` argument is not indexable In-Reply-To: <1477391020.72.0.151602828725.issue28527@psf.upfronthosting.co.za> Message-ID: <1477391790.87.0.748255674675.issue28527@psf.upfronthosting.co.za> Jonathan Hogg added the comment: While I agree that the documentation specifies that this function takes a list, the previous version did not require a list, just any object that is iterable. Unfortunately, this change is causing a break in real code (`xon.sh` in this case, which appears to pass a `set()` to this function). Given the `os.fspath` change could have been made to not require an indexable argument, I would argue that this change is an unnecessary regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:46:00 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 10:46:00 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477392360.2.0.535895383573.issue23262@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I don't think Firefox versions <36 are too old to be dropped. Just Firefox versions <1.5. Firefox 1.5 released 11 years ago supported options -new-window and -new-tab [1]. [1] http://website-archive.mozilla.org/www.mozilla.org/firefox_releasenotes/en-US/firefox/releases/1.5.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:48:21 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 10:48:21 +0000 Subject: [issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish In-Reply-To: <1476119616.69.0.933399987937.issue28408@psf.upfronthosting.co.za> Message-ID: <20161025104818.9426.64581.0E38249A@psf.io> Roundup Robot added the comment: New changeset 9d618cebfc21 by Serhiy Storchaka in branch '3.6': Issue #28408: Fixed a leak and remove redundant code in _PyUnicodeWriter_Finish(). https://hg.python.org/cpython/rev/9d618cebfc21 New changeset 24c3f997bd1a by Serhiy Storchaka in branch 'default': Issue #28408: Fixed a leak and remove redundant code in _PyUnicodeWriter_Finish(). https://hg.python.org/cpython/rev/24c3f997bd1a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:49:25 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 10:49:25 +0000 Subject: [issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish In-Reply-To: <1476119616.69.0.933399987937.issue28408@psf.upfronthosting.co.za> Message-ID: <1477392565.34.0.219058066309.issue28408@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 06:50:34 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 10:50:34 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1477392634.76.0.457269958736.issue28353@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 07:09:06 2016 From: report at bugs.python.org (Oleg Broytman) Date: Tue, 25 Oct 2016 11:09:06 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477393746.96.0.443959067259.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: Ah, I see. Ok then, see the new patch. ---------- Added file: http://bugs.python.org/file45216/webbrowser.py-3.5-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 07:35:36 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 11:35:36 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <20161025113533.18383.35726.D684FB1D@psf.io> Roundup Robot added the comment: New changeset fe1fea4ded04 by Serhiy Storchaka in branch '3.5': Issue #28353: os.fwalk() no longer fails on broken links. https://hg.python.org/cpython/rev/fe1fea4ded04 New changeset e99ec3c77a63 by Serhiy Storchaka in branch '3.6': Issue #28353: os.fwalk() no longer fails on broken links. https://hg.python.org/cpython/rev/e99ec3c77a63 New changeset 33a1a3dd0051 by Serhiy Storchaka in branch 'default': Issue #28353: os.fwalk() no longer fails on broken links. https://hg.python.org/cpython/rev/33a1a3dd0051 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 07:42:35 2016 From: report at bugs.python.org (Michael Foord) Date: Tue, 25 Oct 2016 11:42:35 +0000 Subject: [issue28054] Diff for visually comparing actual with expected in mock.assert_called_with. In-Reply-To: <1473461073.51.0.19108692382.issue28054@psf.upfronthosting.co.za> Message-ID: <1477395755.67.0.0060405958753.issue28054@psf.upfronthosting.co.za> Michael Foord added the comment: I like the idea and would be happy for it to be added to mock. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 07:48:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 11:48:11 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <20161025114807.32787.39327.64711922@psf.io> Roundup Robot added the comment: New changeset fcabef0ce773 by Serhiy Storchaka in branch '3.5': Issue #20491: The textwrap.TextWrapper class now honors non-breaking spaces. https://hg.python.org/cpython/rev/fcabef0ce773 New changeset bfa400108fc5 by Serhiy Storchaka in branch '3.6': Issue #20491: The textwrap.TextWrapper class now honors non-breaking spaces. https://hg.python.org/cpython/rev/bfa400108fc5 New changeset b86dacb9e668 by Serhiy Storchaka in branch 'default': Issue #20491: The textwrap.TextWrapper class now honors non-breaking spaces. https://hg.python.org/cpython/rev/b86dacb9e668 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 07:48:32 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 11:48:32 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1477396112.57.0.745279608191.issue20491@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 08:04:31 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 12:04:31 +0000 Subject: [issue28255] TextCalendar.prweek/month/year outputs an extra whitespace character In-Reply-To: <1474620667.82.0.649697112253.issue28255@psf.upfronthosting.co.za> Message-ID: <20161025120427.17005.85062.30E6F8E8@psf.io> Roundup Robot added the comment: New changeset 8d54c2a1c796 by Serhiy Storchaka in branch '3.5': Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space https://hg.python.org/cpython/rev/8d54c2a1c796 New changeset ebe5bd33f86f by Serhiy Storchaka in branch '3.6': Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space https://hg.python.org/cpython/rev/ebe5bd33f86f New changeset 049e58f74272 by Serhiy Storchaka in branch 'default': Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space https://hg.python.org/cpython/rev/049e58f74272 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 08:21:20 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 12:21:20 +0000 Subject: [issue28255] TextCalendar.prweek/month/year outputs an extra whitespace character In-Reply-To: <1474620667.82.0.649697112253.issue28255@psf.upfronthosting.co.za> Message-ID: <20161025122117.11801.33237.C38D1780@psf.io> Roundup Robot added the comment: New changeset 4a3892f49e1a by Serhiy Storchaka in branch 'default': Issue #28255: calendar.TextCalendar.prweek() no longer prints a space after https://hg.python.org/cpython/rev/4a3892f49e1a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 08:23:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 12:23:07 +0000 Subject: [issue28255] TextCalendar.prweek/month/year outputs an extra whitespace character In-Reply-To: <1474620667.82.0.649697112253.issue28255@psf.upfronthosting.co.za> Message-ID: <1477398187.52.0.645198552237.issue28255@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: prweek() and pryear() are changed only in 3.7. If this breaks somebody's code, there is enough time to update this code or rollback changes. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 08:25:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 12:25:19 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477398319.22.0.400461479178.issue23262@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests are failed with webbrowser.py-3.5-newfox.patch. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 08:32:37 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 12:32:37 +0000 Subject: [issue27275] KeyError thrown by optimised collections.OrderedDict.popitem() In-Reply-To: <1465446835.8.0.930561202137.issue27275@psf.upfronthosting.co.za> Message-ID: <1477398757.83.0.151394313965.issue27275@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 08:35:53 2016 From: report at bugs.python.org (Oleg Broytman) Date: Tue, 25 Oct 2016 12:35:53 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477398953.94.0.996904126178.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: What's the error? Buildbot URL? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 08:38:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 12:38:50 +0000 Subject: [issue27275] KeyError thrown by optimised collections.OrderedDict.popitem() In-Reply-To: <1465446835.8.0.930561202137.issue27275@psf.upfronthosting.co.za> Message-ID: <20161025123846.11987.3133.A9F038BE@psf.io> Roundup Robot added the comment: New changeset 9f7505019767 by Serhiy Storchaka in branch '3.5': Issue #27275: Fixed implementation of pop() and popitem() methods in https://hg.python.org/cpython/rev/9f7505019767 New changeset 2def8a24c299 by Serhiy Storchaka in branch '3.6': Issue #27275: Fixed implementation of pop() and popitem() methods in https://hg.python.org/cpython/rev/2def8a24c299 New changeset 19e199038704 by Serhiy Storchaka in branch 'default': Issue #27275: Fixed implementation of pop() and popitem() methods in https://hg.python.org/cpython/rev/19e199038704 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 08:42:34 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 12:42:34 +0000 Subject: [issue27268] Incorrect error message on float('') In-Reply-To: <1465396464.66.0.148764915141.issue27268@psf.upfronthosting.co.za> Message-ID: <1477399354.78.0.961902977863.issue27268@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 09:12:03 2016 From: report at bugs.python.org (Thomas Kluyver) Date: Tue, 25 Oct 2016 13:12:03 +0000 Subject: [issue28528] Pdb.checkline() Message-ID: <1477401123.41.0.136094342663.issue28528@psf.upfronthosting.co.za> New submission from Thomas Kluyver: Pdb.checkline() does a hasattr() check to protect against self.curframe not existing. self.curframe can also be None (if self.forget() or self.reset() was called), but checkline() does not handle this. The attached patch treats self.curframe == None as equivalent to the attribute being absent. Background: http://bugs.python.org/issue9230 https://github.com/ipython/ipython/issues/10028 (Georg, I've nosy-listed you as I saw your name on a couple of similar issues; I hope you don't mind) ---------- components: Library (Lib) files: pdb-reset-checkline.patch keywords: patch messages: 279402 nosy: georg.brandl, takluyver priority: normal severity: normal status: open title: Pdb.checkline() type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45217/pdb-reset-checkline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 09:28:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 13:28:57 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477402137.34.0.402467766689.issue23262@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: $ ./python -m test.regrtest -vuall test_webbrowser ... ====================================================================== FAIL: test_open (test.test_webbrowser.MozillaCommandTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython-3.5/Lib/test/test_webbrowser.py", line 99, in test_open arguments=['openURL({})'.format(URL)]) File "/home/serhiy/py/cpython-3.5/Lib/test/test_webbrowser.py", line 42, in _test self.assertIn(option, popen_args) AssertionError: '-raise' not found in ['http://www.example.com'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 09:32:18 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Oct 2016 13:32:18 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail In-Reply-To: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> Message-ID: <1477402338.13.0.62232531292.issue28430@psf.upfronthosting.co.za> Terry J. Reedy added the comment: +- Issue #28430: Fix iterator of C implemented asyncio.Future doesn't accept + non-None value is passed to it.send(val). This NEWS entry is not a coherent English sentence. Please revise. I don't understand it well enough to suggest a revision, but would review a replacement. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 09:38:08 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 25 Oct 2016 13:38:08 +0000 Subject: [issue27275] KeyError thrown by optimised collections.OrderedDict.popitem() In-Reply-To: <1465446835.8.0.930561202137.issue27275@psf.upfronthosting.co.za> Message-ID: <1477402688.64.0.937277306512.issue27275@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Serhiy, doesn't this patch "fix" the issue by making subclasses with custom __getitem__/__delitem__ implementations not have them invoked by the superclass's pop/popitem? The old code meant that pop and popitem didn't need to be overridden even if you overrode __getitem__/__delitem__ in a way that differed from the default (e.g. __setitem__ might add some tracking data to the value that __getitem__ strips). Now they must be overwritten. The expiringdict's flaw seems to be that its __contains__ call and its __getitem__ are not idempotent, which the original code assumed (reasonably) they would be. The original code should probably be restored here. The general PyObject_GetItem/DelItem are needed to work with arbitrary subclasses correctly. The Sequence_Contains check is needed to avoid accidentally invoking __missing__ (though if __missing__ is not defined for the subclass, the Sequence_Contains check could be skipped). The only reason OrderedDict has the problem and dict doesn't is that OrderedDict was trying to be subclassing friendly (perhaps to ensure it remains compatible with code that subclassed the old Python implementation), while dict makes no such efforts. dict happily bypasses custom __getitem__/__delitem__ calls when it uses pop/popitem. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 09:39:36 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 25 Oct 2016 13:39:36 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail In-Reply-To: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> Message-ID: <1477402776.95.0.782866802377.issue28430@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm sorry about my bad English. > Fix iterator of C implemented asyncio.Future This meant: fut = asyncio.Future() # C implemented version of asyncio.Future it = iter(fut) # Iterator of it it.send(42) # raised TypeError before. It was not compatible with Python version of asyncio.Future ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 09:45:01 2016 From: report at bugs.python.org (Oleg Broytman) Date: Tue, 25 Oct 2016 13:45:01 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477403101.4.0.257701929669.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: Oops, yes, mea culpa, sorry. Patch for the test added. ---------- Added file: http://bugs.python.org/file45218/test_webbrowser.py-3.5-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 10:31:17 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 25 Oct 2016 14:31:17 +0000 Subject: [issue27275] KeyError thrown by optimised collections.OrderedDict.popitem() In-Reply-To: <1465446835.8.0.930561202137.issue27275@psf.upfronthosting.co.za> Message-ID: <1477405877.21.0.834421053007.issue27275@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Explaining expiringdict's issue: It's two race conditions, with itself, not another thread. Example scenario (narrow race window): 1. An entry has an expiry time of X (so it will self-delete at time X or later) 2. At time X-1, the PySequence_Contains check is run, and it returns 1 (true) 3. Because contains returned True, at time X PyObject_GetItem is run, but because it's time X, expiringdict's __getitem__ deletes the entry and raises KeyError An alternative scenario with a *huge* race window is: 1. An entry has an expiry time of X (so it will self-delete at time X or later) 2. No lookups or membership tests or any other operations that implicitly clean the expiring dict occur for a while 3. At time X+1000, _odict_FIRST (in popitem) grabs the first entry in the OrderedDict without invoking the __contains__ machinery that would delete the entry 3. At time X+1000 or so, the PySequence_Contains check is run, and it returns 0 (false), because the __contains__ machinery is invoked, and again, because no default is provided for popitem, a KeyError is raised (this time by the popitem machinery, not __getitem__) expiringdict is unusually good at bringing this on itself. The failing popitem call is in __setitem__ for limited length expiringdicts, self.popitem(last=False), where they're intentionally removing the oldest entry, when the oldest entry is the most likely to have expired (and since __len__ isn't overridden to expire old entries, it may have been expired for quite a while). The del self[next(OrderedDict.__iter__(self))] works because they didn't override __iter__, so it's not expiring anything to get the first item, and therefore only __delitem__ is involved, not __contains__ or __getitem__ (note: This is also why the bug they reference has an issue with "OrderedDict mutated during iteration"; iteration returns long expired keys, but looking the expired keys up deletes them, causing the mutation issue). Possible correct fixes: 1. Make popitem _more_ subclass friendly; when it's an OrderedDict subclass, instead of using _odict_LAST and _odict_FIRST, use (C equivalent) of `next(reversed(self))` and `next(iter(self))` respectively. This won't fix expiringdict as is (because it's broken by design; it doesn't override __iter__, so it will happily return long expired keys that disappear on access), but if we're going for subclass friendliness and allowing non-idempotent __contains__/__getitem__/__iter__ implementations, it's the right thing to do. If expiringdict implemented __iter__ to copy the keys, then loop over the copy, deleting expired values and yielding unexpired values, this would at least reduce the huge race window to a narrow window (because it could still yield a key that's almost expired) 2. Check for the presence of __missing__ on the type and only perform the PySequence_Contains check if __missing__ is defined (to avoid autovivification). This fixes the narrow race condition for subclasses without __missing__, but not the huge race condition 3. Explicitly document the idempotence assumptions made by OrderedDict (specifically, that all non-mutating methods of OrderedDict must not be made mutating in subclasses unless the caller also overrides all multistep operations, e.g. pop/popitem/setdefault). TL;DR: expiringdict is doing terrible things, assuming the superclass will handle them even though the superclass has completely different assumptions, and therefore expiringdict has only itself to blame. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 10:41:36 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 25 Oct 2016 14:41:36 +0000 Subject: [issue28526] Use PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedObject In-Reply-To: <1477384958.56.0.348226525615.issue28526@psf.upfronthosting.co.za> Message-ID: <1477406496.12.0.120062205454.issue28526@psf.upfronthosting.co.za> Josh Rosenberg added the comment: LGTM. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 10:57:20 2016 From: report at bugs.python.org (=?utf-8?b?SsOhY2h5bSBCYXJ2w61uZWs=?=) Date: Tue, 25 Oct 2016 14:57:20 +0000 Subject: [issue28529] 0 ** 0 should raise ArithmeticError Message-ID: <1477407440.28.0.0137901143197.issue28529@psf.upfronthosting.co.za> New submission from J?chym Barv?nek: 0 ** 0 is mathematically undefined and equivalent to 0/0. 0/0 correctly raises ZeroDivisionError, but 0 ** 0 == 1. Also 0.0 ** 0 == 0 ** 0.0 == 0.0 ** 0.0 == 0.0. Similarly for math.pow. ---------- components: Interpreter Core messages: 279410 nosy: J?chym Barv?nek priority: normal severity: normal status: open title: 0 ** 0 should raise ArithmeticError versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 10:58:42 2016 From: report at bugs.python.org (=?utf-8?b?SsOhY2h5bSBCYXJ2w61uZWs=?=) Date: Tue, 25 Oct 2016 14:58:42 +0000 Subject: [issue28529] 0 ** 0 should raise ArithmeticError In-Reply-To: <1477407440.28.0.0137901143197.issue28529@psf.upfronthosting.co.za> Message-ID: <1477407522.55.0.244255034084.issue28529@psf.upfronthosting.co.za> J?chym Barv?nek added the comment: Sorry, It should be 0.0 ** 0 == 0 ** 0.0 == 0.0 ** 0.0 == 1.0 of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 10:59:16 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 25 Oct 2016 14:59:16 +0000 Subject: [issue27495] Pretty printing sorting for set and frozenset instances In-Reply-To: <1468323029.69.0.352634397545.issue27495@psf.upfronthosting.co.za> Message-ID: <1477407556.43.0.722387331677.issue27495@psf.upfronthosting.co.za> Steven D'Aprano added the comment: There seems to be consensus that this should be treated as a bug fix, not a new feature. Could this still make it into 3.6 even though it missed the first beta? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 11:18:41 2016 From: report at bugs.python.org (Tim Peters) Date: Tue, 25 Oct 2016 15:18:41 +0000 Subject: [issue28529] 0 ** 0 should raise ArithmeticError In-Reply-To: <1477407440.28.0.0137901143197.issue28529@psf.upfronthosting.co.za> Message-ID: <1477408721.3.0.556885224637.issue28529@psf.upfronthosting.co.za> Tim Peters added the comment: This won't be changed - it's a near-universally mandated behavior across relevant standards. Many years ago it wasn't, but Knuth changed minds when he wrote: """ We must define x^0=1 for all x, if the binomial theorem is to be valid when x=0 , y=0 , and/or x=-y . The theorem is too important to be arbitrarily restricted! """ More here: https://www.quora.com/Why-does-Python-return-1-for-pow-0-0-which-is-mathematically-wrong ---------- nosy: +tim.peters resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 11:24:49 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 15:24:49 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1477409089.34.0.118379259945.issue28029@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Interestingly, initially string.replace() was implemented in terms of split/join. string.replace(s, '', s2, n) returned s for any s, s2 and n. After making replace() a method of str, in aca7b5eaf5e8 (1999-10-12), it became raising ValueError for empty pattern string. Since 762dd09edb83 (issue599128, 2002-08-23) it supports zero-length pattern string. str.replace('', s1, s2, n) returned '' for any s1, s2 and n. New implementation added in 41809406a35e (2006-05-25) made str.replace('', '', 'x', -1) returning 'x' while str.replace('', '', 'x', 1) still returns ''. As you can see, the behavior of replacing with empty pattern is not stable. It was changed several times. Maybe it is a time for new change. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 11:46:16 2016 From: report at bugs.python.org (stephan) Date: Tue, 25 Oct 2016 15:46:16 +0000 Subject: [issue28530] Howto detect if an object is of type os.DirEntry Message-ID: <1477410376.41.0.315236150527.issue28530@psf.upfronthosting.co.za> New submission from stephan: I have a small problem with python 3.5.2 64bit on win7 64 bit: I cannot check if an object is of type DirEntry (os.DirEntry or nt.DirEntry). Did I misunderstand something or what is wrong? Here is a log of my console: ----------------------------------------- In [63]: sd = os.scandir(".") In [64]: de = next(sd) In [65]: type(de) Out[65]: nt.DirEntry In [66]: import nt In [67]: nt.DirEntry --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in () ----> 1 nt.DirEntry AttributeError: module 'nt' has no attribute 'DirEntry' In [68]: os.DirEntry --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in () ----> 1 os.DirEntry AttributeError: module 'os' has no attribute 'DirEntry' In [69]: ------------------------------------------ ---------- messages: 279415 nosy: stephan priority: normal severity: normal status: open title: Howto detect if an object is of type os.DirEntry versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 11:50:54 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 25 Oct 2016 15:50:54 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477410654.74.0.243701874065.issue25002@psf.upfronthosting.co.za> Guido van Rossum added the comment: Applied: remote: notified python-checkins at python.org of incoming changeset bb23770f82f1 remote: notified python-checkins at python.org of incoming changeset 3b8dfe6f5bcb ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 11:57:15 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 15:57:15 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <20161025154953.12034.77641.CE4ACF40@psf.io> Roundup Robot added the comment: New changeset bb23770f82f1 by Guido van Rossum in branch '3.6': Issue 25002: Deprecate asyncore/asynchat. Patch by Mariatta. https://hg.python.org/cpython/rev/bb23770f82f1 New changeset 3b8dfe6f5bcb by Guido van Rossum in branch 'default': Issue 25002: Deprecate asyncore/asynchat. Patch by Mariatta. (3.6->3.7) https://hg.python.org/cpython/rev/3b8dfe6f5bcb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 12:03:55 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 16:03:55 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <20161025160337.16771.85705.13B2E0E8@psf.io> Roundup Robot added the comment: New changeset ec12e16ea6a1 by Serhiy Storchaka in branch '3.6': Issue #28353: Try to fix tests. https://hg.python.org/cpython/rev/ec12e16ea6a1 New changeset a0913dbadea6 by Serhiy Storchaka in branch 'default': Issue #28353: Try to fix tests. https://hg.python.org/cpython/rev/a0913dbadea6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 12:16:46 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 25 Oct 2016 16:16:46 +0000 Subject: [issue28531] Improve utf7 encoder memory usage Message-ID: <1477412206.88.0.583380682603.issue28531@psf.upfronthosting.co.za> New submission from Xiang Zhang: Currently utf7 encoder uses an aggressive memory allocation strategy: use the worst case 8. We can tighten the worst case. For 1 byte and 2 byte unicodes, the worst case could be 3*n + 2. For 4 byte unicodes, the worst case could be 6*n + 2. There are 2 cases. First, all characters needs to be encoded, the result length should be upper_round(2.67*n) + 2 <= 3*n + 2. Second, encode and not encode characters appear one by one. For even length, it's 3n < 3n + 2. For odd length, it's exactly 3n + 2. This won't benefit much when the string is short. But when the string is long, it speeds up. Without patch: [bin]$ ./python3 -m perf timeit -s 's = "abc"*10' 's.encode("utf7")' .................... Median +- std dev: 2.79 us +- 0.09 us [bin]$ ./python3 -m perf timeit -s 's = "abc"*100' 's.encode("utf7")' .................... Median +- std dev: 4.55 us +- 0.13 us [bin]$ ./python3 -m perf timeit -s 's = "abc"*1000' 's.encode("utf7")' .................... Median +- std dev: 14.0 us +- 0.4 us [bin]$ ./python3 -m perf timeit -s 's = "abc"*10000' 's.encode("utf7")' .................... Median +- std dev: 178 us +- 1 us With patch: [bin]$ ./python3 -m perf timeit -s 's = "abc"*10' 's.encode("utf7")' .................... Median +- std dev: 2.87 us +- 0.09 us [bin]$ ./python3 -m perf timeit -s 's = "abc"*100' 's.encode("utf7")' .................... Median +- std dev: 4.50 us +- 0.23 us [bin]$ ./python3 -m perf timeit -s 's = "abc"*1000' 's.encode("utf7")' .................... Median +- std dev: 13.3 us +- 0.4 us [bin]$ ./python3 -m perf timeit -s 's = "abc"*10000' 's.encode("utf7")' .................... Median +- std dev: 102 us +- 1 us The patch also removes a check, base64bits can only be not 0 when inShift is not 0. ---------- components: Interpreter Core files: utf7_encoder.patch keywords: patch messages: 279419 nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Improve utf7 encoder memory usage type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45219/utf7_encoder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 12:30:00 2016 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Oct 2016 16:30:00 +0000 Subject: [issue28531] Improve utf7 encoder memory usage In-Reply-To: <1477412206.88.0.583380682603.issue28531@psf.upfronthosting.co.za> Message-ID: <1477413000.22.0.41894407953.issue28531@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 12:33:28 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 25 Oct 2016 16:33:28 +0000 Subject: [issue28531] Improve utf7 encoder memory usage In-Reply-To: <1477412206.88.0.583380682603.issue28531@psf.upfronthosting.co.za> Message-ID: <1477413208.04.0.0927995402671.issue28531@psf.upfronthosting.co.za> Changes by Xiang Zhang : Removed file: http://bugs.python.org/file45219/utf7_encoder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 12:33:37 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 25 Oct 2016 16:33:37 +0000 Subject: [issue28531] Improve utf7 encoder memory usage In-Reply-To: <1477412206.88.0.583380682603.issue28531@psf.upfronthosting.co.za> Message-ID: <1477413217.02.0.265548413471.issue28531@psf.upfronthosting.co.za> Changes by Xiang Zhang : Added file: http://bugs.python.org/file45220/utf7_encoder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 12:39:46 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 25 Oct 2016 16:39:46 +0000 Subject: [issue20847] asyncio docs should call out that network logging is a no-no In-Reply-To: <1393877540.32.0.826428021059.issue20847@psf.upfronthosting.co.za> Message-ID: <1477413586.22.0.366840254166.issue20847@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 12:54:43 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 25 Oct 2016 16:54:43 +0000 Subject: [issue28107] Update typing module documentation for NamedTuple In-Reply-To: <1473707242.23.0.095655840586.issue28107@psf.upfronthosting.co.za> Message-ID: <1477414483.49.0.46855274075.issue28107@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks, applied! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 12:54:52 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 16:54:52 +0000 Subject: [issue28107] Update typing module documentation for NamedTuple In-Reply-To: <1473707242.23.0.095655840586.issue28107@psf.upfronthosting.co.za> Message-ID: <20161025165422.25214.40102.9FE0FECE@psf.io> Roundup Robot added the comment: New changeset 78c0487562d9 by Guido van Rossum in branch '3.6': Issue #28107: Update typing module documentation for NamedTuple (Ivan) https://hg.python.org/cpython/rev/78c0487562d9 New changeset 709b19b9d6ea by Guido van Rossum in branch 'default': Issue #28107: Update typing module documentation for NamedTuple (Ivan) (3.6->3.7) https://hg.python.org/cpython/rev/709b19b9d6ea ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:20:52 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 17:20:52 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <20161025172046.32813.169.C8EEE88F@psf.io> Roundup Robot added the comment: New changeset 470224ec16b6 by Serhiy Storchaka in branch '3.5': Issue #28353: Fixed tests of os.fwalk() with broken links. https://hg.python.org/cpython/rev/470224ec16b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:29:38 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 25 Oct 2016 17:29:38 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477416578.79.0.767088109423.issue28522@psf.upfronthosting.co.za> Steve Dower added the comment: Can you tell me more about the crash? It doesn't cause a crash when I try it with my own install. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:30:35 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 17:30:35 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477416635.22.0.728096846555.issue25002@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This change broke buildbots. $ ./python -We -m test.regrtest test_os Run tests sequentially 0:00:00 [1/1] test_os test test_os crashed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/libregrtest/runtest.py", line 151, in runtest_inner the_module = importlib.import_module(abstest) File "/home/serhiy/py/cpython/Lib/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 978, in _gcd_import File "", line 961, in _find_and_load File "", line 950, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 677, in exec_module File "", line 205, in _call_with_frames_removed File "/home/serhiy/py/cpython/Lib/test/test_os.py", line 5, in import asynchat File "/home/serhiy/py/cpython/Lib/asynchat.py", line 48, in import asyncore File "/home/serhiy/py/cpython/Lib/asyncore.py", line 65, in PendingDeprecationWarning, stacklevel=2) PendingDeprecationWarning: asyncore module is deprecated in 3.6. Use asyncio instead. test_os failed 1 test failed: test_os Total duration: 59 ms Tests result: FAILURE ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:31:35 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 17:31:35 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477416695.15.0.591800942296.issue25002@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:43:03 2016 From: report at bugs.python.org (Big Stone) Date: Tue, 25 Oct 2016 17:43:03 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477417383.65.0.783600559478.issue28522@psf.upfronthosting.co.za> Big Stone added the comment: I just see a windows screen poping up with (translated from french) "Python has stopped to work" a problem caused this program to stop working correctly. Windows is going to close this program and will inform you if a solution is available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:47:33 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Oct 2016 17:47:33 +0000 Subject: [issue28530] Howto detect if an object is of type os.DirEntry In-Reply-To: <1477410376.41.0.315236150527.issue28530@psf.upfronthosting.co.za> Message-ID: <1477417653.33.0.162175008748.issue28530@psf.upfronthosting.co.za> R. David Murray added the comment: Out of curiosity, what is your use case? You can grab an object you know is a DirEntry and take its type to get a type object to use in, for example, isinstance. posix.DirEntry is exposed...either nt.DirEntry should be too, or the posix one shouldn't be, and/or there should be an os.DirEntry superclass. So, something isn't quite right here no matter how you look at it, IMO. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:50:08 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 25 Oct 2016 17:50:08 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1477417808.47.0.126546078093.issue28333@psf.upfronthosting.co.za> Steve Dower added the comment: Not sure how I missed it originally, but that extra 1 char is actually very important: Python 3.6.0b2 (v3.6.0b2:b9fadc7d1c3f, Oct 10 2016, 20:36:51) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.ps1='> ' > sys The extra space is because of that. Really ought to fix this before the next beta. ---------- assignee: -> steve.dower nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:51:01 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 25 Oct 2016 17:51:01 +0000 Subject: [issue28532] Show sys.version when -V option is supplied twice. Message-ID: <1477417861.44.0.42778795289.issue28532@psf.upfronthosting.co.za> New submission from INADA Naoki: As discussed on python-dev, this patch adds -VV option to python cmdline. $ ./python -V Python 3.6.0b2+ $ ./python -VV Python 3.6.0b2+ (3.6:84a3c5003510+, Oct 26 2016, 02:47:38) [GCC 6.2.0 20161005] The patch includes doc and man update. Please see, especially my English. ---------- assignee: inada.naoki components: Interpreter Core files: verbose-version.patch keywords: patch messages: 279428 nosy: inada.naoki priority: normal severity: normal status: open title: Show sys.version when -V option is supplied twice. type: behavior versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45221/verbose-version.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:54:28 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 25 Oct 2016 17:54:28 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477418068.2.0.384415163154.issue25002@psf.upfronthosting.co.za> Guido van Rossum added the comment: Sorry about that. Should I roll it back or is there a way to make the test pass (expect this deprecation)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:55:11 2016 From: report at bugs.python.org (Kamran) Date: Tue, 25 Oct 2016 17:55:11 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: <1477335924.8.0.73614926816.issue28514@psf.upfronthosting.co.za> Message-ID: Kamran added the comment: To Ned Deily I am using Python 3.2.3 because I use it at schoolo and my teacher said use this. Also because I do not know how to use any other model other than this because I was taught this at school. ANY SUGGESTIONS???? THANKS *Kamran Muhammad* On Mon, Oct 24, 2016 at 8:05 PM, Eryk Sun wrote: > > Eryk Sun added the comment: > > > Windows 7 is very old. > > 3.8 will probably be the last Python version to support Windows 7 (2020-01 > EOL). 3.6 is the last to support Vista. > > ---------- > nosy: +eryksun > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:58:15 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 25 Oct 2016 17:58:15 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477418295.13.0.112356978002.issue28522@psf.upfronthosting.co.za> Steve Dower added the comment: Check in the Event Log viewer to see if there is an "Application Error" entry for python.exe. Also, if you run python.exe from a command prompt there may be more information displayed in the output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:59:04 2016 From: report at bugs.python.org (Eryk Sun) Date: Tue, 25 Oct 2016 17:59:04 +0000 Subject: [issue28530] Howto detect if an object is of type os.DirEntry In-Reply-To: <1477410376.41.0.315236150527.issue28530@psf.upfronthosting.co.za> Message-ID: <1477418344.96.0.198919040015.issue28530@psf.upfronthosting.co.za> Eryk Sun added the comment: os.DirEntry exists in 3.6, but the change wasn't backported to 3.5. See issue 27038. As a workaround, you can scan a non-empty directory to get a reference to the DirEntry type, e.g.: import os import tempfile with tempfile.NamedTemporaryFile() as f: path = os.path.dirname(f.name) DirEntry = type(next(os.scandir(path))) ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 13:59:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 17:59:52 +0000 Subject: [issue27275] KeyError thrown by optimised collections.OrderedDict.popitem() In-Reply-To: <1465446835.8.0.930561202137.issue27275@psf.upfronthosting.co.za> Message-ID: <1477418392.38.0.714677118643.issue27275@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, what is the reason for this code! But Python implementation of popitem() don't call overridden __getitem__/__delitem__. It uses dict.pop(). Simplified C implementation is closer to Python implementation. expiringdict is not the only implementation broken by accelerated OrderedDict. See other example in issue28014. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:01:41 2016 From: report at bugs.python.org (Aristotel) Date: Tue, 25 Oct 2016 18:01:41 +0000 Subject: [issue28259] Ctypes bug windows In-Reply-To: <1474647946.24.0.533944480109.issue28259@psf.upfronthosting.co.za> Message-ID: <1477418501.11.0.847442466793.issue28259@psf.upfronthosting.co.za> Aristotel added the comment: Sorry for delay. I tried to write as small as possible example. Sorry if it is too big Usage: run 2 consoles, cd to dir with sources. In first console type 'python3 main.py test1.tox', and in second type 'python3 main.py test2.tox'. Wait 1-2 min until apps connect and you will see a lot of "access violation reading 0x0000" when consoles start video call. sometimes apps crashes too. crashes fine on both win 7 an win 8 for me ---------- Added file: http://bugs.python.org/file45222/toxygen_video_test.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:08:15 2016 From: report at bugs.python.org (Eryk Sun) Date: Tue, 25 Oct 2016 18:08:15 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1477418895.84.0.101911103508.issue28333@psf.upfronthosting.co.za> Eryk Sun added the comment: I forgot to include the link to the python-list thread where this came up: https://mail.python.org/pipermail/python-list/2016-October/715428.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:11:25 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 18:11:25 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477419085.15.0.0890184477221.issue25002@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think replacing import asynchat import asyncore with with warnings.catch_warnings(): warnings.simplefilter('ignore', PendingDeprecationWarning) import asynchat import asyncore can help. asynchat and asyncore are used in several tests. In long term asynchat and asyncore should be replaced with alternatives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:17:35 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Oct 2016 18:17:35 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477419455.81.0.128240174768.issue25002@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Sorry about this Serhiy. I can work on another patch based on your code snippet later today. Should I create a different ticket about replacing asyncore and asynchat? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:26:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 18:26:20 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477419980.89.0.674955032404.issue25002@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Should I create a different ticket about replacing asyncore and asynchat? This may require several tickets, one per case. ---------- components: +Library (Lib) resolution: fixed -> stage: -> needs patch type: -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:32:04 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Oct 2016 18:32:04 +0000 Subject: [issue28533] Replace asyncore Message-ID: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> New submission from Mariatta Wijaya: Deprecation warning was added to asyncore in https://bugs.python.org/issue25002 asyncore is still used in several tests and should be replaced. ---------- messages: 279439 nosy: Mariatta priority: normal severity: normal status: open title: Replace asyncore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:32:33 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 18:32:33 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477420353.72.0.11886708394.issue25002@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, asyncore/asynchat are used in smtpd! It looks to me that we should first write asyncio alternative to smtpd, then deprecate smtpd, and only after this we can deprecate asyncore/asynchat. ---------- dependencies: +Deprecate smtpd (based on deprecated asyncore/asynchat): write a new smtp server with asyncio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:32:53 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Oct 2016 18:32:53 +0000 Subject: [issue28534] Replace asynchat Message-ID: <1477420373.21.0.38842063017.issue28534@psf.upfronthosting.co.za> New submission from Mariatta Wijaya: Deprecation warning was added to asynchat in https://bugs.python.org/issue25002 asynchat is still used in several tests and should be replaced. ---------- components: asyncio messages: 279441 nosy: Mariatta, gvanrossum, yselivanov priority: normal severity: normal status: open title: Replace asynchat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:33:12 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Oct 2016 18:33:12 +0000 Subject: [issue28533] Replace asyncore In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1477420392.44.0.40320077644.issue28533@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- components: +asyncio nosy: +gvanrossum, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:34:16 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 25 Oct 2016 18:34:16 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477420456.1.0.297820058556.issue25002@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks Serhiy, I created these two tickets: https://bugs.python.org/issue28534 https://bugs.python.org/issue28533 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:36:19 2016 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 25 Oct 2016 18:36:19 +0000 Subject: [issue28529] 0 ** 0 should raise ArithmeticError In-Reply-To: <1477407440.28.0.0137901143197.issue28529@psf.upfronthosting.co.za> Message-ID: <1477420579.98.0.126173708607.issue28529@psf.upfronthosting.co.za> Mark Dickinson added the comment: Also, https://en.wikipedia.org/wiki/Exponentiation#Zero_to_the_power_of_zero ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:41:54 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 18:41:54 +0000 Subject: [issue17711] Persistent id in pickle with protocol version 0 In-Reply-To: <1365853309.55.0.468755952624.issue17711@psf.upfronthosting.co.za> Message-ID: <1477420914.31.0.0637398035136.issue17711@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:43:51 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 18:43:51 +0000 Subject: [issue14061] Misc fixes and cleanups in archiving code in shutil and test_shutil In-Reply-To: <1329705067.15.0.02936958618.issue14061@psf.upfronthosting.co.za> Message-ID: <1477421031.15.0.839911623758.issue14061@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:45:01 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 18:45:01 +0000 Subject: [issue27517] LZMACompressor and LZMADecompressor raise exceptions if given empty strings twice In-Reply-To: <1468544610.85.0.0793383244022.issue27517@psf.upfronthosting.co.za> Message-ID: <1477421101.23.0.0982804705046.issue27517@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:51:17 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Oct 2016 18:51:17 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477421477.7.0.0156441193188.issue25002@psf.upfronthosting.co.za> R. David Murray added the comment: The alternative has already been written: aiosmtpd, in the aiolibs project. The question is should it be added to the stdlib... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:52:32 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 18:52:32 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <20161025185229.109799.20909.9A7FF24E@psf.io> Roundup Robot added the comment: New changeset 6b46c3deea2c by Steve Dower in branch '3.6': Issue #28333: Fixes off-by-one error that was adding an extra space. https://hg.python.org/cpython/rev/6b46c3deea2c New changeset 44d15ba67d2e by Steve Dower in branch 'default': Issue #28333: Fixes off-by-one error that was adding an extra space. https://hg.python.org/cpython/rev/44d15ba67d2e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:52:52 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 25 Oct 2016 18:52:52 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1477421572.88.0.0835942820178.issue28333@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 14:57:41 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 25 Oct 2016 18:57:41 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477421861.65.0.495249174127.issue28199@psf.upfronthosting.co.za> INADA Naoki added the comment: @haypo, could you review this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 15:05:25 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 25 Oct 2016 19:05:25 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1477422325.43.0.617527922598.issue28509@psf.upfronthosting.co.za> INADA Naoki added the comment: script: import sys for i in range(25): a = {} b = {j: j for j in range(i)} a.update(b) print(i, sys.getsizeof(a)) before: 0 256 1 256 2 256 3 256 4 256 5 256 6 384 7 384 8 664 9 664 10 664 11 664 12 664 13 664 14 664 15 664 16 1200 17 1200 18 1200 19 1200 20 1200 21 1200 22 1200 23 1200 24 1200 patched: 0 256 1 256 2 256 3 256 4 256 5 256 6 384 7 384 8 384 9 384 10 384 11 664 12 664 13 664 14 664 15 664 16 664 17 664 18 664 19 664 20 664 21 664 22 1200 23 1200 24 1200 ---------- keywords: +patch Added file: http://bugs.python.org/file45223/28509-smaller-update.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 15:10:28 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Oct 2016 19:10:28 +0000 Subject: [issue28514] Python (IDLE?) freezes on file save on Windows In-Reply-To: Message-ID: <1477422628.13.0.274563382413.issue28514@psf.upfronthosting.co.za> Ned Deily added the comment: You need more assistance than we can give here on the issue tracker. Please look at the help resources here: https://www.python.org/about/help/. In particular, you could try asking on the tutor mailing list: https://mail.python.org/mailman/listinfo/tutor. Good luck! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 15:15:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 19:15:27 +0000 Subject: [issue28387] double free in io.TextIOWrapper In-Reply-To: <1475868777.61.0.59647562301.issue28387@psf.upfronthosting.co.za> Message-ID: <1477422927.46.0.854276531824.issue28387@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 15:17:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 19:17:57 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1477423077.57.0.472950118193.issue28509@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 15:22:16 2016 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 25 Oct 2016 19:22:16 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477423336.36.0.990210406657.issue25002@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 15:30:07 2016 From: report at bugs.python.org (Carl Meyer) Date: Tue, 25 Oct 2016 19:30:07 +0000 Subject: [issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression) In-Reply-To: <1464176880.25.0.308106356091.issue27122@psf.upfronthosting.co.za> Message-ID: <1477423807.76.0.28309214913.issue27122@psf.upfronthosting.co.za> Carl Meyer added the comment: Greg, there was also a (different!) typo of the issue number in the code comment committed with this fix; that typo hasn't been fixed. Sent me on quite the chase looking for this bug. (I tracked down the bug independently, then wasn't able to repro it on trunk and found your fix and code comment). It's an impressive achievement to typo the same bug ID two different ways within the same twelve-line patch! ;-) ---------- nosy: +carljm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 15:32:51 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 25 Oct 2016 19:32:51 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1477423336.39.0.940917657551.issue25002@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Serhiy, so should I revert this patch for now? Or are the silent deprecation warnings outside the test suite okay? (In that case, maybe Mariatta can upload a patch?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 15:49:07 2016 From: report at bugs.python.org (Christian Ullrich) Date: Tue, 25 Oct 2016 19:49:07 +0000 Subject: [issue25166] Windows AllUsers installation places uninstaller in user profile In-Reply-To: <1442575090.58.0.314641407957.issue25166@psf.upfronthosting.co.za> Message-ID: <1477424947.52.0.871422001177.issue25166@psf.upfronthosting.co.za> Christian Ullrich added the comment: This bug has been open for over a year and two subsequent releases, and its planned resolution depends on a change to WiX. The related WiX bug (see comment above) is scheduled to be implemented in WiX 4.0, which has no prospective release date. According to , only 27 percent of the issues currently planned for this release are resolved. In my opinion, this is an important bug that cannot wait indefinitely. Ceterum censeo (yes, there had to be one): This is particularly true when considering that a (relatively) simple fix exists that can be done by the Python project alone, with no external dependencies. I am referring, of course, to dropping the burn bundle entirely and shipping a single MSI package again, rather than 43 (!) of them (across x86 and amd64) with an average of ~190 and a median of 8 (eight) installed files per package in 3.5.2, counting pip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 15:54:29 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 25 Oct 2016 19:54:29 +0000 Subject: [issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression) In-Reply-To: <1464176880.25.0.308106356091.issue27122@psf.upfronthosting.co.za> Message-ID: <1477425269.06.0.319300412592.issue27122@psf.upfronthosting.co.za> Gregory P. Smith added the comment: we talented! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 16:05:07 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 25 Oct 2016 20:05:07 +0000 Subject: [issue25166] Windows AllUsers installation places uninstaller in user profile In-Reply-To: <1442575090.58.0.314641407957.issue25166@psf.upfronthosting.co.za> Message-ID: <1477425907.21.0.106048775645.issue25166@psf.upfronthosting.co.za> Zachary Ware added the comment: Christian, your desire for a single MSI is well known, and repeatedly stating that desire is far more likely to raise ire rather than spur change. No, you did not need to include "ceterum censeo". The installer system that Steve created for us has many features that I and many others would be very sad to see disappear again, and which cannot be supported by a single MSI distribution. In particular, selecting which components to install and only downloading those components is a wonderful feature for anyone with a low-bandwidth or metered internet connection. If the current installer is unusable to you, feel free to forward-port the old 3.4 installer system and create your own installers. Alternately, feel free to provide patches to resolve this or any other issues you have with the current installer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 16:10:25 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 25 Oct 2016 20:10:25 +0000 Subject: [issue25166] Windows AllUsers installation places uninstaller in user profile In-Reply-To: <1442575090.58.0.314641407957.issue25166@psf.upfronthosting.co.za> Message-ID: <1477426225.04.0.790468703846.issue25166@psf.upfronthosting.co.za> Steve Dower added the comment: I won't be changing the official releases to be a single MSI again - the experience is too hostile towards regular users. As my (volunteer) time allows, I've been working on resolving the issue in WiX and we are totally capable of moving to a private build of WiX that includes a fix. There is no need to wait for 4.0. If you would like a single MSI installer, I'd suggest offering some time (or paying someone to spend their time) to develop one and distribute it independently. The old installer might be a good starting point, but it had a range of issues that have been resolved by the new installer. There are also a number of features available in the new installer that are not available under a single MSI (such as per-user installs, installing/skipping the CRT, and disabling MAX_PATH limitations). However, if your installer becomes more popular than the official one, it will be strong evidence that people would rather have one monolithic installer with less reliable options, and we can consider switching back to that format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 16:39:44 2016 From: report at bugs.python.org (Armin Rigo) Date: Tue, 25 Oct 2016 20:39:44 +0000 Subject: [issue19542] WeakValueDictionary bug in setdefault()&pop() In-Reply-To: <1384073464.47.0.0676946313386.issue19542@psf.upfronthosting.co.za> Message-ID: <1477427984.76.0.683781409938.issue19542@psf.upfronthosting.co.za> Armin Rigo added the comment: ping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 16:41:35 2016 From: report at bugs.python.org (Mike Williamson) Date: Tue, 25 Oct 2016 20:41:35 +0000 Subject: [issue28535] round seems to provide floor, not proper rounding Message-ID: <1477428095.53.0.799157743642.issue28535@psf.upfronthosting.co.za> New submission from Mike Williamson: Ran a test that I expected to pass. When the test failed, I was struck by the strange (incorrect) assertion claim when using unittest.assertAlmostEqual: AssertionError: 32.78 != 32.775 within 2 places Uhmm... yes it does! I delved in, discovering that assertAlmostEquals simply calls round. So, I tried it with round, shown below: >>> round(32.775, 2) 32.77 >>> round(32.785, 2) 32.78 >>> round(32.745, 2) 32.74 >>> round(32.746, 2) 32.75 I then looked at the documentation, to understand whether this odd behavior is indeed expected. I saw (on https://docs.python.org/3/library/functions.html#round ): --- If two multiples are equally close, rounding is done toward the even choice (so, for example, both round(0.5) and round(-0.5) are 0, and round(1.5) is 2). --- However, as you can see, this is not the behavior I'm experiencing. So, it looks like a real bug. I am attaching the two files where I was running the unit tests, but I'm not sure you really need them. Thank you! ---------- components: Library (Lib) files: bad_tests.py messages: 279456 nosy: lazarillo priority: normal severity: normal status: open title: round seems to provide floor, not proper rounding type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file45224/bad_tests.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 16:58:18 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Oct 2016 20:58:18 +0000 Subject: [issue28535] round seems to provide floor, not proper rounding In-Reply-To: <1477428095.53.0.799157743642.issue28535@psf.upfronthosting.co.za> Message-ID: <1477429098.16.0.461495343522.issue28535@psf.upfronthosting.co.za> R. David Murray added the comment: You must have missed the note about floating point (in the grey box). assertAlmostEqual is a bit of problem child in any case. There are open issues about improved functionality for the use case it tries to address. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 17:10:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 21:10:17 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1477429817.12.0.306284563361.issue28509@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Here is a script that produces more compact output. The first column is a size after which the dict is resized. import sys p = 10000 b = {} for i in range(10000): a = {} b[i] = i a.update(b) s = sys.getsizeof(a) if s > p: print(i, p) p = s Unpatched: 5 128 7 196 15 344 31 628 63 1208 127 2612 255 5176 511 10292 1023 20536 2047 41012 4095 81976 8191 163892 Patched: 5 128 10 196 21 344 42 628 85 1208 170 2612 341 5176 682 10292 1365 20536 2730 41012 5461 81976 But I suggest instead the condition mp->ma_keys->dk_usable < other->ma_used use the condition mp->ma_used + mp->ma_keys->dk_usable < other->ma_used If there are overlapping keys this can allow to avoid resizing. In worst keys one resizing will be happened in dictinsert(). Yes one estimation is: USABLE_FRACTION(2 * mp->ma_keys->dk_size) < mp->ma_used + other->ma_used Dict size is at least doubled after resizing. No need to make preliminary resizing if the final result is the same. The benefit is that if there are many overlapping keys the final size can be ESTIMATE_SIZE(other->ma_used) instead of ESTIMATE_SIZE(mp->ma_used + other->ma_used). All this conditions can be combined (because they have different computational cost): mp->ma_keys->dk_usable < other->ma_used && mp->ma_used + mp->ma_keys->dk_usable < other->ma_used && USABLE_FRACTION(2 * mp->ma_keys->dk_size) < mp->ma_used + other->ma_used ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 17:11:59 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 21:11:59 +0000 Subject: [issue19542] WeakValueDictionary bug in setdefault()&pop() In-Reply-To: <1384073464.47.0.0676946313386.issue19542@psf.upfronthosting.co.za> Message-ID: <1477429918.99.0.0309864501202.issue19542@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 17:38:47 2016 From: report at bugs.python.org (Big Stone) Date: Tue, 25 Oct 2016 21:38:47 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477431527.86.0.0432147552413.issue28522@psf.upfronthosting.co.za> Big Stone added the comment: possible particularities of my PC vs yours: - I have no python entry at all in the regex - I have no py.exe, - I have no Visual Studio (but the compiler) with Windows 10, I don't know where is the even viewer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 17:47:29 2016 From: report at bugs.python.org (Ryan Gonzalez) Date: Tue, 25 Oct 2016 21:47:29 +0000 Subject: [issue28536] Show the qualified name when a call fails Message-ID: <1477432049.19.0.837809051965.issue28536@psf.upfronthosting.co.za> New submission from Ryan Gonzalez: e.g. make this: class X: def __init__(self): pass X(1) print something like this: TypeError: X.__init__() takes 1 positional argument but 2 were given instead of: TypeError: __init__() takes 1 positional argument but 2 were given I'm trying to see if I can create a patch right now, though it probably won't be ready until Thursday. ---------- components: Interpreter Core messages: 279460 nosy: Ryan.Gonzalez priority: normal severity: normal status: open title: Show the qualified name when a call fails versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 17:53:20 2016 From: report at bugs.python.org (Ryan Gonzalez) Date: Tue, 25 Oct 2016 21:53:20 +0000 Subject: [issue28536] Show the qualified name when a call fails In-Reply-To: <1477432049.19.0.837809051965.issue28536@psf.upfronthosting.co.za> Message-ID: <1477432400.11.0.275386417664.issue28536@psf.upfronthosting.co.za> Ryan Gonzalez added the comment: HAHA, I lied. :D Attached is what I have so far. ---------- keywords: +patch Added file: http://bugs.python.org/file45225/0001-Make-failed-calls-to-methods-show-the-fully-qualifie.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 17:57:41 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 25 Oct 2016 21:57:41 +0000 Subject: [issue28536] Show the qualified name when a call fails In-Reply-To: <1477432049.19.0.837809051965.issue28536@psf.upfronthosting.co.za> Message-ID: <1477432661.62.0.123409009901.issue28536@psf.upfronthosting.co.za> Martin Panter added the comment: Perhaps you should merge your work with Issue 2786. With a very brief look, the patches seem to take a similar approach. ---------- nosy: +martin.panter resolution: -> duplicate superseder: -> Names in function call exception should have class names, if they're methods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 18:02:52 2016 From: report at bugs.python.org (Ryan Gonzalez) Date: Tue, 25 Oct 2016 22:02:52 +0000 Subject: [issue2786] Names in function call exception should have class names, if they're methods In-Reply-To: <1210191958.85.0.412869826908.issue2786@psf.upfronthosting.co.za> Message-ID: <1477432972.71.0.360662093223.issue2786@psf.upfronthosting.co.za> Changes by Ryan Gonzalez : ---------- nosy: +Ryan.Gonzalez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 18:48:56 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 25 Oct 2016 22:48:56 +0000 Subject: [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477435736.8.0.842493797259.issue28516@psf.upfronthosting.co.za> Martin Panter added the comment: I agree it is good to explicitly document the __enter__() result, rather than relying on assumptions and example code. The patch looks good to me. I don?t understand the problem with pop_all() though. Is there still a problem if we apply your patch? ---------- nosy: +martin.panter stage: -> patch review versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 19:20:52 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Oct 2016 23:20:52 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: Message-ID: STINNER Victor added the comment: R. David Murray added the comment: > The alternative has already been written: aiosmtpd, in the aiolibs project. The question is should it be added to the stdlib... I suggest to keep it on PyPI to keep fast releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 19:42:42 2016 From: report at bugs.python.org (Nathaniel Manista) Date: Tue, 25 Oct 2016 23:42:42 +0000 Subject: [issue28537] abc module fails to reject instantiation of some multiply-inheriting classes that fail to implement abstract methods Message-ID: <1477438962.08.0.688067999531.issue28537@psf.upfronthosting.co.za> New submission from Nathaniel Manista: The attached file when executed should fail (raise an exception) one line above where it actually does. Right? I discovered this in 2.7 but have confirmed that it's still a problem in 3.6.0b2. ---------- components: Library (Lib) files: abc_what.py messages: 279465 nosy: Nathaniel Manista, aleax priority: normal severity: normal status: open title: abc module fails to reject instantiation of some multiply-inheriting classes that fail to implement abstract methods type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45226/abc_what.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 19:45:27 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 25 Oct 2016 23:45:27 +0000 Subject: [issue28535] round seems to provide floor, not proper rounding In-Reply-To: <1477428095.53.0.799157743642.issue28535@psf.upfronthosting.co.za> Message-ID: <1477439127.69.0.659943947877.issue28535@psf.upfronthosting.co.za> Steven D'Aprano added the comment: To be clear, let's look at the first failed assertion: AssertionError: 32.78 != 32.775 within 2 places It sure *looks* like 32.775 ought to round to 32.78. And indeed it would, if it actually was 32.775. But despite appearances, it isn't. Sure, the number prints as 32.775, but that's a recent feature (and a mixed blessing at that). That's a side-effect of a clever (perhaps too clever) change to the way floats are printed, to prefer neat, friendly numbers over accuracy. Before Python 2.7, the exact same float would have been printed as 32.774999999999999, and now its obvious why it rounds down to 32.77 rather than up to 32.78: 32.774999999999999 is *less* than 32.775. To be precise, printing the old way: 32.774999999999999 rounds down to 32.770000000000003 rather than up to 32.780000000000001, exactly as promised. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 19:55:32 2016 From: report at bugs.python.org (Chris Rebert) Date: Tue, 25 Oct 2016 23:55:32 +0000 Subject: [issue28537] abc module fails to reject instantiation of some multiply-inheriting classes that fail to implement abstract methods In-Reply-To: <1477438962.08.0.688067999531.issue28537@psf.upfronthosting.co.za> Message-ID: <1477439732.76.0.183054119996.issue28537@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 20:15:32 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Oct 2016 00:15:32 +0000 Subject: [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477440932.09.0.569235921712.issue28516@psf.upfronthosting.co.za> R. David Murray added the comment: Actually, the __enter__ method is looked up on the class, so saying "the __enter__ method of the instance" could be a bit confusing. Also, many context managers return self, so 'trivially' isn't really necessary as a modifier. What if we added a sentence to the first paragraph that said "ExitStack instances return themselves when used in a with statement." Since that is immediately followed by an example of doing that, it seems like the best place to put it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 20:15:38 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 26 Oct 2016 00:15:38 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477440938.62.0.410444935158.issue28522@psf.upfronthosting.co.za> Steve Dower added the comment: If you right-click the Start button, Event Viewer is near the top. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 20:19:26 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Oct 2016 00:19:26 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <1477441166.34.0.239802035756.issue25002@psf.upfronthosting.co.za> Martin Panter added the comment: Perhaps it is okay to keep the documentation changes, but I think either the library changes should be reverted or worked around where the modules are still in use. I normally run the tests with -Werror, and the failures I get are: * test_ssl, test_smtplib, test_poplib, test_logging, test_ftplib, test_support: tests use asyncore * test_os: test uses asynchat (When you import asynchat, the first error complains about importing asyncore, there are actually two warnings) * test_all: This seems to ignore DeprecationWarning; perhaps an exception for PendingDeprecationWarning should also be added? * test_asyncore and test_asynchat: Obviously these have to still test the modules, so they should anticipate the warnings, perhaps using Serhiy?s code * test_smtpd: smtpd module itself uses asyncore; see Issue 25008 ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 20:37:26 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 26 Oct 2016 00:37:26 +0000 Subject: [issue27275] KeyError thrown by optimised collections.OrderedDict.popitem() In-Reply-To: <1465446835.8.0.930561202137.issue27275@psf.upfronthosting.co.za> Message-ID: <1477442246.69.0.74608934898.issue27275@psf.upfronthosting.co.za> Josh Rosenberg added the comment: The Python implementation of OrderedDict breaks for issue28014, at least on 3.4.3 (it doesn't raise KeyError, but if you check the repr, it's only showing one of the two entries, because calling __getitem__ is rearranging the OrderedDict). >>> s = SimpleLRUCache(2) >>> s['t1'] = 1 >>> s SimpleLRUCache([('t1', 1)]) >>> s['t2'] = 2 >>> s SimpleLRUCache([('t1', 1)]) >>> s SimpleLRUCache([('t2', 2)]) Again, the OrderedDict code (in the Python case, __repr__, in the C case, popitem) assumes __getitem__ is idempotent, and again, the violation of that constraint makes things break. They break differently in the Python implementation and the C implementation, but they still break, because people are trying to force OrderedDict to do unnatural things without implementing their own logic to ensure their violations of the dict pseudo-contract actually works. popitem happens to be a common cause of problems because it's logically a get and delete combined. People aren't using it for the get feature, it's just a convenient way to remove items from the end; if they bypassed getting and just deleted it would work, but it's a more awkward construction, so they don't. If they implemented their own popitem that avoided their own non-idempotent __getitem__, that would also work. I'd be perfectly happy with making popitem implemented in terms of pop on subclasses when pop is overridden (if pop isn't overridden though, that's effectively what popitem already does). I just don't think we should be making the decision that popitem *requires* inheritance for all dict subclasses that have (normal) idempotent __contains__ and __getitem__ because classes that violate the usual expectations of __contains__ and __getitem__ have (non-segfaulting) problems. Note: In the expiring case, the fix is still "wrong" if someone used popitem for the intended purpose (to get and delete). The item popped might have expired an hour ago, but because the fixed code bypasses __getitem__, it will happily return the expired a long expired item (having bypassed expiration checking). It also breaks encapsulation, returning the expiry time that is supposed to be stripped on pop. By fixing one logic flaw on behalf of a fundamentally broken subclass, we introduced another. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 20:40:20 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 26 Oct 2016 00:40:20 +0000 Subject: [issue28014] Strange interaction between methods in subclass of C OrderedDict In-Reply-To: <1473305282.86.0.291402257469.issue28014@psf.upfronthosting.co.za> Message-ID: <1477442420.89.0.452014930973.issue28014@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Note: This class doesn't actually work on 3.4 in other ways (because __getitem__ is not idempotent, while OrderedDict assumes it is): >>> s = SimpleLRUCache(2) >>> s['t1'] = 1 >>> s SimpleLRUCache([('t1', 1)]) >>> s['t2'] = 2 >>> s SimpleLRUCache([('t1', 1)]) >>> s SimpleLRUCache([('t2', 2)]) # <-- No changes, repr different If your __getitem__ isn't idempotent, you've broken a basic assumption built into the logic of the other methods you inherited, and you're going to need to override other methods to avoid misbehavior. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 20:43:48 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Oct 2016 00:43:48 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1477442628.76.0.812807997108.issue18235@psf.upfronthosting.co.za> Martin Panter added the comment: Michael F.: It sounds like you have three separate but related problems: 1. Confusion between LDSHARED and BLDSHARED referring to the in-source build tree vs final installed files. I think this is what David and Michael H. were originally trying to fix here. 2. Only BLDSHARED has an extra -L flag. Where is the code that adds it? I can?t find it in configure.ac in either Python 3 or 2 versions. 3. BLDSHARED also fails to work for out-of-tree builds, because it refers to the build tree (.) rather than the source tree. This sounds like another bug to me; do you want to make a patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 20:44:33 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Oct 2016 00:44:33 +0000 Subject: [issue28537] abc module fails to reject instantiation of some multiply-inheriting classes that fail to implement abstract methods In-Reply-To: <1477438962.08.0.688067999531.issue28537@psf.upfronthosting.co.za> Message-ID: <1477442673.18.0.820894772875.issue28537@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report, but this is a duplicate of issue 5996. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> abstract class instantiable when subclassing dict _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 20:45:23 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Oct 2016 00:45:23 +0000 Subject: [issue5996] abstract class instantiable when subclassing dict In-Reply-To: <1242050763.07.0.145569961651.issue5996@psf.upfronthosting.co.za> Message-ID: <1477442723.08.0.0185086097218.issue5996@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +Nathaniel Manista, aleax, cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 20:45:48 2016 From: report at bugs.python.org (irdb) Date: Wed, 26 Oct 2016 00:45:48 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1477442748.17.0.0893010973503.issue2506@psf.upfronthosting.co.za> Changes by irdb : ---------- nosy: +irdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 21:05:00 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Oct 2016 01:05:00 +0000 Subject: [issue10656] "Out of tree" build fails on AIX In-Reply-To: <1291865704.62.0.494509897126.issue10656@psf.upfronthosting.co.za> Message-ID: <1477443900.79.0.371214666968.issue10656@psf.upfronthosting.co.za> Martin Panter added the comment: The idea of the patches makes sense to me. Embedding the name of whatever directory Python was built in into the installed version of Modules/ld_so_aix.in does not seem very clean to me. Is there another way of doing this? Perhaps a file copy or symlink? ---------- nosy: +martin.panter stage: -> patch review versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 21:14:39 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Oct 2016 01:14:39 +0000 Subject: [issue10656] "Out of tree" build fails on AIX In-Reply-To: <1291865704.62.0.494509897126.issue10656@psf.upfronthosting.co.za> Message-ID: <1477444479.37.0.218745848979.issue10656@psf.upfronthosting.co.za> Martin Panter added the comment: Actually, why do you remove $(srcdir) for Modules/python.exp? This code was added in r88426; see . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 21:17:27 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Oct 2016 01:17:27 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <20161026011723.49821.23996.E083E010@psf.io> Roundup Robot added the comment: New changeset 720865fa61a4 by Martin Panter in branch '3.5': Issue #26240: Clean up the subprocess module doc string https://hg.python.org/cpython/rev/720865fa61a4 New changeset 8358c68579e9 by Martin Panter in branch '3.6': Issue #26240: Merge subprocess doc string from 3.5 into 3.6 https://hg.python.org/cpython/rev/8358c68579e9 New changeset 0dd8b3f133f9 by Martin Panter in branch 'default': Issue #26240: Merge subprocess doc string from 3.6 https://hg.python.org/cpython/rev/0dd8b3f133f9 New changeset 5a1edf5701f1 by Martin Panter in branch '2.7': Issue #26240: Clean up the subprocess module doc string https://hg.python.org/cpython/rev/5a1edf5701f1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 21:43:46 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Oct 2016 01:43:46 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1441399683.85.0.786847810998.issue25002@psf.upfronthosting.co.za> Message-ID: <20161026014343.11868.23549.2FD0B931@psf.io> Roundup Robot added the comment: New changeset 6eb3312a9a16 by Guido van Rossum in branch '3.6': Issue #25002: Back out asyncore/asynchat deprecation. https://hg.python.org/cpython/rev/6eb3312a9a16 New changeset 2879185bc511 by Guido van Rossum in branch 'default': Issue #25002: Back out asyncore/asynchat deprecation. (3.6->3.7) https://hg.python.org/cpython/rev/2879185bc511 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 21:44:21 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 26 Oct 2016 01:44:21 +0000 Subject: [issue25002] Deprecate asyncore/asynchat In-Reply-To: <1477441166.34.0.239802035756.issue25002@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: OK, backed out the code changes, kept the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 21:45:41 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 26 Oct 2016 01:45:41 +0000 Subject: [issue5996] abstract class instantiable when subclassing dict In-Reply-To: <1242050763.07.0.145569961651.issue5996@psf.upfronthosting.co.za> Message-ID: <1477446341.09.0.332067589652.issue5996@psf.upfronthosting.co.za> Guido van Rossum added the comment: Honestly let's just forget about this. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 21:47:13 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 26 Oct 2016 01:47:13 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1477446433.02.0.533180037015.issue28509@psf.upfronthosting.co.za> INADA Naoki added the comment: I feel that accept one resize while merging is better. How about this? /* Do one big resize at the start, rather than incrementally * resizing. At most one resize happen while merging. */ if (USABLE_FRACTION(mp->ma_keys->dk_size) < other->ma_used) { assert(mp->ma_used < other->ma_used); if (dictresize(mp, ESTIMATE_SIZE(other->ma_used))) { return -1; } } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 22:00:19 2016 From: report at bugs.python.org (Nathaniel Manista) Date: Wed, 26 Oct 2016 02:00:19 +0000 Subject: [issue5996] abstract class instantiable when subclassing dict In-Reply-To: <1242050763.07.0.145569961651.issue5996@psf.upfronthosting.co.za> Message-ID: <1477447219.88.0.644364199677.issue5996@psf.upfronthosting.co.za> Nathaniel Manista added the comment: Wait, really? My report came out of a real bug that I had in my system and shipped to my users; it wasn't academic or contrived at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 22:09:54 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Oct 2016 02:09:54 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1477447794.33.0.806397256877.issue18235@psf.upfronthosting.co.za> Martin Panter added the comment: Regarding out-of-tree builds (Problem 3), see Issue 10656, which already has a potential patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 22:14:51 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 26 Oct 2016 02:14:51 +0000 Subject: [issue5996] abstract class instantiable when subclassing dict In-Reply-To: <1242050763.07.0.145569961651.issue5996@psf.upfronthosting.co.za> Message-ID: <1477448091.02.0.359897696088.issue5996@psf.upfronthosting.co.za> Guido van Rossum added the comment: Where did you report that? I don't see your name on this bug -- it has a patch that's been unapplied for 5 years, so I doubt it's very important. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 22:17:05 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 26 Oct 2016 02:17:05 +0000 Subject: [issue5996] abstract class instantiable when subclassing dict In-Reply-To: <1242050763.07.0.145569961651.issue5996@psf.upfronthosting.co.za> Message-ID: <1477448225.52.0.341584264684.issue5996@psf.upfronthosting.co.za> Guido van Rossum added the comment: Oh sorry. I received the emails in a strange order. I guess it can stay open. ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 22:34:00 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 26 Oct 2016 02:34:00 +0000 Subject: [issue28530] Howto detect if an object is of type os.DirEntry In-Reply-To: <1477410376.41.0.315236150527.issue28530@psf.upfronthosting.co.za> Message-ID: <1477449240.43.0.0483557379599.issue28530@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Eryk: With the fixes for issue25994 and issue26603, you'd want to use a with statement for the scandir; the use pattern in that example is guaranteed to cause a ResourceWarning on any directory with more than one entry. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 23:13:38 2016 From: report at bugs.python.org (Walker Hale IV) Date: Wed, 26 Oct 2016 03:13:38 +0000 Subject: [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477451618.59.0.307331692098.issue28516@psf.upfronthosting.co.za> Walker Hale IV added the comment: Clarifying the documentation regarding the __enter__ method eliminates the need for further discussion on this point regarding pop_all(), which was really just the motivating use case. That leaves the question of the most readable documentation change that accomplishes the result ? some point between verbose and terse that minimizes the time required to comprehend the material. My problem with the language "ExitStack instances return themselves when used in a with statement" is that it only specifies the return value of the __enter__ method but leaves open the question of whether the __enter__ method is doing anything else, particularly in the case of an ExitStack that is already loaded with context managers. How does a reader know that the __enter__ method of a loaded ExitStack doesn't call the __enter__ method of the the context managers inside? The documentation elsewhere provides strong evidence against this, but nothing that makes the point explicit. The reader is left with an exercise in deduction. How about replacing my previous wording with: "The __enter__ method has no behavior besides returning the ExitStack instance?" (I feel a little dirty using that language, since it might tie the hands of future developers. The truly correct wording would be "The __enter__ method is idempotent and behaves as if the only thing it does is return the ExitStack instance." That more verbose description gives future developers the freedom to do weird JIT optimizations and caching as needed, but who has the patience for such legally exhaustive specification?) Placing the wording where I did ? at the end of the class discussion and prior to the new methods ? prevents this point from obscuring the main purpose of ExitStack while still leaving a place for such messy but important details. (Amazing the thought that goes into documenting a two-line method.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 23:23:37 2016 From: report at bugs.python.org (Eryk Sun) Date: Wed, 26 Oct 2016 03:23:37 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477452217.59.0.190011704694.issue28522@psf.upfronthosting.co.za> Eryk Sun added the comment: I installed "WinPython-64bit-3.6.0.0Zerorc2.exe" on Windows 10. As you can see below, the included version of IDLEX depends on idlelib implementation details that have changed between 3.5 and 3.6: C:\WinPython36\python-3.6.0b2.amd64>.\python Python 3.6.0b2 (default, Oct 10 2016, 21:15:32) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import idlexlib Traceback (most recent call last): File "", line 1, in File "C:\WinPython36\python-3.6.0b2.amd64\Lib\site-packages\idlexlib\__init__.py", line 10, in from .idlexMain import version as __version__ File "C:\WinPython36\python-3.6.0b2.amd64\Lib\site-packages\idlexlib\idlexMain.py", line 46, in from idlexlib.extensionManager import extensionManager File "C:\WinPython36\python-3.6.0b2.amd64\Lib\site-packages\idlexlib\extensionManager.py", line 60, in from idlelib.configHandler import idleConf, IdleConfParser ModuleNotFoundError: No module named 'idlelib.configHandler' The "Unable to located" [sic] error is from the idlex.py script due to the above import error. I couldn't reproduce the crash due to python._pth. Your Windows application log should provide the DLL (module) and exception code for the crash, but a dump file would be even better. With the error reporting dialog still open, look for the crashed python.exe in the task manager details tab (the working set of the crashed process should be small -- about 100K). Right-click it and select the option to create a dump file. Zip the dump file and upload it here. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 00:17:40 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 26 Oct 2016 04:17:40 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1477455460.67.0.559906349984.issue28509@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I prefer the existing code be left as is. We've already greatly compacted the dictionaries. There is no need to be ultra-aggressive in shaving off every little corner. There is some advantage to having the dict be more sparse (fewer collisions, quicker insertion time for the update, quicker lookups etc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 00:32:38 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Oct 2016 04:32:38 +0000 Subject: [issue4347] Circular dependency causes SystemError when adding new syntax In-Reply-To: <1227022091.75.0.852526924329.issue4347@psf.upfronthosting.co.za> Message-ID: <1477456358.26.0.788026632142.issue4347@psf.upfronthosting.co.za> Martin Panter added the comment: I occasionally get the following error, due to Parser/parsetok.o being older than Include/graminit.h. ./python -E -S -m sysconfig --generate-posix-vars ; if test $? -ne 0 ; then echo "generate-posix-vars failed" ; rm -f ./pybuilddir.txt ; exit 1 ; fi Could not import runpy module Traceback (most recent call last): File "/home/proj/python/cpython/Lib/runpy.py", line 14, in import importlib.machinery # importlib first so we can test #15386 via -m File "/home/proj/python/cpython/Lib/importlib/__init__.py", line 57, in import types File "/home/proj/python/cpython/Lib/types.py", line 166, in import functools as _functools File "/home/proj/python/cpython/Lib/functools.py", line 345, in _CacheInfo = namedtuple("CacheInfo", ["hits", "misses", "maxsize", "currsize"]) File "/home/proj/python/cpython/Lib/collections/__init__.py", line 428, in namedtuple exec(class_definition, namespace) SystemError: invalid node 339 for PyAST_FromNode generate-posix-vars failed *** Error code 1 The best workaround for me (less brute force than removing the whole build tree) seems to be to add Parser/parsetok.c to the list of files to ?touch? the timestamps of before building. The dependency in Parser/parsetok.c on Include/graminit.h was added by , presumably to support encoding declarations in Python source files. I haven?t tried, but perhaps to avoid pgen depending on its output, a quick fix would be to add #ifndef PGEN around the offending code. For Python 2, a Parser/parsetok_pgen.c wrapper file would have to added, like in revision 6e9dc970ac0e. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 00:55:26 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Oct 2016 04:55:26 +0000 Subject: [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1477457726.14.0.778649111778.issue26240@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 04:14:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Oct 2016 08:14:21 +0000 Subject: [issue27838] test_os.test_chown() failure on koobs-freebsd-current In-Reply-To: <1471959658.26.0.0626423066304.issue27838@psf.upfronthosting.co.za> Message-ID: <1477469661.77.0.735367199928.issue27838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Proposed patch adds more verbose output in tests. Hope this will help to diagnose a problem. It also fixes test_chown_without_permission which can fail if run as a user next after root (uid=1 or like). ---------- keywords: +patch nosy: +serhiy.storchaka Added file: http://bugs.python.org/file45227/test_os_chown.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 04:16:44 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Oct 2016 08:16:44 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477469804.73.0.728368518493.issue23262@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you please provide a patch including all changes in unified format? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 04:18:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Oct 2016 08:18:07 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1477469887.42.0.208722782395.issue28353@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 04:42:13 2016 From: report at bugs.python.org (Oleg Broytman) Date: Wed, 26 Oct 2016 08:42:13 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477471333.67.0.201446343786.issue23262@psf.upfronthosting.co.za> Changes by Oleg Broytman : Removed file: http://bugs.python.org/file45025/webbrowser.py-3.4-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 04:42:21 2016 From: report at bugs.python.org (Oleg Broytman) Date: Wed, 26 Oct 2016 08:42:21 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477471341.17.0.199213192964.issue23262@psf.upfronthosting.co.za> Changes by Oleg Broytman : Removed file: http://bugs.python.org/file45027/webbrowser.py-2.7-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 04:42:27 2016 From: report at bugs.python.org (Oleg Broytman) Date: Wed, 26 Oct 2016 08:42:27 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477471347.46.0.313859771853.issue23262@psf.upfronthosting.co.za> Changes by Oleg Broytman : Removed file: http://bugs.python.org/file45216/webbrowser.py-3.5-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 04:42:32 2016 From: report at bugs.python.org (Oleg Broytman) Date: Wed, 26 Oct 2016 08:42:32 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477471352.89.0.96765963269.issue23262@psf.upfronthosting.co.za> Changes by Oleg Broytman : Removed file: http://bugs.python.org/file45218/test_webbrowser.py-3.5-newfox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 04:43:01 2016 From: report at bugs.python.org (Oleg Broytman) Date: Wed, 26 Oct 2016 08:43:01 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477471381.7.0.986728496602.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: Done. ---------- versions: -Python 2.7 Added file: http://bugs.python.org/file45228/webbrowser.py-3.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 05:30:42 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Oct 2016 09:30:42 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1477474242.08.0.903636577325.issue2506@psf.upfronthosting.co.za> STINNER Victor added the comment: I would suggest -X noopt and use "noopt" in .pyc filenames. That's what I proposed in my PEP 511. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 05:31:30 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Oct 2016 09:31:30 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1477474290.46.0.379435992031.issue2506@psf.upfronthosting.co.za> STINNER Victor added the comment: Since the discussion restarted, I reopen the issue and assigned it to Python 3.6. Maybe it's too late for such tiny change? ---------- resolution: rejected -> status: closed -> open versions: +Python 3.6 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 05:38:53 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 26 Oct 2016 09:38:53 +0000 Subject: [issue28538] _socket module cross-compilation error on android-24 Message-ID: <1477474733.85.0.0781476042155.issue28538@psf.upfronthosting.co.za> New submission from Xavier de Gaye: On the latest Android API level (android-24), the if_nameindex function is now found by configure in Android libc. But the if_nameindex function and structure are still not defined in the Android net/if.h header. The compilation fails with: clang --sysroot=/opt/android-ndk/platforms/android-24/arch-x86 -target i686-none-linux-androideabi -gcc-toolchain /opt/android-ndk/toolchains/x86-4.9/prebuilt/linux-x86_64 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wno-unused-value -Wno-empty-body -Qunused-arguments -Wno-parentheses-equality -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -IObjects -IInclude -IPython -I/home/xavier/src/android/pyona/build/python3.7-install-android-24-x86/org.bitbucket.pyona/include -I/opt/android-ndk/platforms/android-24/arch-x86/usr/include -I/path/to/android/cpython/Include -I/home/xavier/src/android/pyona/build/python3.7-android-24-x86 -c /path/to/android/cpython/Modules/socketmodule.c -o build/temp.linux-i686-3.7/path/to/android/cpython/Modules/socketmodule.o /path/to/android/cpython/Modules/socketmodule.c:1034:29: warning: comparison of integers of different signs: 'socklen_t' (aka 'int') and 'size_t' (aka 'unsigned int') [-Wsign-compare] if (res->ai_addrlen < addr_ret_size) ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ /path/to/android/cpython/Modules/socketmodule.c:1125:25: warning: comparison of integers of different signs: 'socklen_t' (aka 'int') and 'size_t' (aka 'unsigned int') [-Wsign-compare] if (res->ai_addrlen < addr_ret_size) ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ /path/to/android/cpython/Modules/socketmodule.c:4925:15: warning: implicit declaration of function 'sethostname' is invalid in C99 [-Wimplicit-function-declaration] res = sethostname(buf.buf, buf.len); ^ /path/to/android/cpython/Modules/socketmodule.c:6242:10: warning: implicit declaration of function 'if_nameindex' is invalid in C99 [-Wimplicit-function-declaration] ni = if_nameindex(); ^ /path/to/android/cpython/Modules/socketmodule.c:6242:8: warning: incompatible integer to pointer conversion assigning to 'struct if_nameindex *' from 'int' [-Wint-conversion] ni = if_nameindex(); ^ ~~~~~~~~~~~~~~ /path/to/android/cpython/Modules/socketmodule.c:6250:9: warning: implicit declaration of function 'if_freenameindex' is invalid in C99 [-Wimplicit-function-declaration] if_freenameindex(ni); ^ /path/to/android/cpython/Modules/socketmodule.c:6254:19: error: subscript of pointer to incomplete type 'struct if_nameindex' for (i = 0; ni[i].if_index != 0 && i < INT_MAX; i++) { ~~^ /path/to/android/cpython/Modules/socketmodule.c:6240:12: note: forward declaration of 'struct if_nameindex' struct if_nameindex *ni; ^ /path/to/android/cpython/Modules/socketmodule.c:6256:19: error: subscript of pointer to incomplete type 'struct if_nameindex' ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name); ~~^ /path/to/android/cpython/Modules/socketmodule.c:6240:12: note: forward declaration of 'struct if_nameindex' struct if_nameindex *ni; ^ /path/to/android/cpython/Modules/socketmodule.c:6256:62: error: subscript of pointer to incomplete type 'struct if_nameindex' ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name); ~~^ /path/to/android/cpython/Modules/socketmodule.c:6240:12: note: forward declaration of 'struct if_nameindex' struct if_nameindex *ni; ^ 6 warnings and 3 errors generated. ---------- messages: 279495 nosy: xdegaye priority: normal severity: normal stage: needs patch status: open title: _socket module cross-compilation error on android-24 type: compile error versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 05:40:53 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 26 Oct 2016 09:40:53 +0000 Subject: [issue26865] Meta-issue: support of the android platform In-Reply-To: <1461685011.99.0.617135447086.issue26865@psf.upfronthosting.co.za> Message-ID: <1477474853.38.0.590162695874.issue26865@psf.upfronthosting.co.za> Xavier de Gaye added the comment: issue #28538: _socket module cross-compilation error on android-24 ---------- dependencies: +_socket module cross-compilation error on android-24 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 06:08:44 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 26 Oct 2016 10:08:44 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1477476524.87.0.23485828872.issue28509@psf.upfronthosting.co.za> INADA Naoki added the comment: OK, I won't change it to allow additional resize while merging, after pre-resize. But current code has two problem: * Pre-resize happen even when resizing is not necessary. (ex. two dict has same keys). * Pre-resize allocates too much memory which doesn't make sense. Next patch (28509-smaller-update2.patch) seems better because: * When pre-resize doesn't happen, at most one resize while merging. * When pre-resize happens, no resize happens while merging. * Doesn't make surprisingly sparse dict when two dicts have same keys. PoC code: import sys b = {} for i in range(16): b[i] = i a = b.copy() a.update(b) # No need to resize print(i, sys.getsizeof(a), sys.getsizeof(b)) Current: 0 256 256 1 256 256 2 256 256 3 664 256 4 664 256 5 384 384 # !!! 6 664 384 7 664 384 8 664 384 9 664 384 10 664 664 11 664 664 12 1200 664 13 1200 664 14 1200 664 15 1200 664 With second patch: 0 256 256 1 256 256 2 256 256 3 256 256 4 256 256 5 384 384 6 384 384 7 384 384 8 384 384 9 384 384 10 664 664 11 664 664 12 664 664 13 664 664 14 664 664 15 664 664 ---------- Added file: http://bugs.python.org/file45229/28509-smaller-update2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 08:34:08 2016 From: report at bugs.python.org (stephan) Date: Wed, 26 Oct 2016 12:34:08 +0000 Subject: [issue28530] Howto detect if an object is of type os.DirEntry In-Reply-To: <1477410376.41.0.315236150527.issue28530@psf.upfronthosting.co.za> Message-ID: <1477485248.83.0.157452582601.issue28530@psf.upfronthosting.co.za> stephan added the comment: Some questions: - if posix.DirEntry is exposed I think nt.DirEntry and os.DirEntry (this one is mentioned in the documentation) should be exposed - will this bw backported to 3.5 lets say 3.5.3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 09:44:05 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Oct 2016 13:44:05 +0000 Subject: [issue5996] abstract class instantiable when subclassing dict In-Reply-To: <1242050763.07.0.145569961651.issue5996@psf.upfronthosting.co.za> Message-ID: <1477489445.53.0.778553937693.issue5996@psf.upfronthosting.co.za> R. David Murray added the comment: My apologies, I added Nathaniel to nosy here when I closed the duplicate, but forgot to add a link to the closed issue: issue 28537. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 10:10:35 2016 From: report at bugs.python.org (=?utf-8?b?0JrQvtC90YHRgtCw0L3RgtC40L0g0JLQvtC70LrQvtCy?=) Date: Wed, 26 Oct 2016 14:10:35 +0000 Subject: [issue28212] Closing server in asyncio is not efficient In-Reply-To: <1474362608.68.0.912694843367.issue28212@psf.upfronthosting.co.za> Message-ID: <1477491035.32.0.294923033695.issue28212@psf.upfronthosting.co.za> ?????????? ?????? added the comment: Seems that my example wasn`t good. Real reason in it was that closing server is not closing already established connections, and seems that it is not expected to do. Andrew, can you provide your example? I catched some problems but now I think it was because of asyncio internal logic misunderstanding. May be if you provide your example there will be some ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 11:07:38 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 26 Oct 2016 15:07:38 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1477494458.61.0.0125697474741.issue28524@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> vinay.sajip priority: normal -> low versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 11:45:58 2016 From: report at bugs.python.org (Vivek Karumudi) Date: Wed, 26 Oct 2016 15:45:58 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1211455981.94.0.404413935613.issue2943@psf.upfronthosting.co.za> Message-ID: <1477496758.89.0.174715248758.issue2943@psf.upfronthosting.co.za> Vivek Karumudi added the comment: I cannot understand the cryptic message could you please change it to something meaningful for "Unable to find vcvarsall.bat" ---------- nosy: +vivekkarumudi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 11:59:22 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Oct 2016 15:59:22 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1477496758.89.0.174715248758.issue2943@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Idea: add a link to this article: https://aka.ms/vcpython or full link: https://blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat/ Related tweet from Steve Dower: https://twitter.com/zooba/status/791032320006328320 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 13:41:16 2016 From: report at bugs.python.org (Big Stone) Date: Wed, 26 Oct 2016 17:41:16 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477503676.57.0.85383700581.issue28522@psf.upfronthosting.co.za> Big Stone added the comment: Event Viewer says, when I put "Lub\site-packages" in python._pth: """" Nom de l?application d?faillante python.exe, version : 3.6.112.1013, horodatage : 0x57fc0593 Nom du module d?faillant : ucrtbase.dll, version : 10.0.14393.0, horodatage : 0x578997b5 Code d?exception : 0xc0000409 D?calage d?erreur : 0x000000000006d5b8 ID du processus d?faillant : 0x190c Heure de d?but de l?application d?faillante : 0x01d22fafd622ed09 Chemin d?acc?s de l?application d?faillante : C:\WinPython\basedir36\build\winpython-64bit-3.6.x.0\python-3.6.0b2.amd64\python.exe Chemin d?acc?s du module d?faillant: C:\WINDOWS\System32\ucrtbase.dll ID de rapport : ec44b511-6196-48a0-95ec-dc997b4d0302 Nom complet du package d?faillant?: ID de l?application relative au package d?faillant?: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 13:53:16 2016 From: report at bugs.python.org (Big Stone) Date: Wed, 26 Oct 2016 17:53:16 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477504396.7.0.629674018267.issue28522@psf.upfronthosting.co.za> Big Stone added the comment: Thanks Eryk, So the root cause is that IDLEX is no more compatible with IDLE in python3.6. ==> I can survive this loss... Now, I don't if the "python._pth" crash is a problem, as I can stay with "#Lib\site-packages" for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 14:14:17 2016 From: report at bugs.python.org (klappnase) Date: Wed, 26 Oct 2016 18:14:17 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477505657.47.0.662051320818.issue28498@psf.upfronthosting.co.za> klappnase added the comment: Ok, I hope I applied all the required changes now. The tests seemed to me to belong to test_misc, so I just added another function to the MiscTest class, I hope that is ok. The test runs well here, so I hope I did everything correctly. Thanks for your patience! ---------- Added file: http://bugs.python.org/file45230/tk_busy_3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 14:37:15 2016 From: report at bugs.python.org (klappnase) Date: Wed, 26 Oct 2016 18:37:15 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477507035.6.0.391946142485.issue28498@psf.upfronthosting.co.za> klappnase added the comment: Oops, I guess I violated PEP257 again, sorry, corrected version #4 attached. ---------- Added file: http://bugs.python.org/file45231/tk_busy_4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 14:49:53 2016 From: report at bugs.python.org (Miguel) Date: Wed, 26 Oct 2016 18:49:53 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477507793.13.0.175450137895.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Using the same reasoning applied to tk_busy_hold(), we have to change also these methods: selection_set(self, first, last=None) -> selection_set(self, **kw) coords(self, value=None) -> coords(self, **kw) identify(self, x, y) -> identity(self, **kw) delete(self, index1, index2=None) -> delete(self, **kw) mark_set(self, markName, index) -> ... mark_unset(self, *markNames) -> ... .... and many other to adapt to future changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 15:05:40 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 26 Oct 2016 19:05:40 +0000 Subject: [issue28046] Remove the concept of platform-specific directories In-Reply-To: <1473443913.59.0.936788039942.issue28046@psf.upfronthosting.co.za> Message-ID: <1477508740.3.0.938952851214.issue28046@psf.upfronthosting.co.za> Xavier de Gaye added the comment: 'make install' fails to remove the sysconfigdata module from lib-dynload and prints now instead: rm: cannot remove '/path/to/install/lib/python3.7/lib-dynload/_sysconfigdata_m.py': No such file or directory The patch fixes this. It also removes a useless and now incorrect line that was meant to echo the previously executed command. ---------- versions: +Python 3.7 Added file: http://bugs.python.org/file45232/sysconfigdata_ABIFLAGS.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 15:12:47 2016 From: report at bugs.python.org (Charles Stephens) Date: Wed, 26 Oct 2016 19:12:47 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._get_hostport() regression Message-ID: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> New submission from Charles Stephens: Back through the mists of time, there was a change to strip square brackets IPv6 address host literals in HTTPConnection._get_hostport(): https://hg.python.org/cpython/diff/433606e9546c/Lib/httplib.py However, the code mixed tabs and spaces and was "corected" by: https://hg.python.org/cpython/diff/9e2b94a3b5dc/Lib/httplib.py However, the intent was changed in the second diff and brackets won't be stripped. This causes problems when IPv6 address URL's are used with the requests package: In [1]: import httplib In [2]: con = httplib.HTTPConnection('[fe80::26a9:37ff:fe00:f764%eth0]', 15482) In [3]: con.request("GET", "/api/api-version") --------------------------------------------------------------------------- gaierror Traceback (most recent call last) in () ----> 1 con.request("GET", "/api/api-version") /usr/lib/python2.7/httplib.pyc in request(self, method, url, body, headers) 977 def request(self, method, url, body=None, headers={}): 978 """Send a complete request to the server.""" --> 979 self._send_request(method, url, body, headers) 980 981 def _set_content_length(self, body): /usr/lib/python2.7/httplib.pyc in _send_request(self, method, url, body, headers) 1011 for hdr, value in headers.iteritems(): 1012 self.putheader(hdr, value) -> 1013 self.endheaders(body) 1014 1015 def getresponse(self, buffering=False): /usr/lib/python2.7/httplib.pyc in endheaders(self, message_body) 973 else: 974 raise CannotSendHeader() --> 975 self._send_output(message_body) 976 977 def request(self, method, url, body=None, headers={}): /usr/lib/python2.7/httplib.pyc in _send_output(self, message_body) 833 msg += message_body 834 message_body = None --> 835 self.send(msg) 836 if message_body is not None: 837 #message_body was not a string (i.e. it is a file) and /usr/lib/python2.7/httplib.pyc in send(self, data) 795 if self.sock is None: 796 if self.auto_open: --> 797 self.connect() 798 else: 799 raise NotConnected() /usr/lib/python2.7/httplib.pyc in connect(self) 776 """Connect to the host and port specified in __init__.""" 777 self.sock = socket.create_connection((self.host,self.port), --> 778 self.timeout, self.source_address) 779 780 if self._tunnel_host: /usr/lib/python2.7/socket.pyc in create_connection(address, timeout, source_address) 551 host, port = address 552 err = None --> 553 for res in getaddrinfo(host, port, 0, SOCK_STREAM): 554 af, socktype, proto, canonname, sa = res 555 sock = None gaierror: [Errno -2] Name or service not known ---------- components: Library (Lib) files: get_hostport.diff keywords: patch messages: 279509 nosy: cfs-pure priority: normal severity: normal status: open title: httplib/http.client HTTPConnection._get_hostport() regression versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45233/get_hostport.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 15:14:02 2016 From: report at bugs.python.org (klappnase) Date: Wed, 26 Oct 2016 19:14:02 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477509242.18.0.804943503166.issue28498@psf.upfronthosting.co.za> klappnase added the comment: This is something entirely different, since the commands you list here in tk do not accept keyword arguments at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 15:46:26 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 26 Oct 2016 19:46:26 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477511186.97.0.0403180702394.issue28522@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +roger.serwy, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 15:57:39 2016 From: report at bugs.python.org (Charles Stephens) Date: Wed, 26 Oct 2016 19:57:39 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477511859.51.0.596603701104.issue28539@psf.upfronthosting.co.za> Changes by Charles Stephens : ---------- title: httplib/http.client HTTPConnection._get_hostport() regression -> httplib/http.client HTTPConnection._set_hostport() regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 15:58:09 2016 From: report at bugs.python.org (Charles Stephens) Date: Wed, 26 Oct 2016 19:58:09 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477511889.0.0.948890647616.issue28539@psf.upfronthosting.co.za> Charles Stephens added the comment: Er, that is HTTPConnection._set_hostport() not _get_hostport() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 17:23:57 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Oct 2016 21:23:57 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477517037.75.0.056915107501.issue28539@psf.upfronthosting.co.za> Martin Panter added the comment: You say this is a regression. Can you point to a version that worked as you want? The IPv6 URL handling you pointed out seems to have been added to 2.4b1, and then backported to 2.3.5. I expect that earlier versions didn?t support IPv6 URLs at all. Also, it does not seem to me that parsing the square bracket form was intended if the port is specified separately. Look at the test cases added in revision 433606e9546c. Perhaps you aren?t encoding the URL correctly, or Requests isn?t parsing the hostname correctly. Also, according to RFC 6874, it would be more proper to encode the percent sign as %25, so the URL would have [fe80::26a9:37ff:fe00:f764%25eth0]. But I don?t think Python supports this; see Issue 23448. ---------- nosy: +martin.panter stage: -> patch review versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 17:25:41 2016 From: report at bugs.python.org (Francisco Couzo) Date: Wed, 26 Oct 2016 21:25:41 +0000 Subject: [issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception Message-ID: <1477517141.8.0.311598434825.issue28540@psf.upfronthosting.co.za> New submission from Francisco Couzo: Most functions in the math library raise an OverflowError when the arguments are finite but the result is not. >>> math.exp(sys.float_info.max) Traceback (most recent call last): File "", line 1, in OverflowError: math range error >>> math.degrees(sys.float_info.max) inf ---------- messages: 279513 nosy: franciscouzo priority: normal severity: normal status: open title: math.degrees(sys.float_info.max) should throw an OverflowError exception _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 17:51:04 2016 From: report at bugs.python.org (Ivan Pozdeev) Date: Wed, 26 Oct 2016 21:51:04 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1211455981.94.0.404413935613.issue2943@psf.upfronthosting.co.za> Message-ID: <1477518664.91.0.728072226797.issue2943@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: @haypo, as I said, it's undesirable to link to a 3rd party site in a built-in error message because its availability and content are outside the dev team's control. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 17:54:14 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Oct 2016 21:54:14 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477518854.63.0.000525058709106.issue28522@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I don't know anything about 'python._pth' and whether there is any bug with respect to that. As far as IDLE goes, there is no bug and this issue should be closed. In #24225, before the release of 3.6.0a2, most file names within idlelib were changed to shorter or lowercased names in conformance with PEP 8 and as anticipated by PEP 434. In particular, 'configHandler.py' is now 'config.py'. API changes within and between files are and will be much more disruptive to external users. As Nick Coughlin said in msg266409, 3rd party idlelib users are free to bundle or depend on a frozen copy of a past version. WinPython should test the third party modules it includes with the python it is releasing. Importing a module is as minimal as it gets. Consider reporting the incompatibility to them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 18:03:38 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Oct 2016 22:03:38 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1477518664.91.0.728072226797.issue2943@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Maybe we can add an entry to the Python FAQ, use this link and then add a link to the Microsoft article. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 18:03:58 2016 From: report at bugs.python.org (Charles Stephens) Date: Wed, 26 Oct 2016 22:03:58 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477519438.16.0.254960167532.issue28539@psf.upfronthosting.co.za> Charles Stephens added the comment: I misapplied the term 'regression'. My intent was to describe how original author's change revision 433606e9546c was refactored to make it perform incorrectly. Without the scope specifier, the outcome is the same when HTTPConnection is instantiated. When both the host and port arguments are specified, the square brackets are not stripped and are stored in the host attribute. When the port number is part of the host argument and the port argument is None, the host attribute does not include the square brackets. Examples: Python 2.7.10 (default, Jul 30 2016, 18:31:42) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import httplib >>> con1 = httplib.HTTPConnection('[fe80::26a9:37ff:fe00:f764]', 15482) >>> con1.host, con1.port ('[fe80::26a9:37ff:fe00:f764]', 15482) >>> con2 = httplib.HTTPConnection('[fe80::26a9:37ff:fe00:f764]:15482') >>> con2.host, con2.port ('fe80::26a9:37ff:fe00:f764', 15482) Compare with IPv4 behavior: >>> con3 = httplib.HTTPConnection('127.0.0.1', 15482) >>> con3.host, con3.port ('127.0.0.1', 15482) >>> con4 = httplib.HTTPConnection('127.0.0.1:15482') >>> con4.host, con4.port ('127.0.0.1', 15482) Calls to con1.request() will fail in socket.py because getaddrinfo will choke on the square brackets. Which makes sense since HTTPConnection.host is passed on down the stack as-is until it reaches create_connection() in socket.py. Moving the indent of that if block up one level makes con1 identical to con2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 18:06:11 2016 From: report at bugs.python.org (Charles Stephens) Date: Wed, 26 Oct 2016 22:06:11 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477519571.72.0.245620986423.issue28539@psf.upfronthosting.co.za> Charles Stephens added the comment: Example with patch applied: Python 2.7.6 (default, Oct 26 2016, 20:33:50) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import httplib >>> con1 = httplib.HTTPConnection('[fe80::26a9:37ff:fe00:f764]', 15482) >>> con1.host, con1.port ('fe80::26a9:37ff:fe00:f764', 15482) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 19:17:35 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Oct 2016 23:17:35 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477523855.77.0.599724925432.issue28539@psf.upfronthosting.co.za> Martin Panter added the comment: I tried the original revision 433606e9546c code in Python 2.7 (which still allows mixed tabs and spaces), and it behaves the same as the current version. Thus I suspect revision 9e2b94a3b5dc did not change any behaviour. What is your use case? Why can?t you just pass the address without square brackets: >>> con = HTTPConnection("fe80::26a9:37ff:fe00:f764", 15482) >>> (con.host, con.port) ('fe80::26a9:37ff:fe00:f764', 15482) How do you come by an IPv6 address in square brackets, but with the port number separate? You can use urlsplit() to extract the ?hostname? and ?port? attributes from a URL, but in that case ?hostname? does not include the square brackets: >>> urlsplit("//[fe80::26a9:37ff:fe00:f764]:15482").hostname 'fe80::26a9:37ff:fe00:f764' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 20:35:19 2016 From: report at bugs.python.org (Charles Stephens) Date: Thu, 27 Oct 2016 00:35:19 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477528519.44.0.744445523721.issue28539@psf.upfronthosting.co.za> Charles Stephens added the comment: Our internal use case is happening through requests via urllib3 for parsing. Essentially requests is taking the URL, passing it to urllib3 for parsing. urllib3 is returning a namedtuple of type Url which includes a host and port property which is being fed to httplib. Essentially: >>> import urllib3 >>> import httplib >>> orig_url = 'http://[2620:125:9014:3240:14:240:128:0]:8080/api/python' >>> u1 = urllib3.util.parse_url(orig_url) >>> u1 Url(scheme='http', auth=None, host='[2620:125:9014:3240:14:240:128:0]', port=8080, path='/api/python', query=None, fragment=None) >>> c1 = httplib.HTTPConnection(u1.host, port=u1.port) >>> c1.host, c1.port ('[2620:125:9014:3240:14:240:128:0]', 8080) >>> c1.request('GET', '/api/json') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/httplib.py", line 979, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 1013, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 975, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 835, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 797, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 778, in connect self.timeout, self.source_address) File "/usr/lib/python2.7/socket.py", line 553, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno -2] Name or service not known ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 23:06:57 2016 From: report at bugs.python.org (Eric Appelt) Date: Thu, 27 Oct 2016 03:06:57 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes Message-ID: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> New submission from Eric Appelt: Increase test coverage of the json library, specifically the detect_encoding() function in the __init__ module, which is used to handle the autodetection of the encoding of a bytes object passed to json.loads(). This function was added in issue 17909 which extended the json.loads() function to accept bytes. Note that this is a small patch as I am following section 5 of the developer guide and I am trying to acquaint myself with the process as a first time contributor. I found this missing coverage just by semi-randomly looking at individual modules of interest. Please let me know if I have made any general mistakes in constructing this ticket. Thanks! ---------- components: Tests files: mywork.patch keywords: patch messages: 279521 nosy: Eric Appelt priority: normal severity: normal status: open title: Improve test coverage for json library - loading bytes versions: Python 3.6 Added file: http://bugs.python.org/file45234/mywork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 23:13:52 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 27 Oct 2016 03:13:52 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477538032.82.0.221575160257.issue28539@psf.upfronthosting.co.za> Zachary Ware added the comment: That looks like a bug in urllib3 to me. The host is *not* '[2620:125:9014:3240:14:240:128:0]', the host is '2620:125:9014:3240:14:240:128:0'; the brackets are merely for disambiguating the port. Compare to urllib.parse.urlsplit: >>> from urllib.parse import urlsplit >>> s = urlsplit('http://[2620:125:9014:3240:14:240:128:0]:8080/api/python') >>> s.hostname '2620:125:9014:3240:14:240:128:0' >>> s.port 8080 >>> s.netloc '[2620:125:9014:3240:14:240:128:0]:8080' I'd recommend pursuing this with urllib3, but do take a look at existing IPv6 parsing issues there as a cursory glance at their bug tracker shows several of them. That said, I don't know of any particular reason not to strip brackets in HTTPConnection anyway. Brackets cannot be part of a valid hostname, can they? ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 23:20:28 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 27 Oct 2016 03:20:28 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes In-Reply-To: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> Message-ID: <1477538428.29.0.722382846216.issue28541@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +ezio.melotti, rhettinger, zach.ware stage: -> patch review type: -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 23:29:27 2016 From: report at bugs.python.org (Charles Stephens) Date: Thu, 27 Oct 2016 03:29:27 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477538967.86.0.771673489942.issue28539@psf.upfronthosting.co.za> Charles Stephens added the comment: Not when passing it to getaddrinfo(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 23:30:30 2016 From: report at bugs.python.org (Charles Stephens) Date: Thu, 27 Oct 2016 03:30:30 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477539030.49.0.509983136182.issue28539@psf.upfronthosting.co.za> Charles Stephens added the comment: Yes, I'm working on patching urllib3 to preprocess the host argument to HTTPConnection. However, it makes sense to strip square brackets regardless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 23:54:10 2016 From: report at bugs.python.org (=?utf-8?q?Cl=C3=A9ment?=) Date: Thu, 27 Oct 2016 03:54:10 +0000 Subject: [issue25660] tabs don't work correctly in python repl In-Reply-To: <1447876730.91.0.918964104484.issue25660@psf.upfronthosting.co.za> Message-ID: <1477540450.87.0.447484375945.issue25660@psf.upfronthosting.co.za> Cl?ment added the comment: Could this commit be the reason why the attached code behaves differently in 2.7 and 3.5.2? This is the code used by Emacs' default Python mode to do completion; with it (python -i completion.py), pressing "tab" on a plain prompt offers candidates in Python 2.7, but it doesn't in Python 3.5.2 (instead, it inserts a tab). ---------- nosy: +cpitclaudel Added file: http://bugs.python.org/file45235/completion.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 02:32:24 2016 From: report at bugs.python.org (Michael Haubenwallner) Date: Thu, 27 Oct 2016 06:32:24 +0000 Subject: [issue10656] "Out of tree" build fails on AIX In-Reply-To: <1291865704.62.0.494509897126.issue10656@psf.upfronthosting.co.za> Message-ID: <1477549944.34.0.717470223026.issue10656@psf.upfronthosting.co.za> Michael Haubenwallner added the comment: Modules/python.exp is generated at build-time, thus does not belong to $(srcdir). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 02:36:22 2016 From: report at bugs.python.org (Eryk Sun) Date: Thu, 27 Oct 2016 06:36:22 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477550182.33.0.894180068535.issue28522@psf.upfronthosting.co.za> Eryk Sun added the comment: You may have uncovered a bug in Python that's causing the invalid parameter handler to be invoked. It would help if you uploaded the zipped dump file for the crashed process. The status code you're getting (i.e. STATUS_STACK_BUFFER_OVERRUN, 0xC0000409) is used by the __fastfail intrinsic [1]. The exception occurred in ucrtbase.dll at offset 0x6d5b8. In a debugger you can see it's in the CRT's invoke_watson function: 0:000> u ucrtbase + 0x6d5b8 - 0x18 L7 ucrtbase!invoke_watson: 00007ffd`8984d5a0 4883ec28 sub rsp,28h 00007ffd`8984d5a4 b917000000 mov ecx,17h 00007ffd`8984d5a9 ff1531310400 call qword ptr [ucrtbase!_imp_IsProcessorFeaturePresent (00007ffd`898906e0)] 00007ffd`8984d5af 85c0 test eax,eax 00007ffd`8984d5b1 7407 je ucrtbase!invoke_watson+0x1a (00007ffd`8984d5ba) 00007ffd`8984d5b3 b905000000 mov ecx,5 00007ffd`8984d5b8 cd29 int 29h A fast fail executes an int 29h software interrupt, which gets handled by the following system function: lkd> !idt 0x29 Dumping IDT: fffff801819a8070 29: fffff8017fd66680 nt!KiRaiseSecurityCheckFailure In this case the CRT passes a value of 5 (FAST_FAIL_INVALID_ARG) in register rcx (ecx), so it's not a critical security failure. [1]: https://msdn.microsoft.com/en-us/library/dn774154.aspx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 03:16:06 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 07:16:06 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1477552566.77.0.606874655487.issue28509@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 28509-smaller-update2.patch LGTM. Your idea in msg279480 looks worth, but needs benchmarking different corner cases to check that it doesn't cause to a regression. I think we will have enough time for this at 3.7 developing stage. ---------- assignee: -> inada.naoki stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 03:19:22 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 07:19:22 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477552762.88.0.915169527254.issue23262@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45236/webbrowser.py-3.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 04:12:47 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 08:12:47 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477555967.2.0.862295224687.issue23262@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The problem is that this class is used for Netscape and old Mozilla browsers. What if rename old Mozilla class to Netscape and use it for old browsers? ---------- Added file: http://bugs.python.org/file45237/webbrowser.py-3.5-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 04:26:18 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 08:26:18 +0000 Subject: [issue27275] KeyError thrown by optimised collections.OrderedDict.popitem() In-Reply-To: <1465446835.8.0.930561202137.issue27275@psf.upfronthosting.co.za> Message-ID: <1477556778.87.0.103397610955.issue27275@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In issue28014 __getitem__() is idempotent. Multiple calls of __getitem__() return the same result and keep the OrderedDict in the same state. > I'd be perfectly happy with making popitem implemented in terms of pop on subclasses when pop is overridden (if pop isn't overridden though, that's effectively what popitem already does). I like this idea. > Note: In the expiring case, the fix is still "wrong" if someone used popitem for the intended purpose (to get and delete). Good catch! But old implementation still looks doubtful to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 04:40:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 08:40:39 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes In-Reply-To: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> Message-ID: <1477557639.89.0.819567094898.issue28541@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Isn't the test added in issue17909 enough? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 06:17:40 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 27 Oct 2016 10:17:40 +0000 Subject: [issue28542] document cross compilation Message-ID: <1477563460.46.0.569265292251.issue28542@psf.upfronthosting.co.za> New submission from Xavier de Gaye: Patch adding a section to the README. ---------- assignee: xdegaye files: readme.patch keywords: patch messages: 279532 nosy: xdegaye priority: normal severity: normal stage: patch review status: open title: document cross compilation type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45238/readme.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 06:27:11 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 27 Oct 2016 10:27:11 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1477564031.44.0.624585611887.issue28444@psf.upfronthosting.co.za> Xavier de Gaye added the comment: New patch taking into account Martin last review and some updated comments. >> Why do you remove the code that loops over Modules/Setup? Maybe is it redundant with the other code for removing the already-built-in modules? > Yes because this is redundant, maybe not the case when this was written 15 years ago. * sys.builtin_module_names are the modules listed in the _PyImport_Inittab[] array that is built by Modules/makesetup from Modules/config.c.in and the '*static*' modules configured in the Setup files (those Setup files that are listed in the rule of the 'Makefile' target of the Makefile). This list is missing the '*shared*' modules configured in the Setup files and that should not be built by setup.py. * The setup.py code that loops over and loosely parses some of the Modules/Setup files, excludes both '*static*' and '*shared*' modules from the built modules. * 'MODNAMES' does the same thing in the patch accurately as the list is built by makesetup. New issue 28542 to document the cross-compilation. ---------- Added file: http://bugs.python.org/file45239/removed_modules_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 06:30:21 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Oct 2016 10:30:21 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <20161027103018.9481.39990.A2054A5D@psf.io> Roundup Robot added the comment: New changeset 8c2615decd2e by INADA Naoki in branch '3.6': Issue #28509: dict.update() no longer allocate unnecessary large memory https://hg.python.org/cpython/rev/8c2615decd2e New changeset deb3e5857d8c by INADA Naoki in branch 'default': Issue #28509: dict.update() no longer allocate unnecessary large memory https://hg.python.org/cpython/rev/deb3e5857d8c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 06:31:04 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 27 Oct 2016 10:31:04 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1477564264.19.0.95080135832.issue28509@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 07:52:22 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 27 Oct 2016 11:52:22 +0000 Subject: [issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception In-Reply-To: <1477517141.8.0.311598434825.issue28540@psf.upfronthosting.co.za> Message-ID: <1477569142.15.0.178870661988.issue28540@psf.upfronthosting.co.za> Mark Dickinson added the comment: I agree in principle. On one hand, it's difficult to care too much, since `math.degrees` is going to be all-but-useless for inputs larger than `1e20` or so anyway (the actual angle represented is getting lost in floating-point noise by that point). OTOH, *because* of the above, at least making the change shouldn't break any code that wasn't broken already. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 08:26:29 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 27 Oct 2016 12:26:29 +0000 Subject: [issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception In-Reply-To: <1477517141.8.0.311598434825.issue28540@psf.upfronthosting.co.za> Message-ID: <1477571189.14.0.528514930021.issue28540@psf.upfronthosting.co.za> Mark Dickinson added the comment: Francisco: would you be interested in writing a patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 08:29:40 2016 From: report at bugs.python.org (Eric Appelt) Date: Thu, 27 Oct 2016 12:29:40 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes In-Reply-To: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> Message-ID: <1477571380.97.0.681195766766.issue28541@psf.upfronthosting.co.za> Eric Appelt added the comment: I looked back and something is clearly wrong with my coverage reporting setup, sorry :( When I move the test introduced in issue 17909, 'test_bytes_decode' from the module Lib/test/test_json/test_unicode.py to Lib/test/test_json/test_decode.py that particular test is properly traced and I see that the function is mostly covered, so I need to figure out what is going wrong in my setup. The test already present is more comprehensive as it includes BOM, so I believe what I wrote is generally not helpful. I did notice that the existing test does not cover the edge-case of a 2-byte utf-16 sequence that can be generated for a valid JSON object represented by a single codepoint, for example '5' or '7'. I created a new patch to augment the existing test to cover this special case rather than adding a test. ---------- Added file: http://bugs.python.org/file45240/mywork2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 10:20:00 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 27 Oct 2016 14:20:00 +0000 Subject: [issue28543] Incomplete fast path codecs aliases in codecs doc Message-ID: <1477578000.23.0.835433953777.issue28543@psf.upfronthosting.co.za> New submission from Xiang Zhang: The fast path codec aliases in codecs doc is complete especially after 99818330b4c0. ---------- assignee: docs at python components: Documentation files: codecs_doc.patch keywords: patch messages: 279538 nosy: docs at python, haypo, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Incomplete fast path codecs aliases in codecs doc type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45241/codecs_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 10:57:58 2016 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Oct 2016 14:57:58 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477580278.57.0.37065420539.issue28522@psf.upfronthosting.co.za> Steve Dower added the comment: I suspect there's a .pth file in site-packages that is importing something to trigger the failure. Without a crash dump (or debug build) it's going to be difficult to find it, but it is certainly an unwrapped invalid parameter termination. To save me some time, where can I get that build of WinPython from? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 10:58:28 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 27 Oct 2016 14:58:28 +0000 Subject: [issue28542] document cross compilation In-Reply-To: <1477563460.46.0.569265292251.issue28542@psf.upfronthosting.co.za> Message-ID: <1477580308.65.0.8928429694.issue28542@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- components: +Cross-Build, Documentation nosy: +Alex.Willmer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 11:45:19 2016 From: report at bugs.python.org (Matthias Klose) Date: Thu, 27 Oct 2016 15:45:19 +0000 Subject: [issue28401] Don't support the PEP384 stable ABI in pydebug builds In-Reply-To: <1476034292.17.0.316209799179.issue28401@psf.upfronthosting.co.za> Message-ID: <1477583119.46.0.351439495864.issue28401@psf.upfronthosting.co.za> Matthias Klose added the comment: I'm not sure that you really want this, because it would make it impossible to build an extension for the stable ABI for a debug build. The problem is Debian specific, because we install the extension modules for normal and debug builds in the same location. A Debian solution would be to use a different soname for stable API debug mode extensions. ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 11:46:45 2016 From: report at bugs.python.org (Oleg Broytman) Date: Thu, 27 Oct 2016 15:46:45 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477583205.91.0.315277979802.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: I'd rather rename the new class to something like Firefox. So there will be 3 classes ? Netscape, Mozilla and Firefox. Firefox only for firefox executable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 11:48:59 2016 From: report at bugs.python.org (Stefano Rivera) Date: Thu, 27 Oct 2016 15:48:59 +0000 Subject: [issue28401] Don't support the PEP384 stable ABI in pydebug builds In-Reply-To: <1476034292.17.0.316209799179.issue28401@psf.upfronthosting.co.za> Message-ID: <1477583339.66.0.85507999928.issue28401@psf.upfronthosting.co.za> Stefano Rivera added the comment: I wouldn't say it's *entirely* Debian-specific. It just bites anyone who actually needs these tags to differentiate between built extensions. (Mostly Debian) Yes, changing the tag is a more complete solution. It just seemed that that option was decided against, in the relevant PEPs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 11:55:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 15:55:39 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes In-Reply-To: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> Message-ID: <1477583739.33.0.145486091052.issue28541@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch in issue17909 was written to implement encoding detecting described in RFC 4627 [1]. And the test uses RFC 4627 conforming data. A single codepoint "5" is not valid in RFC 4627, but is valid in RFC 7159 [2]. The comment in your patch is not accurate since '5' is encoded to 1 byte with utf-8 and 4 bytes with utf-32*. [1] https://tools.ietf.org/html/rfc4627 [2] https://tools.ietf.org/html/rfc7159 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 12:22:50 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 16:22:50 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477585370.39.0.195762081621.issue23262@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Currently Netscape is just an alias to Mozilla. Since SeaMonkey is synchronized with Firefox, I suppose it dropped the support of the -remote option at the same time. Debian rebranded Firefox and SeaMonkey at 2006, therefore IceWeasel and IceApe always supported -new-win and -new-tab options. The last IceWeasel version was 38, it didn't supported the -remote option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 12:28:18 2016 From: report at bugs.python.org (Oleg Broytman) Date: Thu, 27 Oct 2016 16:28:18 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477585698.08.0.44858560399.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: Then I don't have any objections. But I also couldn't test the change ? I only use Firefox (and sometimes Chrome). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 12:33:12 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 27 Oct 2016 16:33:12 +0000 Subject: [issue28544] Implement asyncio.Task in C Message-ID: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> New submission from Yury Selivanov: The attached patch implements asyncio.Task in C. Besides that, it also implements Argument Clinic for C Future. Performance improvement on a simple echo server implementation using asyncio.streams: Python Future & Task | C Future & Py Task | C Future & C Task 23K req/s | 26K | 30K | ~10-15% boost | ~15% Both Task and Future implemented in C, make asyncio programs up to 25-30% faster. The patch is 100% backwards compatible. I modified asyncio tests to cross test Tasks and Futures implementations, i.e. to run Task+Future, Task+CFuture, CTask+Future, CTask+CFuture tests. No refleaks or other bugs. All uvloop functional tests pass without any problem. Ned, Guido, are you OK if I merge this in 3.6 before beta 3? I'm confident that the patch is stable and even if something comes up we have time to fix it or even retract the patch. The performance boost is very impressive, and I can also make uvloop simpler. ---------- assignee: yselivanov components: asyncio files: ctask.patch keywords: patch messages: 279546 nosy: asvetlov, gvanrossum, haypo, inada.naoki, ned.deily, yselivanov priority: normal severity: normal stage: patch review status: open title: Implement asyncio.Task in C type: performance versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45242/ctask.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 12:33:48 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Oct 2016 16:33:48 +0000 Subject: [issue28526] Use PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedObject In-Reply-To: <1477384958.56.0.348226525615.issue28526@psf.upfronthosting.co.za> Message-ID: <20161027163345.25261.21275.88800453@psf.io> Roundup Robot added the comment: New changeset bea48e72cae5 by Serhiy Storchaka in branch '3.5': Issue #28526: Use PyUnicode_AsEncodedString() instead of https://hg.python.org/cpython/rev/bea48e72cae5 New changeset fe9f361f3751 by Serhiy Storchaka in branch '3.6': Issue #28526: Use PyUnicode_AsEncodedString() instead of https://hg.python.org/cpython/rev/fe9f361f3751 New changeset a6548e230ed6 by Serhiy Storchaka in branch 'default': Issue #28526: Use PyUnicode_AsEncodedString() instead of https://hg.python.org/cpython/rev/a6548e230ed6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 12:34:33 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 16:34:33 +0000 Subject: [issue28526] Use PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedObject In-Reply-To: <1477384958.56.0.348226525615.issue28526@psf.upfronthosting.co.za> Message-ID: <1477586073.37.0.444031159229.issue28526@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Josh. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 12:35:55 2016 From: report at bugs.python.org (Elvis Pranskevichus) Date: Thu, 27 Oct 2016 16:35:55 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477586155.0.0.829066487982.issue28544@psf.upfronthosting.co.za> Changes by Elvis Pranskevichus : ---------- nosy: +Elvis.Pranskevichus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 12:46:59 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 27 Oct 2016 16:46:59 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477586819.51.0.0794628687078.issue28544@psf.upfronthosting.co.za> Yury Selivanov added the comment: Also, with this patch uvloop becomes ~3-5% faster too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 13:16:14 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 27 Oct 2016 17:16:14 +0000 Subject: [issue28531] Improve utf7 encoder memory usage In-Reply-To: <1477412206.88.0.583380682603.issue28531@psf.upfronthosting.co.za> Message-ID: <1477588574.51.0.580787513062.issue28531@psf.upfronthosting.co.za> Xiang Zhang added the comment: v2 uses _PyBytesWriter so we can use on stack buffer for short string. ---------- Added file: http://bugs.python.org/file45243/utf7_encoder_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 13:28:07 2016 From: report at bugs.python.org (Big Stone) Date: Thu, 27 Oct 2016 17:28:07 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477589287.39.0.646860938112.issue28522@psf.upfronthosting.co.za> Big Stone added the comment: hi Steve, You can grab it there https://sourceforge.net/projects/winpython/files/WinPython_3.6/3.6.0.0/betas/WinPython-64bit-3.6.0.0Zerorc2.exe/download MD5 | SHA-1 | SHA-256 | Binary | Size ---------------------------------|------------------------------------------|------------------------------------------------------------------|---------------------------------|------------------- dd946ed17ee86ea035361d2e757a1cc1 | f0ec7ffac477a220dd24aea3fb70afaba579df00 | af6536f1922a044ac74300efcd275c9e25c5eb56140ded84a99f11d38ae5ac7b | WinPython-64bit-3.6.0.0Zerorc2.exe | 24 196 083 Bytes dabae69ad09e1646625d3a8995a75056 | aaece4907096422c1df78f80a42a2268369d7697 | 0d530b84f29481e7f03e4615c9da489711ca6883b49996219d9cd13aa5393330 | WinPython-64bit-3.6.0.0rc2.exe | 208 255 944 Bytes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 13:34:55 2016 From: report at bugs.python.org (Big Stone) Date: Thu, 27 Oct 2016 17:34:55 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477589695.15.0.363780715183.issue28522@psf.upfronthosting.co.za> Big Stone added the comment: maybe click on the "WinPython Command Prompt.exe" and do "pip uninstall IDLEX" as a first step. so you should see IDLE working ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 13:38:58 2016 From: report at bugs.python.org (INADA Naoki) Date: Thu, 27 Oct 2016 17:38:58 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477589938.45.0.51946160372.issue28544@psf.upfronthosting.co.za> INADA Naoki added the comment: Wow! Great Job! Yury, would you like to merge this before 3.6b3? I'll look this as soon as possible. (nit fix) Some modules doesn't sort imports in lexicography. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 13:40:51 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 27 Oct 2016 17:40:51 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477590051.28.0.780656974608.issue28544@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Yury, would you like to merge this before 3.6b3? Yes! > I'll look this as soon as possible. Thanks a lot! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 13:47:27 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 27 Oct 2016 17:47:27 +0000 Subject: [issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception In-Reply-To: <1477517141.8.0.311598434825.issue28540@psf.upfronthosting.co.za> Message-ID: <1477590447.32.0.91628634618.issue28540@psf.upfronthosting.co.za> Mark Dickinson added the comment: Actually, here's a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file45244/math-degrees-overflow.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 14:03:09 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 18:03:09 +0000 Subject: [issue28531] Improve utf7 encoder memory usage In-Reply-To: <1477412206.88.0.583380682603.issue28531@psf.upfronthosting.co.za> Message-ID: <1477591389.54.0.036031641465.issue28531@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The performance of the UTF-7 codec is not important. Unlikely to other UTF-* encodings this is not standard Unicode encoding. It is used in minority of applications and unlikely is a bottleneck. It is rather in the line of idna and punycode than UTF-8 and UTF-32. Actually I'm going to propose replacing it with Python implementation. This encoder was omitted form _PyBytesWriter-using optimizations for purpose. The patch complicates the implementation. Since the codec is rarely used some bugs lived long time in it. Any change risks to add new long living bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 14:08:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Oct 2016 18:08:18 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <20161027180815.9309.29057.3FADA2EC@psf.io> Roundup Robot added the comment: New changeset 15a494886c5a by Serhiy Storchaka in branch '3.6': Issue #28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(), https://hg.python.org/cpython/rev/15a494886c5a New changeset 50c28727d91c by Serhiy Storchaka in branch 'default': Issue #28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(), https://hg.python.org/cpython/rev/50c28727d91c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 14:14:58 2016 From: report at bugs.python.org (Martin Turon) Date: Thu, 27 Oct 2016 18:14:58 +0000 Subject: [issue28545] socket.bind to AF_PACKET should use passed interface name Message-ID: <1477592098.82.0.815527711646.issue28545@psf.upfronthosting.co.za> New submission from Martin Turon: When binding to AF_PACKET linux kernel sockets, the interface name is not passed in when given -- it is always "". This causes problems, for example, receiving packets to a "monitor0" interface doesn't work. diff -r a6548e230ed6 Modules/socketmodule.c --- a/Modules/socketmodule.c Thu Oct 27 19:33:22 2016 +0300 +++ b/Modules/socketmodule.c Thu Oct 27 11:13:12 2016 -0700 @@ -1344,6 +1344,7 @@ { struct sockaddr_ll *a = (struct sockaddr_ll *)addr; char *ifname = ""; + // ^^ ifname should be set to interface name passed in via sockaddr. struct ifreq ifr; /* need to look up interface name give index */ if (a->sll_ifindex) { ---------- messages: 279558 nosy: mturon priority: normal severity: normal status: open title: socket.bind to AF_PACKET should use passed interface name _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 14:17:34 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 18:17:34 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1477592254.44.0.525401329429.issue28426@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Xiang. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 14:19:54 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 27 Oct 2016 18:19:54 +0000 Subject: [issue28528] Pdb.checkline() In-Reply-To: <1477401123.41.0.136094342663.issue28528@psf.upfronthosting.co.za> Message-ID: <1477592394.32.0.590356563216.issue28528@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 14:35:16 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Oct 2016 18:35:16 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477593316.02.0.479722538962.issue28544@psf.upfronthosting.co.za> Ned Deily added the comment: If it's OK with Guido, it's OK with me for 360b3. (That's Monday.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 14:43:20 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Oct 2016 18:43:20 +0000 Subject: [issue28496] Mark up constants 0, 1, -1 in C API docs In-Reply-To: <1477044445.15.0.0158550181363.issue28496@psf.upfronthosting.co.za> Message-ID: <20161027184315.109845.97416.62567050@psf.io> Roundup Robot added the comment: New changeset e90fe2209276 by Serhiy Storchaka in branch '2.7': Issue #28496: Mark up constants 0, 1 and -1 that denote return values or https://hg.python.org/cpython/rev/e90fe2209276 New changeset 04065efd7747 by Serhiy Storchaka in branch '3.5': Issue #28496: Mark up constants 0, 1 and -1 that denote return values or https://hg.python.org/cpython/rev/04065efd7747 New changeset de00be368f0b by Serhiy Storchaka in branch '3.6': Issue #28496: Mark up constants 0, 1 and -1 that denote return values or https://hg.python.org/cpython/rev/de00be368f0b New changeset e19f2428b15a by Serhiy Storchaka in branch 'default': Issue #28496: Mark up constants 0, 1 and -1 that denote return values or https://hg.python.org/cpython/rev/e19f2428b15a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 14:43:42 2016 From: report at bugs.python.org (Martin Turon) Date: Thu, 27 Oct 2016 18:43:42 +0000 Subject: [issue28545] socket.bind to AF_PACKET should use passed interface name In-Reply-To: <1477592098.82.0.815527711646.issue28545@psf.upfronthosting.co.za> Message-ID: <1477593822.65.0.620141823972.issue28545@psf.upfronthosting.co.za> Martin Turon added the comment: Just for clarity, the high level bug is that when binding to an interface using AF_PACKET, transmissions work, but receive does not: sock = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, ETH_P_IEEE802154) sock.bind(("monitor0", ETH_P_IEEE802154)) sock.send(test_frame) # transmission works fine pkt = sock.recv(127) # never receives, though C test works fine The same test written in C that calls ioctl(sockfd, SIOCGIFNAME, &ifr) to lookup ifindex for bind from ifname="monitor0" works fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 14:43:51 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 18:43:51 +0000 Subject: [issue28496] Mark up constants 0, 1, -1 in C API docs In-Reply-To: <1477044445.15.0.0158550181363.issue28496@psf.upfronthosting.co.za> Message-ID: <1477593831.43.0.370260331944.issue28496@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 15:02:17 2016 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Oct 2016 19:02:17 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477594937.76.0.991639918301.issue28522@psf.upfronthosting.co.za> Steve Dower added the comment: It's a genuine bug in path processing, specifically how we handle buffer resizing. I'll make a fix. ---------- assignee: -> steve.dower stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 15:18:33 2016 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 27 Oct 2016 19:18:33 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477595913.02.0.703018427637.issue28544@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Very impressive. I've left a couple comments in rietveld though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 15:32:57 2016 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 27 Oct 2016 19:32:57 +0000 Subject: [issue28212] Closing server in asyncio is not efficient In-Reply-To: <1474362608.68.0.912694843367.issue28212@psf.upfronthosting.co.za> Message-ID: <1477596777.17.0.576831471398.issue28212@psf.upfronthosting.co.za> Andrew Svetlov added the comment: >From my perspective the problem is: many asyncio calls schedules a delayed activity internally. E.g. `task.cancel()` doesn't cancels immediately but requires at least one extra loop iteration. The same is true for `transport.close()` -- it doesn't close socket in the call. This behavior is encouraged by asyncio design and many third-party libraries just call `transp.close()` without waiting for upcoming `protocol.connection_lost()` callback. I don't think it's a big problem, especially for server code. But when users write small client tool they need to do extra no-op loop iterations before `loop.close()` call. Waiting for no scheduled by `loop.call_soon()` callbacks makes no sense I believe. I could open a can of worms by introducing another weird side effects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 15:50:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Oct 2016 19:50:50 +0000 Subject: [issue22949] fnmatch.translate doesn't add ^ at the beginning In-Reply-To: <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za> Message-ID: <20161027195046.25155.43686.04508CE2@psf.io> Roundup Robot added the comment: New changeset a1aef5f84142 by Serhiy Storchaka in branch '3.5': Issue #22949: Documented that fnmatch.translate() is for use with re.match(). https://hg.python.org/cpython/rev/a1aef5f84142 New changeset 8a564ab1d208 by Serhiy Storchaka in branch '2.7': Issue #22949: Documented that fnmatch.translate() is for use with re.match(). https://hg.python.org/cpython/rev/8a564ab1d208 New changeset dfda2f33fd08 by Serhiy Storchaka in branch '3.6': Issue #22949: Documented that fnmatch.translate() is for use with re.match(). https://hg.python.org/cpython/rev/dfda2f33fd08 New changeset d103ee917342 by Serhiy Storchaka in branch 'default': Issue #22949: Documented that fnmatch.translate() is for use with re.match(). https://hg.python.org/cpython/rev/d103ee917342 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 15:50:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Oct 2016 19:50:50 +0000 Subject: [issue22493] Deprecate the use of flags not at the start of regular expression In-Reply-To: <1411640940.81.0.804351058131.issue22493@psf.upfronthosting.co.za> Message-ID: <20161027195046.25155.52615.32306D10@psf.io> Roundup Robot added the comment: New changeset c04a56b3a4f2 by Serhiy Storchaka in branch '3.6': Issue #22493: Updated an example for fnmatch.translate(). https://hg.python.org/cpython/rev/c04a56b3a4f2 New changeset ded9a3c3bbb6 by Serhiy Storchaka in branch 'default': Issue #22493: Updated an example for fnmatch.translate(). https://hg.python.org/cpython/rev/ded9a3c3bbb6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 15:51:16 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 19:51:16 +0000 Subject: [issue22949] fnmatch.translate doesn't add ^ at the beginning In-Reply-To: <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za> Message-ID: <1477597876.65.0.319554756737.issue22949@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 16:39:58 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 27 Oct 2016 20:39:58 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477595913.02.0.703018427637.issue28544@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I don't want to be the decider here. I don't have time to review the code. I trust you all to do the right thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 16:48:07 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Oct 2016 20:48:07 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477601287.53.0.25576013467.issue28544@psf.upfronthosting.co.za> Ned Deily added the comment: I also trust Yury to do the right thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 17:16:37 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 27 Oct 2016 21:16:37 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477602997.59.0.749862625441.issue28544@psf.upfronthosting.co.za> Yury Selivanov added the comment: Guido, Ned, thanks! Andrew already glanced through the code, let's see what Inada-san says. I'm uploading an updated patch addressing Andrew's review. ---------- Added file: http://bugs.python.org/file45245/ctask2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 17:29:38 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Oct 2016 21:29:38 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <20161027212935.12110.75892.6215F4C4@psf.io> Roundup Robot added the comment: New changeset eea669163131 by Steve Dower in branch '3.6': Issue #28522: Fixes mishandled buffer reallocation in getpathp.c https://hg.python.org/cpython/rev/eea669163131 New changeset 72e64fc8746b by Steve Dower in branch 'default': Issue #28522: Fixes mishandled buffer reallocation in getpathp.c https://hg.python.org/cpython/rev/72e64fc8746b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 17:31:35 2016 From: report at bugs.python.org (Steve Dower) Date: Thu, 27 Oct 2016 21:31:35 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477603895.98.0.555653455596.issue28522@psf.upfronthosting.co.za> Steve Dower added the comment: Fixed and added a test. (Yes I know that it's not the most efficient algorithm for joining the strings together, but I consider correctness to be more important here.) ---------- stage: needs patch -> commit review type: -> crash versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 22:29:03 2016 From: report at bugs.python.org (Eric Appelt) Date: Fri, 28 Oct 2016 02:29:03 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes In-Reply-To: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> Message-ID: <1477621743.45.0.713585514803.issue28541@psf.upfronthosting.co.za> Eric Appelt added the comment: Thanks for the feedback. I agree that the comment is incorrect for several iterations of the loop that really don't need to be tested at all for '5'. I read the previous issue 17909 more carefully along with RFC 4627, 7159, and EMCA 404 to properly understand the context here. I notice that although the issue 17909 patch was written in order to implement the patterns in RFC 4627, it is also valid for the additional pattern introduced for utf-16-le in RFC 7159 as described in [1]. Specifically, in RFC 4627 the only valid pattern for utf-16-le begins with XX 00 XX 00 since the first two characters must represent ASCII codepoints. With strings the second character can be higher codepoints allowing for XX 00 XX XX or XX 00 00 XX. In the implementation from issue 17909 the pattern XX 00 XX is first detected and results in utf-16-le, and then the 4th byte is checked for the pattern XX 00 00 XX or XX 00 00 00 to result in utf-16-le or utf-32 respectively. In the issue 17909 patch the special case of a single character JSON document (i.e. '5') is also specifically accounted for. This case is not mentioned in [1]. So for everything I can try (or think of), this implementation can correctly determine the encoding of any valid JSON document according to RFC 7159. This is good since the documentation [2] makes no distinction that json.loads() would only accept JSON documents in bytes if they adhere to 4627. The encoding failure mode described in issue 17909 is still an invalid JSON document according to RFC 7159 as the control character \u0000 is not escaped. So I think overall the implementation is perfectly valid for RFC 7159 / EMCA 404 as suggested by the standard library documentation [2]. To me it seems reasonable to have a unit test to specifically check that the pattern XX 00 00 XX works. For the goal of hitting 100% test coverage as measured by line, I believe that the 2-byte case still needs to be tested. I have attached a patch that covers these cases along with (maybe too) verbose comments explaining the edge cases. I also changed the comments in the json/__init__.py module itself to clarify the detection patterns as implemented. I'm not sure how helpful this is to the improvement in of the standard library, but it has been very educational to be so far. [1] http://www.ietf.org/mail-archive/web/json/current/msg01959.html [2] https://docs.python.org/3.7/library/json.html ---------- Added file: http://bugs.python.org/file45246/mywork3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 23:33:28 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 28 Oct 2016 03:33:28 +0000 Subject: [issue28531] Improve utf7 encoder memory usage In-Reply-To: <1477412206.88.0.583380682603.issue28531@psf.upfronthosting.co.za> Message-ID: <1477625608.09.0.261605214088.issue28531@psf.upfronthosting.co.za> Xiang Zhang added the comment: Actually the patch is not going to speed up the encoder but just make the memory allocation strategy better, make the memory upper bound tighter. The speedup is just a good side effect. > It is rather in the line of idna and punycode than UTF-8 and UTF-32. Agree. > This encoder was omitted form _PyBytesWriter-using optimizations for purpose. The patch complicates the implementation. Not much. I think the implementation still remains simple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 00:02:02 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 28 Oct 2016 04:02:02 +0000 Subject: [issue28088] Document Transport.set_protocol and get_protocol In-Reply-To: <1475369173.63.0.247466795846.issue28088@psf.upfronthosting.co.za> Message-ID: <1477627322.55.0.0229036811114.issue28088@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I added a note like this. .. note:: Switching protocol should only be done when both protocols are documented to support the switch. Would this work? Would appreciate any feedback of how to properly document this behavior. Thanks. ---------- Added file: http://bugs.python.org/file45247/issue28088v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 00:06:45 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 28 Oct 2016 04:06:45 +0000 Subject: [issue28088] Document Transport.set_protocol and get_protocol In-Reply-To: <1475369173.63.0.247466795846.issue28088@psf.upfronthosting.co.za> Message-ID: <1477627605.08.0.205504007719.issue28088@psf.upfronthosting.co.za> INADA Naoki added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 00:14:11 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 28 Oct 2016 04:14:11 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477628051.55.0.549849700414.issue28544@psf.upfronthosting.co.za> Yury Selivanov added the comment: Uploading a new patch: sorted imports; added a unittest that exceptions in loop.call_soon aren't breaking Task.__init__. ---------- Added file: http://bugs.python.org/file45248/ctask3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 00:19:59 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 28 Oct 2016 04:19:59 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477628399.37.0.647755787659.issue28544@psf.upfronthosting.co.za> INADA Naoki added the comment: Why isfuture() is moved, and asyncio.coroutine uses base_futures.isfuture() instead of futures.isfuture()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 00:23:10 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 28 Oct 2016 04:23:10 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477628590.1.0.526163735497.issue28544@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Why isfuture() is moved, and asyncio.coroutine uses > base_futures.isfuture() instead of futures.isfuture()? Import cycles: - `_asyncio` module is now being imported from `futures.py` - and `_asyncio` is now imported from `tasks.py`; - and `tasks.py` imports `futures.py` to have `isfuture`. Long story short, I don't see a way of keeping `isfuture` in `futures.py`. The easiest option is to have it in a separate module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 00:27:46 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 28 Oct 2016 04:27:46 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477628866.56.0.134315705624.issue28544@psf.upfronthosting.co.za> Yury Selivanov added the comment: > - and `tasks.py` imports `futures.py` to have `isfuture`. And tasks.py also imports coroutines.py (which was importing futures.py), making the cycle even worse. Anyways, I don't see a problem in moving a function or two that everybody uses into a separate module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 00:54:54 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 28 Oct 2016 04:54:54 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1477630494.82.0.137501523417.issue28353@psf.upfronthosting.co.za> Xiang Zhang added the comment: Serhiy, after your commits, test_os requires root privileges or it'll fail. This is not the case before. [cpython]$ ./python -m test test_os Run tests sequentially 0:00:00 [1/1] test_os test test_os crashed -- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/libregrtest/runtest.py", line 164, in runtest_inner test_runner() File "/home/angwer/cpython/Lib/test/libregrtest/runtest.py", line 163, in test_runner support.run_unittest(tests) File "/home/angwer/cpython/Lib/test/support/__init__.py", line 1849, in run_unittest _run_suite(suite) File "/home/angwer/cpython/Lib/test/support/__init__.py", line 1824, in _run_suite raise TestFailed(err) test.support.TestFailed: multiple errors occurred; run in verbose mode for details During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/libregrtest/runtest.py", line 167, in runtest_inner test_time = time.time() - start_time File "/home/angwer/cpython/Lib/test/libregrtest/save_env.py", line 278, in __exit__ restore(original) File "/home/angwer/cpython/Lib/test/libregrtest/save_env.py", line 235, in restore_files support.rmtree(fn) File "/home/angwer/cpython/Lib/test/support/__init__.py", line 377, in rmtree _rmtree(path) File "/home/angwer/cpython/Lib/shutil.py", line 474, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/home/angwer/cpython/Lib/shutil.py", line 412, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/home/angwer/cpython/Lib/shutil.py", line 412, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/home/angwer/cpython/Lib/shutil.py", line 408, in _rmtree_safe_fd onerror(os.open, fullname, sys.exc_info()) File "/home/angwer/cpython/Lib/shutil.py", line 406, in _rmtree_safe_fd dirfd = os.open(name, os.O_RDONLY, dir_fd=topfd) PermissionError: [Errno 13] Permission denied: 'SUB21' 'test_os' left behind directory '@test_23400_tmp' and it couldn't be removed: [Errno 13] Permission denied: 'SUB21' test_os failed 1 test failed: test_os Total duration: 292 ms Tests result: FAILURE Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/support/__init__.py", line 914, in temp_dir yield path File "/home/angwer/cpython/Lib/test/support/__init__.py", line 963, in temp_cwd yield cwd_dir File "/home/angwer/cpython/Lib/test/libregrtest/main.py", line 468, in main self._main(tests, kwargs) File "/home/angwer/cpython/Lib/test/libregrtest/main.py", line 497, in _main sys.exit(len(self.bad) > 0 or self.interrupted) SystemExit: True During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/angwer/cpython/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/angwer/cpython/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/angwer/cpython/Lib/test/__main__.py", line 2, in main() File "/home/angwer/cpython/Lib/test/libregrtest/main.py", line 532, in main Regrtest().main(tests=tests, **kwargs) File "/home/angwer/cpython/Lib/test/libregrtest/main.py", line 468, in main self._main(tests, kwargs) File "/home/angwer/cpython/Lib/contextlib.py", line 100, in __exit__ self.gen.throw(type, value, traceback) File "/home/angwer/cpython/Lib/test/support/__init__.py", line 963, in temp_cwd yield cwd_dir File "/home/angwer/cpython/Lib/contextlib.py", line 100, in __exit__ self.gen.throw(type, value, traceback) File "/home/angwer/cpython/Lib/test/support/__init__.py", line 917, in temp_dir rmtree(path) File "/home/angwer/cpython/Lib/test/support/__init__.py", line 377, in rmtree _rmtree(path) File "/home/angwer/cpython/Lib/shutil.py", line 474, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/home/angwer/cpython/Lib/shutil.py", line 412, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/home/angwer/cpython/Lib/shutil.py", line 412, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/home/angwer/cpython/Lib/shutil.py", line 412, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/home/angwer/cpython/Lib/shutil.py", line 408, in _rmtree_safe_fd onerror(os.open, fullname, sys.exc_info()) File "/home/angwer/cpython/Lib/shutil.py", line 406, in _rmtree_safe_fd dirfd = os.open(name, os.O_RDONLY, dir_fd=topfd) PermissionError: [Errno 13] Permission denied: 'SUB21' ---------- nosy: +xiang.zhang status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 02:00:30 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Oct 2016 06:00:30 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1477634430.08.0.230835063943.issue28353@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Hmm, tests were passed when I ran them before committing. Seems this is heisenbug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 02:14:27 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 28 Oct 2016 06:14:27 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1477635267.78.0.946912523197.issue28353@psf.upfronthosting.co.za> Xiang Zhang added the comment: Seems like the dir you add breaks other cases. I change addCleanUp to os.chmod and get: ====================================================================== FAIL: test_file_like_path (test.test_os.BytesWalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 950, in test_file_like_path self.test_walk_prune(_PathLike(self.walk_path)) File "/home/angwer/cpython/Lib/test/test_os.py", line 941, in test_walk_prune self.assertEqual(len(all), 2) AssertionError: 3 != 2 ====================================================================== FAIL: test_walk_bottom_up (test.test_os.BytesWalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 956, in test_walk_bottom_up self.assertEqual(len(all), 4, all) AssertionError: 5 != 4 : [('@test_24702_tmp/TEST1/SUB2/SUB21', [], ['tmp3']), ('@test_24702_tmp/TEST1/SUB2', ['link', 'SUB21'], ['tmp3', 'broken_link3', 'broken_link', 'broken_link2']), ('@test_24702_tmp/TEST1/SUB1/SUB11', [], []), ('@test_24702_tmp/TEST1/SUB1', ['SUB11'], ['tmp2']), ('@test_24702_tmp/TEST1', ['SUB2', 'SUB1'], ['tmp1'])] ====================================================================== FAIL: test_walk_prune (test.test_os.BytesWalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 941, in test_walk_prune self.assertEqual(len(all), 2) AssertionError: 3 != 2 ====================================================================== FAIL: test_walk_topdown (test.test_os.BytesWalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 916, in test_walk_topdown self.assertEqual(len(all), 4) AssertionError: 5 != 4 ====================================================================== FAIL: test_file_like_path (test.test_os.FwalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 950, in test_file_like_path self.test_walk_prune(_PathLike(self.walk_path)) File "/home/angwer/cpython/Lib/test/test_os.py", line 941, in test_walk_prune self.assertEqual(len(all), 2) AssertionError: 3 != 2 ====================================================================== FAIL: test_walk_bottom_up (test.test_os.FwalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 956, in test_walk_bottom_up self.assertEqual(len(all), 4, all) AssertionError: 5 != 4 : [('@test_24702_tmp/TEST1/SUB2/SUB21', [], ['tmp3']), ('@test_24702_tmp/TEST1/SUB2', ['link', 'SUB21'], ['tmp3', 'broken_link3', 'broken_link', 'broken_link2']), ('@test_24702_tmp/TEST1/SUB1/SUB11', [], []), ('@test_24702_tmp/TEST1/SUB1', ['SUB11'], ['tmp2']), ('@test_24702_tmp/TEST1', ['SUB2', 'SUB1'], ['tmp1'])] ====================================================================== FAIL: test_walk_prune (test.test_os.FwalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 941, in test_walk_prune self.assertEqual(len(all), 2) AssertionError: 3 != 2 ====================================================================== FAIL: test_walk_topdown (test.test_os.FwalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 916, in test_walk_topdown self.assertEqual(len(all), 4) AssertionError: 5 != 4 ====================================================================== FAIL: test_file_like_path (test.test_os.WalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 950, in test_file_like_path self.test_walk_prune(_PathLike(self.walk_path)) File "/home/angwer/cpython/Lib/test/test_os.py", line 941, in test_walk_prune self.assertEqual(len(all), 2) AssertionError: 3 != 2 ====================================================================== FAIL: test_walk_bottom_up (test.test_os.WalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 956, in test_walk_bottom_up self.assertEqual(len(all), 4, all) AssertionError: 5 != 4 : [('@test_24702_tmp/TEST1/SUB2/SUB21', [], ['tmp3']), ('@test_24702_tmp/TEST1/SUB2', ['link', 'SUB21'], ['tmp3', 'broken_link3', 'broken_link', 'broken_link2']), ('@test_24702_tmp/TEST1/SUB1/SUB11', [], []), ('@test_24702_tmp/TEST1/SUB1', ['SUB11'], ['tmp2']), ('@test_24702_tmp/TEST1', ['SUB2', 'SUB1'], ['tmp1'])] ====================================================================== FAIL: test_walk_prune (test.test_os.WalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 941, in test_walk_prune self.assertEqual(len(all), 2) AssertionError: 3 != 2 ====================================================================== FAIL: test_walk_topdown (test.test_os.WalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/angwer/cpython/Lib/test/test_os.py", line 916, in test_walk_topdown self.assertEqual(len(all), 4) AssertionError: 5 != 4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 02:19:47 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Oct 2016 06:19:47 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <20161028061944.58525.59222.F9854C9F@psf.io> Roundup Robot added the comment: New changeset 655510dd46fd by Serhiy Storchaka in branch '3.5': Issue #28353: Make test_os.WalkTests.test_walk_bad_dir stable. https://hg.python.org/cpython/rev/655510dd46fd New changeset df28e536f19d by Serhiy Storchaka in branch '3.6': Issue #28353: Make test_os.WalkTests.test_walk_bad_dir stable. https://hg.python.org/cpython/rev/df28e536f19d New changeset aa891d13e1cf by Serhiy Storchaka in branch 'default': Issue #28353: Make test_os.WalkTests.test_walk_bad_dir stable. https://hg.python.org/cpython/rev/aa891d13e1cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 02:23:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Oct 2016 06:23:36 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1477635816.88.0.891077168078.issue28353@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: test_walk_bad_dir renamed one of subdirs and tearDown failed to clean up changed tree. An error happened depending on the order of listed subdirectories: ['SUB1', 'SUB2'] -- passed, ['SUB2', 'SUB1'] -- failed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 02:26:12 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 28 Oct 2016 06:26:12 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1477635972.16.0.356418078998.issue28353@psf.upfronthosting.co.za> Xiang Zhang added the comment: It works. Close. :-) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 03:06:10 2016 From: report at bugs.python.org (Martin Turon) Date: Fri, 28 Oct 2016 07:06:10 +0000 Subject: [issue28545] socket.bind to AF_PACKET should use passed interface name In-Reply-To: <1477592098.82.0.815527711646.issue28545@psf.upfronthosting.co.za> Message-ID: <1477638370.71.0.847168955056.issue28545@psf.upfronthosting.co.za> Martin Turon added the comment: If I bind to port 0, it works for both tx and rx. Sorry for the false alarm! sock.bind(("monitor0", 0)) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 03:15:16 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 28 Oct 2016 07:15:16 +0000 Subject: [issue26939] android: test_functools hangs on armv7 In-Reply-To: <1462289866.52.0.349587333392.issue26939@psf.upfronthosting.co.za> Message-ID: <1477638916.81.0.30820614886.issue26939@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Patch attached. ---------- assignee: -> xdegaye components: +Tests -Library (Lib) dependencies: -android: add platform.android_ver() stage: -> patch review versions: +Python 3.7 Added file: http://bugs.python.org/file45249/setswitchinterval.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 03:25:09 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 28 Oct 2016 07:25:09 +0000 Subject: [issue26940] android: test_importlib hangs on armv7 In-Reply-To: <1462290134.16.0.615698223309.issue26940@psf.upfronthosting.co.za> Message-ID: <1477639509.47.0.0635402217118.issue26940@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Adding a dependency to issue 26939. Patch attached. ---------- assignee: -> xdegaye components: +Tests -Library (Lib) dependencies: +android: test_functools hangs on armv7 keywords: +patch stage: -> patch review versions: +Python 3.7 Added file: http://bugs.python.org/file45250/setswitchinterval.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 03:29:02 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 28 Oct 2016 07:29:02 +0000 Subject: [issue26941] android: test_threading hangs on armv7 In-Reply-To: <1462290426.09.0.613967464154.issue26941@psf.upfronthosting.co.za> Message-ID: <1477639742.7.0.448872432927.issue26941@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Adding a dependency to issue 26939. Patch attached. ---------- assignee: -> xdegaye components: +Tests -Library (Lib) dependencies: +android: test_functools hangs on armv7 keywords: +patch stage: -> patch review versions: +Python 3.7 Added file: http://bugs.python.org/file45251/setswitchinterval.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 03:37:31 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Oct 2016 07:37:31 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes In-Reply-To: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> Message-ID: <1477640251.18.0.965722251256.issue28541@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In general LGTM, but I added few minor comments on Rietveld. Click on the "review" near your patch. You should also receive an email notification, but it can be moved to your Spam folder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 05:41:35 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Oct 2016 09:41:35 +0000 Subject: [issue28046] Remove the concept of platform-specific directories In-Reply-To: <1473443913.59.0.936788039942.issue28046@psf.upfronthosting.co.za> Message-ID: <20161028094132.40676.399.7884351A@psf.io> Roundup Robot added the comment: New changeset 86577b7100a4 by Xavier de Gaye in branch '3.6': Issue #28046: Fix the removal of the sysconfigdata module https://hg.python.org/cpython/rev/86577b7100a4 New changeset 28205c4cf20b by Xavier de Gaye in branch 'default': Issue #28046: Merge with 3.6. https://hg.python.org/cpython/rev/28205c4cf20b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 06:56:05 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 28 Oct 2016 10:56:05 +0000 Subject: [issue26856] android does not have pwd.getpwall() In-Reply-To: <1461677345.21.0.582848799296.issue26856@psf.upfronthosting.co.za> Message-ID: <1477652165.17.0.138805486401.issue26856@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- assignee: -> xdegaye components: +Tests stage: -> patch review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 07:10:09 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Oct 2016 11:10:09 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477653009.97.0.568774767454.issue28199@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What if split copying entries from inserting indices? First fill a continuous array of entries (could use memcpy if there were not deletions), then build a hashtable of continuous indices. Following patch implements this idea. ---------- Added file: http://bugs.python.org/file45252/dictresize4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 07:22:37 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Oct 2016 11:22:37 +0000 Subject: [issue27838] test_os.test_chown() failure on koobs-freebsd-current In-Reply-To: <1471959658.26.0.0626423066304.issue27838@psf.upfronthosting.co.za> Message-ID: <1477653757.02.0.14544308911.issue27838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Kubilay, could you please run tests with my patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 07:32:57 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 28 Oct 2016 11:32:57 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477654377.29.0.105618520072.issue28199@psf.upfronthosting.co.za> Xiang Zhang added the comment: Hmm, what's the advantage? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 07:36:32 2016 From: report at bugs.python.org (Kubilay Kocak) Date: Fri, 28 Oct 2016 11:36:32 +0000 Subject: [issue27838] test_os.test_chown() failure on koobs-freebsd-current In-Reply-To: <1471959658.26.0.0626423066304.issue27838@psf.upfronthosting.co.za> Message-ID: <1477654592.37.0.959529301471.issue27838@psf.upfronthosting.co.za> Kubilay Kocak added the comment: Serhiy, ah I thought the patch would be applied to say the 'custom' builder for this buildbot or the branch in general :) If not, I can test this in ~<= 2 days locally, though its worth noting that the issue quite likely not be reproducible outside of the Python buildbot environment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 07:42:46 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 28 Oct 2016 11:42:46 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477654966.07.0.874115876741.issue28199@psf.upfronthosting.co.za> INADA Naoki added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 07:49:48 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Oct 2016 11:49:48 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477655388.6.0.488372930343.issue28199@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The advantage is using memcpy in case of combined table without deletions. This is common case of creating dict without pre-resizing: dict(list), dict(iterator), etc. In future, when will be possible to reuse old entries array, this also could help in case of multiple modifications without significant size growth. First squeeze entries (skipping NULL values), then clear and rebuild index table. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 08:01:58 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 28 Oct 2016 12:01:58 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477656118.74.0.516828798585.issue28199@psf.upfronthosting.co.za> INADA Naoki added the comment: Current code and my patch called insertdict_clean() or insert_index() for each entry. On the other hand, Serhiy's patch calls build_indices() once. This may be faster when compiler doesn't inlining the helper function. As a bonus, we can use memcpy to copy entries. Cons of Serhiy's patch is it's two pass. If entries are larger than L2 cache, fetch from L3 cache may be larger. So I can't declare that Serhiy's patch is faster until benchmark. (My forecast is no performance difference between my patch and Serhiy's on amd64 machine, and Serhiy's patch is faster on more poor CPU.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 08:46:46 2016 From: report at bugs.python.org (Moritz Sichert) Date: Fri, 28 Oct 2016 12:46:46 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1477658806.71.0.458703461701.issue27860@psf.upfronthosting.co.za> Moritz Sichert added the comment: Any updates? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 08:55:42 2016 From: report at bugs.python.org (Ian Kelling) Date: Fri, 28 Oct 2016 12:55:42 +0000 Subject: [issue28546] Better explain setting pdb breakpoints Message-ID: <1477659342.78.0.0469891681289.issue28546@psf.upfronthosting.co.za> New submission from Ian Kelling: https://docs.python.org/3.7/library/pdb.html: "The typical usage to break into the debugger from a running program is to insert import pdb; pdb.set_trace() at the location you want to break into the debugger." A plain read of this says: insert code into a running program. I can do this just fine in gdb, so when reading this, I wonder if attaching is explained elsewhere, or what. Patch to improve this. ---------- assignee: docs at python components: Documentation files: iank-v1.patch keywords: patch messages: 279601 nosy: docs at python, iank priority: normal severity: normal status: open title: Better explain setting pdb breakpoints versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45253/iank-v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 08:57:15 2016 From: report at bugs.python.org (Jean-Philippe Landry) Date: Fri, 28 Oct 2016 12:57:15 +0000 Subject: [issue28547] Python to use Windows Certificate Store Message-ID: <1477659435.87.0.666854637981.issue28547@psf.upfronthosting.co.za> New submission from Jean-Philippe Landry: Hello, Would it be possible for Python to use the Certificate Store in windows instead of a predetermined list of certificates. The use case is as follows: Multiple machines being on a corporate network where there is a man in the middle packet inspection (IT security stuff...) that will resign most of the SSL connections with its own certificate that is unfortunately not part of the python default store. There are also multiple behind the firewall servers using self signed certificates. That means that almost all SSL requests, including pip install will throw the famous [SSL: CERTIFICATE_VERIFY_FAILED] error. This is transparent in Chrome because Chrome is using the Windows store to determine if a certificate is trusted or not and all those custom certificates are in the windows store. However, Python uses its own file (list of approved certificates). I understand that this can be overridden using a custom, manually managed, crt file and set it into the environment variables (REQUESTS_CA_BUNDLE) and it works. However, this involves manual operation and undesired maintenance when a new certificate will be added to the store. The windows store itself gets updated periodically by IT so it is a not an issue. Is there a rationale behind using a specific file instead of the windows store which will work for Chrome, IE, etc... Best regards, Jean-Philippe ---------- assignee: christian.heimes components: SSL messages: 279602 nosy: Jean-Philippe Landry, christian.heimes priority: normal severity: normal status: open title: Python to use Windows Certificate Store type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 09:01:09 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 28 Oct 2016 13:01:09 +0000 Subject: [issue28547] Python to use Windows Certificate Store In-Reply-To: <1477659435.87.0.666854637981.issue28547@psf.upfronthosting.co.za> Message-ID: <1477659669.56.0.969613271059.issue28547@psf.upfronthosting.co.za> Christian Heimes added the comment: Python's ssl library has used Windows' cert store since 3.4 / 2.7.9. Some third party applications like requests or pip rather use their own cert store instead. This decision is beyond control of Python. https://docs.python.org/3/library/ssl.html#ssl.SSLContext.load_default_certs https://docs.python.org/3/library/ssl.html#ssl.enum_certificates ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 09:06:47 2016 From: report at bugs.python.org (cschramm) Date: Fri, 28 Oct 2016 13:06:47 +0000 Subject: [issue26862] android: SYS_getdents64 does not need to be defined on android API 21 In-Reply-To: <1461678588.46.0.828463582716.issue26862@psf.upfronthosting.co.za> Message-ID: <1477660007.52.0.254835329111.issue26862@psf.upfronthosting.co.za> cschramm added the comment: Any plans to fix this in 3.5 as well? ---------- nosy: +cschramm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 09:13:31 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 28 Oct 2016 13:13:31 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477660411.61.0.0433256717609.issue28199@psf.upfronthosting.co.za> Xiang Zhang added the comment: I doubt how many memcpy could benefit. Two pass does not necessarily make faster. I make a simple test: With dictresize3, (I make insert_index inline): [bin]$ ./python3 -m perf timeit -s 'd = {i:i for i in range(6)}' 'dict(d)' .................... Median +- std dev: 441 ns +- 21 ns [bin]$ ./python3 -m perf timeit -s 'd = {i:i for i in range(60)}' 'dict(d)' .................... Median +- std dev: 2.02 us +- 0.10 us [bin]$ ./python3 -m perf timeit -s 'd = {i:i for i in range(600)}' 'dict(d)' .................... Median +- std dev: 18.1 us +- 0.9 us With dictresize4: [bin]$ ./python3 -m perf timeit -s 'd = {i:i for i in range(6)}' 'dict(d)' .................... Median +- std dev: 448 ns +- 33 ns [bin]$ ./python3 -m perf timeit -s 'd = {i:i for i in range(60)}' 'dict(d)' .................... Median +- std dev: 2.04 us +- 0.09 us [bin]$ ./python3 -m perf timeit -s 'd = {i:i for i in range(600)}' 'dict(d)' .................... Median +- std dev: 18.2 us +- 0.1 us Just like INAKA states, there is hardly any difference. And you need 2 pass for dicts with deleted member. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 10:26:29 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Fri, 28 Oct 2016 14:26:29 +0000 Subject: [issue26862] android: SYS_getdents64 does not need to be defined on android API 21 In-Reply-To: <1461678588.46.0.828463582716.issue26862@psf.upfronthosting.co.za> Message-ID: <1477664789.97.0.52519141008.issue26862@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: cschramm: AFAIK only Python 3.6+ has experimental Android support. 3.5 or below are not supported. ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 10:27:51 2016 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Oct 2016 14:27:51 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1477664871.48.0.0347809709142.issue27860@psf.upfronthosting.co.za> Nick Coghlan added the comment: Peter, are you able to take a look at this or indicate you're happy for someone else to take it? (I relinquished my co-maintainer role for the ipaddress module a while back, so you're the only currently listed maintainer) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 10:33:51 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 28 Oct 2016 14:33:51 +0000 Subject: [issue26862] android: SYS_getdents64 does not need to be defined on android API 21 In-Reply-To: <1461678588.46.0.828463582716.issue26862@psf.upfronthosting.co.za> Message-ID: <1477665231.35.0.909301000067.issue26862@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Sorry, AFAIK there is no plan to retrofit the Android changes to 3.5. Note that Python 3.6 is expected to be released in few weeks, by next mid-december. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 10:44:12 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Oct 2016 14:44:12 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1477665852.03.0.212881219888.issue27860@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 11:35:27 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 28 Oct 2016 15:35:27 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1477668927.15.0.171582225461.issue27683@psf.upfronthosting.co.za> Xiang Zhang added the comment: Ping. ;-) ---------- nosy: +pmoody _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 11:54:17 2016 From: report at bugs.python.org (cschramm) Date: Fri, 28 Oct 2016 15:54:17 +0000 Subject: [issue26862] android: SYS_getdents64 does not need to be defined on android API 21 In-Reply-To: <1461678588.46.0.828463582716.issue26862@psf.upfronthosting.co.za> Message-ID: <1477670057.86.0.21918343309.issue26862@psf.upfronthosting.co.za> cschramm added the comment: Well, the 3.5 code checks __ANDROID__ as well and works pretty fine on Android, but if it's not supposed to be supported, we'll have to upgrade to 3.6 then. Thanks for your work! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 11:57:09 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 28 Oct 2016 15:57:09 +0000 Subject: [issue28548] http.server parse_request() bug and error reporting Message-ID: <1477670229.81.0.419990644201.issue28548@psf.upfronthosting.co.za> New submission from Barry A. Warsaw: This might also affect other Python version; I haven't checked, but I know it affects Python 3.5. In Mailman 3, we have a subclass of WSGIRequestHandler for our REST API, and we got a bug report about an error condition returning a 400 in the body of the response, but still returning an implicit 200 header. https://gitlab.com/mailman/mailman/issues/288 This is pretty easily reproducible with the following recipe. $ git clone https://gitlab.com/mailman/mailman.git $ cd mailman $ tox -e py35 --notest -r $ .tox/py35/bin/python3.5 /home/barry/projects/mailman/trunk/.tox/py35/bin/runner --runner=rest:0:1 -C /home/barry/projects/mailman/trunk/var/etc/mailman.cfg (Note that you might need to run `.tox/py35/bin/mailman info` first, and of course you'll have to adjust the directories for your own local fork.) Now, in another shell, do the following: $ curl -v -i -u restadmin:restpass "http://localhost:8001/3.0/lists/list example.com" Note specifically that there is a space right before the "example.com" bit. Take note also that we're generating an HTTP/1.1 request as per curl default. The response you get is: * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8001 (#0) * Server auth using Basic with user 'restadmin' > GET /3.0/lists/list example.com HTTP/1.1 > Host: localhost:8001 > Authorization: Basic cmVzdGFkbWluOnJlc3RwYXNz > User-Agent: curl/7.50.1 > Accept: */* > Error response

Error response

Error code: 400

Message: Bad request syntax ('GET /3.0/lists/list example.com HTTP/1.1').

Error code explanation: HTTPStatus.BAD_REQUEST - Bad request syntax or unsupported method.

* Connection #0 to host localhost left intact Notice the lack of response headers, and thus the implicit 200 return even though the proper error code is in the body of the response. Why does this happen? Now look at http.server.BaseHTTPRequestHandler. The default_request_version is "HTTP/0.9". Given the request, you'd expect to see the version set to "HTTP/1.1", but that doesn't happen because the extra space messes up the request parsing. parse_request() splits the request line by spaces and when this happens, the wrong number of words shows up. We get 4 words, thus the 'else:' clause in parse_request() gets triggered. So far so good. This eventually leads us to send_error() and from there into send_response() with the error code (properly 400) and message. From there we get to .send_response_only() and tracing into this function shows you where things go wrong. send_response_only() has an explicit test on self.request_version != 'HTTP/0.9', in which case it adds nothing to the _header_buffer. Well, because the request parsing got the unexpected number of words, in fact request_version *is* the default HTTP/0.9. Thus the error headers are never added. There are several problems here. Why are the headers never added when the request is HTTP/0.9? (I haven't read the spec.) Also, since parse_request() isn't setting the request version to 'HTTP/1.1'. It should probably dig out the words[-1] and see if that looks like a version string. Clearly the request isn't properly escaped, but http.server should not be sending an implicit 200 when the request is bogus. ---------- components: Library (Lib) messages: 279611 nosy: barry priority: normal severity: normal status: open title: http.server parse_request() bug and error reporting versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 12:49:49 2016 From: report at bugs.python.org (Ivan Pozdeev) Date: Fri, 28 Oct 2016 16:49:49 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1211455981.94.0.404413935613.issue2943@psf.upfronthosting.co.za> Message-ID: <1477673389.87.0.958924594036.issue2943@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: What's wrong with the Python wiki link in msg263206 above? It is supposed to be _the_ guide for setting up compilers in Windows, isn't it? Ideally, this should be a link to `distutils' docs - because, you know, the wiki isn't carved in stone, either, while the docs for the specific version are bundled with it. Actually, `distutils' does have an entry on `distutils.msvccompiler': https://docs.python.org/2/distutils/apiref.html#module-distutils.msvccompiler . It even documents the use of DUSTUTILS_USE_SDK variable! The wording could use some clarification and maybe a link to wiki, but that's for another ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 12:53:37 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Oct 2016 16:53:37 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <20161028165334.23126.41703.70FFC2B9@psf.io> Roundup Robot added the comment: New changeset db5ae4f6df8a by Yury Selivanov in branch '3.6': Issue #28544: Implement asyncio.Task in C. https://hg.python.org/cpython/rev/db5ae4f6df8a New changeset 8059289b55c1 by Yury Selivanov in branch 'default': Merge 3.6 (issue #28544) https://hg.python.org/cpython/rev/8059289b55c1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 13:00:43 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 28 Oct 2016 17:00:43 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477674043.82.0.98034993686.issue28544@psf.upfronthosting.co.za> Yury Selivanov added the comment: I've committed the patch with a few touchups: * Applied code-review feedback. * We now use AC for all methods, including Task._repr_info, Task._step, etc. See [1]. * I fixed the Task to be fully subclassable; users can override Task._step and Task._wakeup now. There are tests for ensuring that subclassing works the same for both Python and C implementations. See [2] and [3]. * I made it possible to override Future._schedule_subclass, as it was in Python 3.5. See [4]. Andrew, Inada-san, thank you for reviewing the patch! Please take a look at the patch updates referenced below. Feel free to re-open the issue if you see anything suspicious. [1] https://github.com/1st1/cpython/commit/99adc35c94d76d78b8e666381436016c3c74a5ab [2] https://github.com/1st1/cpython/commit/e294491c4cc7c92bc94ff12b4796c8ab12c40435 [3] https://github.com/1st1/cpython/commit/4d1c50c8987af124ce0bcccaea6bde82a60b59ee [4] https://github.com/1st1/cpython/commit/efec03cbb4f81e78defd989d72c9bdae1122f50d ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 13:03:36 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Oct 2016 17:03:36 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1477660411.61.0.0433256717609.issue28199@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Remark about perf timeout: you can use --compare-to with the patched Python binary to check if the result is significant and compute the "x.xx faster" number. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 13:06:52 2016 From: report at bugs.python.org (Big Stone) Date: Fri, 28 Oct 2016 17:06:52 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477674412.38.0.172097576216.issue28522@psf.upfronthosting.co.za> Big Stone added the comment: will it be in python-3.6.0b3 ? what should be in python._pth, in WinPython particular case ? (as Lib\site-packages didn't seem needed, for unknown reason) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 13:14:10 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Oct 2016 17:14:10 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477674850.91.0.829420032609.issue28522@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, see the commit to branch 3.6, which will next be released as .0b3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 13:17:23 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Oct 2016 17:17:23 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <20161028171719.22372.84348.63CDA8DB@psf.io> Roundup Robot added the comment: New changeset fb7c439103b9 by Victor Stinner in branch '3.6': Issue #28544: Fix _asynciomodule.c on Windows https://hg.python.org/cpython/rev/fb7c439103b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 13:26:33 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 28 Oct 2016 17:26:33 +0000 Subject: [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477675593.09.0.889499305027.issue25152@psf.upfronthosting.co.za> Brett Cannon added the comment: It looks like Zachary beat me to fixing this: https://hg.python.org/cpython/rev/5d1934c27137. Thanks for the patch, Mariatta, even if Zachary didn't use it. ---------- stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 13:51:09 2016 From: report at bugs.python.org (Yutao Yuan) Date: Fri, 28 Oct 2016 17:51:09 +0000 Subject: [issue28549] curses: calling addch() with an 1-length str segfaults with ncurses6 compiled with --enable-ext-colors Message-ID: <1477677069.87.0.354681142627.issue28549@psf.upfronthosting.co.za> New submission from Yutao Yuan: When addch() is called with an 1-length str, it is converted into a cchar_t. Ncurses6 adds a new field ext_color to cchar_t if it is enabled at compile time, and it is not initialized here, which causes various problems like segfaults or wrong display of characters. ---------- components: Extension Modules messages: 279620 nosy: yyt16384 priority: normal severity: normal status: open title: curses: calling addch() with an 1-length str segfaults with ncurses6 compiled with --enable-ext-colors type: crash versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 13:57:44 2016 From: report at bugs.python.org (Zachary Ware) Date: Fri, 28 Oct 2016 17:57:44 +0000 Subject: [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477677464.38.0.930260947448.issue25152@psf.upfronthosting.co.za> Zachary Ware added the comment: Ah ha, I thought I'd seen it mentioned in an issue somewhere, but I didn't go looking when I noticed my Docs bots were all red. Thanks for the patch anyway, Mariatta! ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 14:01:06 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 28 Oct 2016 18:01:06 +0000 Subject: [issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available In-Reply-To: <1477122775.81.0.204871394378.issue28503@psf.upfronthosting.co.za> Message-ID: <1477677666.71.0.525393470964.issue28503@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 14:04:44 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 28 Oct 2016 18:04:44 +0000 Subject: [issue28546] Better explain setting pdb breakpoints In-Reply-To: <1477659342.78.0.0469891681289.issue28546@psf.upfronthosting.co.za> Message-ID: <1477677884.52.0.878923348799.issue28546@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 14:07:05 2016 From: report at bugs.python.org (=?utf-8?q?Levi_Vel=C3=A1zquez?=) Date: Fri, 28 Oct 2016 18:07:05 +0000 Subject: [issue28550] if inline statement does not work with multiple assignment. Message-ID: <1477678025.32.0.74165596104.issue28550@psf.upfronthosting.co.za> New submission from Levi Vel?zquez: Normal "if" inline assignment obj = None a = obj.a if obj else None It assign None to a as expected. obj = None a, b = obj.a, obj.b if obj else [None, None] It raises an error " 'NoneType' object has no attribute 'a'" when it should assign None to both a and b. ---------- components: Interpreter Core messages: 279622 nosy: levinvm priority: normal severity: normal status: open title: if inline statement does not work with multiple assignment. type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 14:25:45 2016 From: report at bugs.python.org (Eric Snow) Date: Fri, 28 Oct 2016 18:25:45 +0000 Subject: [issue28550] if inline statement does not work with multiple assignment. In-Reply-To: <1477678025.32.0.74165596104.issue28550@psf.upfronthosting.co.za> Message-ID: <1477679145.49.0.969064240435.issue28550@psf.upfronthosting.co.za> Eric Snow added the comment: The syntax is working correctly. Precedence rules are throwing you off. It should be more clear if we use parentheses to demonstrate precedence explicitly. You expected: a, b = (obj.a, obj.b) if obj else [None, None] However, what you wrote is equivalent to: a, b = obj.a, (obj.b if obj else [None, None]) Hence the error about not finding "None.a" (when it resolves obj.a). You can solve this by explicitly marking the precedence like I did in the "You expected" example above. Sometimes precedence isn't clear, so when in doubt, use parentheses to make the precedence explicit. I'm sorry this wasn't more clear. Do you think any changes in Python's documentation would have helped you avoid this confusion? ---------- nosy: +eric.snow resolution: -> not a bug stage: -> resolved status: open -> pending type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 14:28:03 2016 From: report at bugs.python.org (Steve Dower) Date: Fri, 28 Oct 2016 18:28:03 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477679283.41.0.21707143359.issue28522@psf.upfronthosting.co.za> Steve Dower added the comment: "Lib\site-packages" is probably unnecessary because of "import site", which likely adds it in anyway. It's very likely that WinPython doesn't actually want to specify this at all, since it also enables isolated mode, which will ignore PYTHONPATH and the current working directory. But if that's okay, you probably want:: python36.zip DLLs Lib . import site That should give you the same default sys.path as if the file were omitted, except for the empty entry at the start and anything in PYTHONPATH or the registry. (I figured this out by running "python -S" and looking at sys.path.) ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 16:03:45 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Oct 2016 20:03:45 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477685025.02.0.178216551343.issue28199@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, the difference is pretty small. The largest difference I got is 7% in following microbenchmark: $ ./python -m perf timeit -s 'x = list(range(1000))' -- 'dict.fromkeys(x)' Unpatched: Median +- std dev: 80.6 us +- 0.5 us dictresize3.patch: Median +- std dev: 80.9 us +- 2.8 us dictresize4.patch: Median +- std dev: 75.4 us +- 2.1 us I suppose this is due to using memcpy. In other microbenchmarks the difference usually is 1-2%. Xiang, your microbenchmark don't work for this patch because dict(d) make only one resizing. > Cons of Serhiy's patch is it's two pass. If entries are larger than L2 cache, fetch from L3 cache may be larger. Agree. But on other hand, dictresize3.patch needs to fit in L2 cache all indices table and prefetch two entries arrays: old and new. dictresize4.patch in every loop works with smaller memory: two entries arrays in the first loop and an indices table and new entries arrays in the second loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 16:42:54 2016 From: report at bugs.python.org (Eryk Sun) Date: Fri, 28 Oct 2016 20:42:54 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477687374.72.0.561630398501.issue28522@psf.upfronthosting.co.za> Eryk Sun added the comment: > ignore PYTHONPATH and the current working directory Generally it's the script directory that isolated mode removes from sys.path. It's the working directory when there is no script. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 16:56:45 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Oct 2016 20:56:45 +0000 Subject: [issue28549] curses: calling addch() with an 1-length str segfaults with ncurses6 compiled with --enable-ext-colors In-Reply-To: <1477677069.87.0.354681142627.issue28549@psf.upfronthosting.co.za> Message-ID: <1477688205.13.0.640480472901.issue28549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The _curses module uses direct access to cchar_t fields. Proposed patch makes it using setcchar. Does it fixes this issue Yutao? ---------- keywords: +patch nosy: +serhiy.storchaka, twouters stage: -> patch review versions: +Python 3.6, Python 3.7 -Python 3.4 Added file: http://bugs.python.org/file45254/curses_setcchar.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 17:16:07 2016 From: report at bugs.python.org (Eric Appelt) Date: Fri, 28 Oct 2016 21:16:07 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes In-Reply-To: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> Message-ID: <1477689367.9.0.878601374269.issue28541@psf.upfronthosting.co.za> Eric Appelt added the comment: I was able to inspect the review, and implemented your suggestions. This is attached as a new patch. Please let me know if this is not the correct workflow. Thank you for the prompt review and help as I learn the python tracking and review process! ---------- Added file: http://bugs.python.org/file45255/mywork4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 17:38:42 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Oct 2016 21:38:42 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477690722.3.0.0306848239016.issue28544@psf.upfronthosting.co.za> STINNER Victor added the comment: Since asyncio becomes popular, IMO it is worth to mention this optimization at: https://docs.python.org/dev/whatsnew/3.6.html#optimizations Can you please do it Yury? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 17:41:41 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 28 Oct 2016 21:41:41 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477690901.7.0.0862984568475.issue28544@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Can you please do it Yury? Yes, Elvis and I will be the editors of What's New this year anyways ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 17:59:14 2016 From: report at bugs.python.org (Anselm Kruis) Date: Fri, 28 Oct 2016 21:59:14 +0000 Subject: [issue28551] sysconfig.py wrong _PROJECT_BASE for Py2.7 Windows 64bit PC/VS9.0 Message-ID: <1477691954.87.0.162134126472.issue28551@psf.upfronthosting.co.za> New submission from Anselm Kruis: Affected versions: 2.7.11, 2.7.12 Windows amd64 build with Visual Studio 2008 using the files in PC/VS9.0 If you run test_sysconfig using PC/VS9.0/rt.bat the test case test_get_config_h_filename fails. --8<-----------8<-----------8<-----------8<-----------8<-----------8<--------- D:\kruis_F\fg2\stackless64\stackless>"D:\kruis_F\fg2\stackless64\stackless\PC\VS9.0\amd64\python" -Wd -3 -E -tt "D:\kruis_F\fg2\stackless64\stackless\PC\VS9.0\ \..\..\Lib\test\regrtest.py" -v test_sysconfig == CPython 2.7.11 Stackless 3.1b3 060516 (default, Oct 28 2016, 22:32:20) [MSC v.1500 64 bit (AMD64)] == Windows-7-6.1.7601-SP1 little-endian == c:\users\kruis\appdata\local\temp\test_python_12436 Testing with flags: sys.flags(debug=0, py3k_warning=1, division_warning=1, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_ site=0, no_site=0, ignore_environment=1, tabcheck=2, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0) [1/1] test_sysconfig test_get_config_h_filename (test.test_sysconfig.TestSysConfig) ... FAIL test_get_config_vars (test.test_sysconfig.TestSysConfig) ... ok test_get_makefile_filename (test.test_sysconfig.TestSysConfig) ... skipped 'Test is not Windows compatible' test_get_path (test.test_sysconfig.TestSysConfig) ... ok test_get_path_names (test.test_sysconfig.TestSysConfig) ... ok test_get_paths (test.test_sysconfig.TestSysConfig) ... ok test_get_platform (test.test_sysconfig.TestSysConfig) ... ok test_get_scheme_names (test.test_sysconfig.TestSysConfig) ... ok test_platform_in_subprocess (test.test_sysconfig.TestSysConfig) ... skipped 'test only relevant on MacOSX' test_symlink (test.test_sysconfig.TestSysConfig) ... skipped 'module os has no attribute symlink' test_user_similar (test.test_sysconfig.TestSysConfig) ... ok ====================================================================== FAIL: test_get_config_h_filename (test.test_sysconfig.TestSysConfig) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\kruis_F\fg2\stackless64\stackless\lib\test\test_sysconfig.py", line 239, in test_get_config_h_filename self.assertTrue(os.path.isfile(config_h), config_h) AssertionError: D:\kruis_F\fg2\stackless64\stackless\Include\pyconfig.h --8<-----------8<-----------8<-----------8<-----------8<-----------8<--------- The failure is caused by the migration of the build files from PCbuild to PC\VS9.0, because Lib/sysconfig.py does not know this build location. The attached patch fixes the problem. ---------- components: Library (Lib), Tests, Windows files: fix_sysconfig_py.patch keywords: patch messages: 279631 nosy: anselm.kruis, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: sysconfig.py wrong _PROJECT_BASE for Py2.7 Windows 64bit PC/VS9.0 type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file45256/fix_sysconfig_py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 18:05:35 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Oct 2016 22:05:35 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477692335.28.0.0253107848665.issue28544@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.6 & default don't compile on Windows because of the change: http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/2795/steps/compile/logs/stdio "D:\buildarea\3.x.bolen-windows8\build\PCbuild\_asyncio.vcxproj" (Build target) (15) -> (Link target) -> _asynciomodule.obj : error LNK2019: unresolved external symbol _PyDict_Pop referenced in function task_step [D:\buildarea\3.x.bolen-windows8\build\PCbuild\_asyncio.vcxproj] _asynciomodule.obj : error LNK2019: unresolved external symbol _PyGen_Send referenced in function task_step_impl [D:\buildarea\3.x.bolen-windows8\build\PCbuild\_asyncio.vcxproj] D:\buildarea\3.x.bolen-windows8\build\PCBuild\amd64\_asyncio_d.pyd : fatal error LNK1120: 2 unresolved externals [D:\buildarea\3.x.bolen-windows8\build\PCbuild\_asyncio.vcxproj] ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 18:13:05 2016 From: report at bugs.python.org (Alexander P) Date: Fri, 28 Oct 2016 22:13:05 +0000 Subject: [issue28552] Distutils fail if sys.executable is None Message-ID: <1477692785.38.0.0178074609676.issue28552@psf.upfronthosting.co.za> New submission from Alexander P: For example, Jython 2.7. When we try to execute `jython-standalone -m pip`, distutils.sysconfig tries to parse sys.executable as a path and obviously fails: Traceback (most recent call last): File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/runpy.py", line 161, in _run_module_as_main File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/runpy.py", line 72, in _run_code File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__main__.py", line 4, in File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", line 220, in _main File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", line 123, in bootstrap File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", line 45, in _run_pip File "/tmp/tmp9QnVEm/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", line 10, in File "/tmp/tmp9QnVEm/pip-1.6-py2.py3-none-any.whl/pip/util.py", line 13, in File "/tmp/tmp9QnVEm/pip-1.6-py2.py3-none-any.whl/pip/backwardcompat/__init__.py", line 115, in File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/distutils/sysconfig.py", line 28, in File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/posixpath.py", line 367, in realpath File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/posixpath.py", line 373, in _joinrealpath File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/posixpath.py", line 61, in isabs AttributeError: 'NoneType' object has no attribute 'startswith' ---------- components: Distutils messages: 279633 nosy: dstufft, eric.araujo, iamale priority: normal severity: normal status: open title: Distutils fail if sys.executable is None type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 18:42:15 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 28 Oct 2016 22:42:15 +0000 Subject: [issue28548] http.server parse_request() bug and error reporting In-Reply-To: <1477670229.81.0.419990644201.issue28548@psf.upfronthosting.co.za> Message-ID: <1477694535.84.0.726910173055.issue28548@psf.upfronthosting.co.za> Martin Panter added the comment: I think you should be able to reproduce this without Mailman or tox, by just running ?python -m http.server?. The problem is the ?HTTP/0.9? protocol that Python is assuming does not include a header section, so there is no place to put a 400 status code or header fields. The HTTP 0.9 response is supposed to only be a HTML body; see and . I think we should drop HTTP 0.9 response support from Python?s HTTP server, as well as the attempted but buggy request support. But there was a bit of resistance; see Issue 10721. Another possibility would be to change default_request_version so that error responses are sent as HTTP 1.0. But there may be more fixes needed for this to continue the buggy HTTP 0.9 support; see Issue 26578. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 18:49:17 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Oct 2016 22:49:17 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <20161028224914.7163.94679.764BD4F0@psf.io> Roundup Robot added the comment: New changeset 635f5854cb3e by Yury Selivanov in branch '3.6': Issue #28544: Fix compilation of _asynciomodule.c on Windows https://hg.python.org/cpython/rev/635f5854cb3e New changeset 9d95510dc203 by Yury Selivanov in branch 'default': Merge 3.6 (issue #28544) https://hg.python.org/cpython/rev/9d95510dc203 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 18:52:23 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 28 Oct 2016 22:52:23 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477695143.88.0.856597514457.issue28544@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Python 3.6 & default don't compile on Windows because of the change: Pushed a fix for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 18:57:56 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 28 Oct 2016 22:57:56 +0000 Subject: [issue28548] http.server parse_request() bug and error reporting In-Reply-To: <1477670229.81.0.419990644201.issue28548@psf.upfronthosting.co.za> Message-ID: <1477695476.4.0.389180893582.issue28548@psf.upfronthosting.co.za> Martin Panter added the comment: Parsing the version from words[-1] rather than words[2] may be a minor improvement however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 18:59:01 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 28 Oct 2016 22:59:01 +0000 Subject: [issue10721] Remove HTTP 0.9 server support In-Reply-To: <1292523705.43.0.300913774105.issue10721@psf.upfronthosting.co.za> Message-ID: <1477695541.48.0.385947172521.issue10721@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 19:01:22 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 28 Oct 2016 23:01:22 +0000 Subject: [issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9 In-Reply-To: <1458200556.85.0.71774056033.issue26578@psf.upfronthosting.co.za> Message-ID: <1477695682.41.0.731384461572.issue26578@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 19:01:53 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Oct 2016 23:01:53 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <20161028230150.7061.49194.276E6711@psf.io> Roundup Robot added the comment: New changeset db7bcd92cf85 by Yury Selivanov in branch '3.6': Issue #28544: Pass `PyObject*` to _PyDict_Pop, not `PyDictObject*` https://hg.python.org/cpython/rev/db7bcd92cf85 New changeset 60b6e820abe5 by Yury Selivanov in branch 'default': Merge 3.6 (issue #28544) https://hg.python.org/cpython/rev/60b6e820abe5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 19:04:38 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 28 Oct 2016 23:04:38 +0000 Subject: [issue28548] http.server parse_request() bug and error reporting In-Reply-To: <1477694535.84.0.726910173055.issue28548@psf.upfronthosting.co.za> Message-ID: <20161028190434.158258a9@subdivisions.wooz.org> Barry A. Warsaw added the comment: On Oct 28, 2016, at 10:42 PM, Martin Panter wrote: >I think you should be able to reproduce this without Mailman or tox, by just >running ?python -m http.server?. Yep, indeed. >The problem is the ?HTTP/0.9? protocol that Python is assuming does not >include a header section, so there is no place to put a 400 status code or >header fields. The HTTP 0.9 response is supposed to only be a HTML body; see > and >. > >I think we should drop HTTP 0.9 response support from Python?s HTTP server, >as well as the attempted but buggy request support. But there was a bit of >resistance; see Issue 10721. > >Another possibility would be to change default_request_version so that error >responses are sent as HTTP 1.0. But there may be more fixes needed for this >to continue the buggy HTTP 0.9 support; see Issue 26578. I think it may indeed make sense to set default_request_version to 1.0. It's probably too late to do that for 3.6, but I do think it makes sense for 3.7. I'm nosying on the issues you mentioned. I've proposed essentially that workaround for Mailman. https://gitlab.com/mailman/mailman/issues/288 We can get away with requiring at least HTTP/1.1 for our REST clients. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 19:05:08 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 28 Oct 2016 23:05:08 +0000 Subject: [issue28548] http.server parse_request() bug and error reporting In-Reply-To: <1477695476.4.0.389180893582.issue28548@psf.upfronthosting.co.za> Message-ID: <20161028190505.58c1b07e@subdivisions.wooz.org> Barry A. Warsaw added the comment: On Oct 28, 2016, at 10:57 PM, Martin Panter wrote: >Parsing the version from words[-1] rather than words[2] may be a minor >improvement however. Indeed; I thought about that too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 20:08:04 2016 From: report at bugs.python.org (Ofek Lev) Date: Sat, 29 Oct 2016 00:08:04 +0000 Subject: [issue28553] int.to_bytes docs logic error Message-ID: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> New submission from Ofek Lev: https://docs.python.org/3/library/stdtypes.html#int.to_bytes To convert an int to the exact number of bytes required, the docs recommend "x.to_bytes((x.bit_length() // 8) + 1, ...)". This is incorrect when length is a multiple of 8, e.g. 296. The correct way is "x.to_bytes((x.bit_length() + 7) // 8, ...)". ---------- assignee: docs at python components: Documentation messages: 279641 nosy: Ofekmeister, docs at python priority: normal severity: normal status: open title: int.to_bytes docs logic error type: enhancement versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 20:51:04 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 29 Oct 2016 00:51:04 +0000 Subject: [issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9 In-Reply-To: <1458200556.85.0.71774056033.issue26578@psf.upfronthosting.co.za> Message-ID: <1477702264.44.0.812370413329.issue26578@psf.upfronthosting.co.za> Martin Panter added the comment: Since my last comment, I have become more confident that Python?s request parsing never supported proper HTTP 0.9. So I would prefer to remove it in the next version of Python, and not bother fixing Xiang?s bug in existing versions (unless someone offers a practical reason to fix it). For the record, this patch is what a fix might look like. ---------- keywords: +patch Added file: http://bugs.python.org/file45257/force-0.9.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 21:09:15 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 29 Oct 2016 01:09:15 +0000 Subject: [issue10721] Remove HTTP 0.9 server support In-Reply-To: <1292523705.43.0.300913774105.issue10721@psf.upfronthosting.co.za> Message-ID: <1477703355.24.0.276606319118.issue10721@psf.upfronthosting.co.za> Martin Panter added the comment: Here is a slightly updated patch I have been sitting on. I think the main difference was tweaks to the documentation. Issue 28548 would also benefit if the HTTP 0.9 code was removed. The presence of the HTTP 0.9 code means a suboptimal response is sent in some error cases. IMO it would be better if the server responded using HTTP 1.0, where we can use error codes like ?400 Bad request?. The current code will not use HTTP 1.0 unless it sees that the client supports it. ---------- versions: +Python 3.7 -Python 3.6 Added file: http://bugs.python.org/file45258/http09server.v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 22:12:47 2016 From: report at bugs.python.org (Yutao Yuan) Date: Sat, 29 Oct 2016 02:12:47 +0000 Subject: [issue28549] curses: calling addch() with an 1-length str segfaults with ncurses6 compiled with --enable-ext-colors In-Reply-To: <1477677069.87.0.354681142627.issue28549@psf.upfronthosting.co.za> Message-ID: <1477707167.16.0.2697468275.issue28549@psf.upfronthosting.co.za> Yutao Yuan added the comment: It fails to compile for me. setcchar should take a cchar_t* and a const wchar_t* instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 22:17:28 2016 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 29 Oct 2016 02:17:28 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477707448.77.0.305974027711.issue28544@psf.upfronthosting.co.za> Yury Selivanov added the comment: Looks like that Windows buildbot is green now. Closing. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 22:20:29 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 29 Oct 2016 02:20:29 +0000 Subject: [issue28548] http.server parse_request() bug and error reporting In-Reply-To: <1477670229.81.0.419990644201.issue28548@psf.upfronthosting.co.za> Message-ID: <1477707629.04.0.029938034758.issue28548@psf.upfronthosting.co.za> Martin Panter added the comment: Here is a patch to parse the version from the request in more cases. Since it is more of a cosmetic improvement for handling erroneous requests, I would probably only apply it to the next Python version (3.7 atm). Or do you think it should go into bug fix versions as well? ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file45259/parse-version.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 22:48:34 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 29 Oct 2016 02:48:34 +0000 Subject: [issue28539] httplib/http.client HTTPConnection._set_hostport() regression In-Reply-To: <1477509167.25.0.917011281654.issue28539@psf.upfronthosting.co.za> Message-ID: <1477709314.93.0.605886485406.issue28539@psf.upfronthosting.co.za> Martin Panter added the comment: In general, I would be against stripping square brackets if the host and port have already been separated, e.g. in the address tuple used with socket.create_connection() etc. It feels like unnecessary double processing, which should already have been done at a higher level. But I guess you could make the argument that adding this feature in HTTPConnection simplifies the API by improving consistency with the case where the port is not specified separately. But I would still say it is not a bug fix nor regression, and should be documented as being added in the next Python version (3.7 atm). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 23:26:08 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 29 Oct 2016 03:26:08 +0000 Subject: [issue28542] document cross compilation In-Reply-To: <1477563460.46.0.569265292251.issue28542@psf.upfronthosting.co.za> Message-ID: <1477711568.13.0.876919775631.issue28542@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks, this looks like a decent start. I?m not that familiar with cross-compiling Python, but here are a couple questions: $(cd /path/to/source && pwd)/configure Why do you use $(pwd) here? I have mainly seen relative paths used (my own experiments, and reports from others), so I don?t think you need to force an absolute path. The instructions further up already mention ?../configure? from a subdirectory. --prefix=$(cd ../install && pwd) Won?t that embed the path of the install directory in e.g. sys.prefix or something? Can?t you use ?DESTDIR=../install? instead? I remember there are a bunch of extra things you have to manually configure to cross-compile. See e.g. revision 12a56a349af2 which asks for /dev/ptmx and /dev/ptc settings in a CONFIG_SITE file (although I have had success just adding them to the ?configure? command line). Perhaps we could add something like ''' configure --host=[. . .] \ ac_cv_file__dev_ptmx=no \ ac_cv_file__dev_ptc=no . . . If the target Python could use /dev/ptmx or /dev/ptc to implement os.openpty(), set the corresponding argument to "yes". ''' I suspect some people cross compile 2.7, so it may be worth applying something like this to that branch. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 23:46:46 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 29 Oct 2016 03:46:46 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1477712806.29.0.309528150739.issue28444@psf.upfronthosting.co.za> Martin Panter added the comment: Looks good to me :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 23:46:58 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sat, 29 Oct 2016 03:46:58 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477712818.19.0.551143273194.issue28128@psf.upfronthosting.co.za> Emanuel Barry added the comment: Following Ned's email to Python-Dev, I'm upping the priority of this issue to "deferred blocker". I haven't had a lot of time to work on this, but I had time to think about it, and I think that resolving #28028 would be the best way to solved this. I pinged this issue as well and added several people to nosy there. I've also added it as a dependency of this issue. To be clear, I really like Eric's approach to this, but I think that resolving #28028 would let us kill a couple of issues with the same patch. My priority is getting this issue here resolved, though, so either way works. I doubt I'll have much time to actually work on this; life's been busy and Python isn't my priority right now (as much as I'd like it to be). ---------- dependencies: +Convert warnings to SyntaxWarning in parser priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 23:47:00 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sat, 29 Oct 2016 03:47:00 +0000 Subject: [issue28028] Convert warnings to SyntaxWarning in parser In-Reply-To: <1473362584.72.0.509126494717.issue28028@psf.upfronthosting.co.za> Message-ID: <1477712820.53.0.627029242027.issue28028@psf.upfronthosting.co.za> Emanuel Barry added the comment: Cross-ping from #28128 I think it would be best to solve this issue, solving both #28128 and any future warning-introducing feature or deprecation. I've marked this issue as a dependency for #28128 as well as upping the priority. There are less than 7 weeks before the final 3.6.0 release and I would like to get as much mileage out of this before then. Thanks :) ---------- nosy: +eric.smith, martin.panter, ncoghlan, ned.deily priority: normal -> high stage: -> needs patch versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 00:14:27 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 29 Oct 2016 04:14:27 +0000 Subject: [issue25660] tabs don't work correctly in python repl In-Reply-To: <1447876730.91.0.918964104484.issue25660@psf.upfronthosting.co.za> Message-ID: <1477714467.36.0.865060588447.issue25660@psf.upfronthosting.co.za> Martin Panter added the comment: Cl?ment: Yes, that sounds like the intended behaviour, at least when using Readline. Originally discussed in Issue 23441 and Issue 22086. (Though I think the change in behaviour when completion is called outside of Readline is a bug.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 00:28:02 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Oct 2016 04:28:02 +0000 Subject: [issue28552] Distutils fail if sys.executable is None In-Reply-To: <1477692785.38.0.0178074609676.issue28552@psf.upfronthosting.co.za> Message-ID: <1477715282.26.0.608226791511.issue28552@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not sure it is reasonable to expect distutils to work if sys.executable is not valid. What do you think distutils could do instead? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 01:10:51 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 29 Oct 2016 05:10:51 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477717851.45.0.807831430259.issue28128@psf.upfronthosting.co.za> Nick Coghlan added the comment: Petr, is there any chance you or someone from your team could take a look at this and the other issue Emanuel referenced? These warnings are likely to pose a usability problem when upgrading Python in Fedora in their current state, so it would be good to see them addressed prior to the 3.6.0 release. ---------- nosy: +encukou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 02:14:00 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 29 Oct 2016 06:14:00 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477721640.73.0.798391842129.issue28199@psf.upfronthosting.co.za> Xiang Zhang added the comment: If you inline insert_index, dictresize3 is not that bad. ./python3 -m perf timeit -s 'x = list(range(1000))' -- 'dict.fromkeys(x)' dictresize3: Median +- std dev: 43.9 us +- 0.7 us dictresize3(insert_index inlined): Median +- std dev: 41.6 us +- 0.6 us dictresize4: Median +- std dev: 41.7 us +- 1.2 us But don't bother on microbenchmark, just move on. I just think the logic is not as clear as dictresize3. But the easiness for future modification makes sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 02:42:48 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 29 Oct 2016 06:42:48 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1477685025.02.0.178216551343.issue28199@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: Serhiy, would you commit it by 3.6b3? -- sent from mobile ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 02:54:29 2016 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 29 Oct 2016 06:54:29 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477724069.45.0.895606517156.issue28128@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 03:12:38 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Oct 2016 07:12:38 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <20161029071235.25505.76464.22832D97@psf.io> Roundup Robot added the comment: New changeset 950fbd75223b by Victor Stinner in branch '3.6': Issue #28544: Fix inefficient call to _PyObject_CallMethodId() https://hg.python.org/cpython/rev/950fbd75223b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 03:13:51 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 29 Oct 2016 07:13:51 +0000 Subject: [issue28554] Windows: _socket module fails to compile on "AMD64 Windows7 SP1 3.x" buildbot Message-ID: <1477725231.13.0.640835129837.issue28554@psf.upfronthosting.co.za> New submission from STINNER Victor: It looks like the build 8776 was fine, but compilation of _socket started to fail near the build: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/8777 The related change 16ea07d420b864d786ef9c11a07967fe19c3a9cd seems unrelated. ---------- components: Windows messages: 279658 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows: _socket module fails to compile on "AMD64 Windows7 SP1 3.x" buildbot type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 03:17:48 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 29 Oct 2016 07:17:48 +0000 Subject: [issue28554] Windows: _socket module fails to compile on "AMD64 Windows7 SP1 3.x" buildbot "because "AlwaysCreate" was specified" In-Reply-To: <1477725231.13.0.640835129837.issue28554@psf.upfronthosting.co.za> Message-ID: <1477725468.24.0.0465620897668.issue28554@psf.upfronthosting.co.za> STINNER Victor added the comment: Interesting message: "because "AlwaysCreate" was specified". Extract of a failed build: Touching "C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\obj\\amd64_Debug\_sqlite3\_sqlite3.tlog\_sqlite3.lastbuildstate". 29>Done Building Project "C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_sqlite3.vcxproj" (Build target(s)). 32>ClCompile: All outputs are up-to-date. The target "BeforeGenerateProjectPriFile" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.targets (186,61)" does not exist in the project, and will be ignored. 33>GeneratePythonNtRcH: Skipping target "GeneratePythonNtRcH" because all output files are up-to-date with respect to the input files. ClCompile: All outputs are up-to-date. 31>Project "C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_ssl.vcxproj" (31) is building "C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_socket.vcxproj" (34) on node 2 (default targets). 34>InitializeBuildStatus: Creating "C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\obj\\amd64_Debug\_socket\_socket.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified. GeneratePythonNtRcH: Skipping target "GeneratePythonNtRcH" because all output files are up-to-date with respect to the input files. ClCompile: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\CL.exe /c /I"C:\buildbot.python.org\3.x.kloth-win64\build\Include" /I"C:\buildbot.python.org\3.x.kloth-win64\build\PC" /I"C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\obj\\amd64_Debug\_socket\\" /Zi /nologo /W3 /WX- /Od /Oi /D WIN32 /D _WIN64 /D _M_X64 /D _DEBUG /D Py_BUILD_CORE_MODULE /D _WINDLL /GF /Gm- /MDd /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\obj\\amd64_Debug\_socket\\" /Fd"C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\obj\\amd64_Debug\_socket\vc140.pdb" /Gd /TC /errorReport:queue ..\Modules\socketmodule.c 33>Lib: All outputs are up-to-date. ssleay.vcxproj -> C:\buildbot.python.org\3.x.kloth-win64\build\PCBuild\amd64\ssleay_d.lib 34>ClCompile: socketmodule.c The target "BeforeGenerateProjectPriFile" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.targets (186,61)" does not exist in the project, and will be ignored. 32>Lib: All outputs are up-to-date. 33>FinalizeBuildStatus: Deleting file "C:\buildbot.python.org\3.x.kloth-win64\build\externals\openssl-1.0.2j\tmp\\amd64_Debug\ssleay\ssleay.tlog\unsuccessfulbuild". Touching "C:\buildbot.python.org\3.x.kloth-win64\build\externals\openssl-1.0.2j\tmp\\amd64_Debug\ssleay\ssleay.tlog\ssleay.lastbuildstate". 33>Done Building Project "C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\ssleay.vcxproj" (default targets). 32>Lib: ---------- title: Windows: _socket module fails to compile on "AMD64 Windows7 SP1 3.x" buildbot -> Windows: _socket module fails to compile on "AMD64 Windows7 SP1 3.x" buildbot "because "AlwaysCreate" was specified" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 03:21:01 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Oct 2016 07:21:01 +0000 Subject: [issue28549] curses: calling addch() with an 1-length str segfaults with ncurses6 compiled with --enable-ext-colors In-Reply-To: <1477677069.87.0.354681142627.issue28549@psf.upfronthosting.co.za> Message-ID: <1477725661.33.0.519060155737.issue28549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, sorry. libncursesw5-dev was not installed on my computer. Please try updated patch. ---------- Added file: http://bugs.python.org/file45260/curses_setcchar_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 03:30:06 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Sat, 29 Oct 2016 07:30:06 +0000 Subject: [issue4032] distutils doesn't search ".dll.a" as library on cygwin In-Reply-To: <1223055534.39.0.439061882395.issue4032@psf.upfronthosting.co.za> Message-ID: <1477726206.08.0.66952816236.issue4032@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: Move version to 3.7 and 2.7, and I updated two patches adding import library type for file searching. Current Cygwin is used UnixCCompiler, and the compiler has be able to build extension module that doesn't need to library link at build time (e.g. array). And CygwinCCompiler has supported old version compilers, but its haven't maintained on Current Cygwin any longer. Therefore I think there is no necessary that waits solution to #2445 and #18654. So would you be able to free dependence to #2445, and start to review the patches? Many thanks. ---------- components: +Build -Windows keywords: +patch nosy: +masamoto title: distutils cannot recognize ".dll.a" as library on cygwin -> distutils doesn't search ".dll.a" as library on cygwin type: -> behavior versions: +Python 3.7 -Python 3.4, Python 3.5 Added file: http://bugs.python.org/file45261/unixccompiler-implib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 03:32:01 2016 From: report at bugs.python.org (Masayuki Yamamoto) Date: Sat, 29 Oct 2016 07:32:01 +0000 Subject: [issue4032] distutils doesn't search ".dll.a" as library on cygwin In-Reply-To: <1223055534.39.0.439061882395.issue4032@psf.upfronthosting.co.za> Message-ID: <1477726321.24.0.0206781690364.issue4032@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: And updated patch for 2.7 ---------- Added file: http://bugs.python.org/file45262/2.7-unixccompiler-implib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 03:50:23 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Oct 2016 07:50:23 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <20161029075020.22316.38385.4E93115D@psf.io> Roundup Robot added the comment: New changeset 6b88dfc7b25d by Serhiy Storchaka in branch '3.6': Issue #28199: Microoptimized dict resizing. Based on patch by Naoki Inada. https://hg.python.org/cpython/rev/6b88dfc7b25d New changeset f0fbc6071d7e by Serhiy Storchaka in branch 'default': Issue #28199: Microoptimized dict resizing. Based on patch by Naoki Inada. https://hg.python.org/cpython/rev/f0fbc6071d7e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 03:57:44 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Oct 2016 07:57:44 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477727864.22.0.176830654648.issue28199@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't have strong preferences, but at this moment dictresize4.patch looks a little better to me. Maybe I wrong and in future optimizations we will returned to insert_index(). Yet one opportunity for future optimization -- inline dk_get_index() and dk_set_index() and move check for indices width out of the loop. I don't know whether there is significant effect of this. ---------- resolution: -> fixed stage: -> resolved status: open -> closed type: -> performance versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 04:46:15 2016 From: report at bugs.python.org (Alexander P) Date: Sat, 29 Oct 2016 08:46:15 +0000 Subject: [issue28552] Distutils fail if sys.executable is None In-Reply-To: <1477692785.38.0.0178074609676.issue28552@psf.upfronthosting.co.za> Message-ID: <1477730775.3.0.968730577709.issue28552@psf.upfronthosting.co.za> Alexander P added the comment: Well, project_base (which is what sys.executable is used for) is used only during build (i. e. python_build is True), if I understand it correctly. Normally, sys.prefix and sys.exec_prefix are used for all the paths. Also, project_base can be explicitly set using _PYTHON_PROJECT_BASE environ variable, in which case we still don't need sys.executable (but it still would fail without one right now). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 05:14:27 2016 From: report at bugs.python.org (Big Stone) Date: Sat, 29 Oct 2016 09:14:27 +0000 Subject: [issue28555] provid also sha-1 and sha-256 also on download links Message-ID: <1477732467.71.0.578620687465.issue28555@psf.upfronthosting.co.za> New submission from Big Stone: It would be nice to have also sha-1 and sha-256 provided with python-360b3 download links and annoucement (so no separate sites). md5 is dangerously easy to workaround nowodays ---------- messages: 279666 nosy: Big Stone priority: normal severity: normal status: open title: provid also sha-1 and sha-256 also on download links _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 05:16:09 2016 From: report at bugs.python.org (Big Stone) Date: Sat, 29 Oct 2016 09:16:09 +0000 Subject: [issue28555] provid also sha-1 and sha-256 also on download links In-Reply-To: <1477732467.71.0.578620687465.issue28555@psf.upfronthosting.co.za> Message-ID: <1477732569.1.0.426061473381.issue28555@psf.upfronthosting.co.za> Big Stone added the comment: oups ! i mean "ON several sites" ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 05:36:45 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 29 Oct 2016 09:36:45 +0000 Subject: [issue28542] document cross compilation In-Reply-To: <1477563460.46.0.569265292251.issue28542@psf.upfronthosting.co.za> Message-ID: <1477733805.38.0.425957178451.issue28542@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > $(cd /path/to/source && pwd)/configure > Why do you use $(pwd) here? 'configure' fails with the following error message when used with '--prefix=../install': configure: error: expected an absolute directory name for --prefix: ../install So for consistency, the example used absolute paths everywhere. > --prefix=$(cd ../install && pwd) > Won?t that embed the path of the install directory in e.g. sys.prefix or something? Can?t you use ?DESTDIR=../install? instead? You are right. On an Android device where /usr and /bin do not exist, the platform independent Python files are installed on the sdcard. So the build system I am using for Android does the following: * uses '--prefix=/sdcard/org.bitbucket.pyona * before running 'make install', it creates temporarily the /sdcard directory on the build system (with sudo) and use 'sudo mount --bind $INSTALL_ROOT /sdcard' so that 'make install' actually copies the files to $INSTALL_ROOT and so that the modules are byte compiled modules with the proper '-d' option to compileall. This allows also for multiple cross-compilation using different $INSTALL_ROOT directory names for each Android API level or architecture (x86, arm, armv7, ...) * creates a tar file from the files in $INSTALL_ROOT that is later copied and expanded on the device using the Android swiss army knife 'adb shell'. > I remember there are a bunch of extra things you have to manually configure to cross-compile. See e.g. revision 12a56a349af2 which asks for /dev/ptmx and /dev/ptc settings in a CONFIG_SITE file (although I have had success just adding them to the ?configure? command line). Perhaps we could add something like > > ''' > configure --host=[. . .] \ > ac_cv_file__dev_ptmx=no \ > ac_cv_file__dev_ptc=no > . . . > > If the target Python could use /dev/ptmx or /dev/ptc to implement os.openpty(), set the corresponding argument to "yes". Ok > I suspect some people cross compile 2.7, so it may be worth applying something like this to that branch. Not sure that all the recent cross-compilation changes have been applied to 2.7. Would not documenting cross-compilation in 2.7 entail that we support it on 2.7 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 06:01:22 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 29 Oct 2016 10:01:22 +0000 Subject: [issue28542] document cross compilation In-Reply-To: <1477563460.46.0.569265292251.issue28542@psf.upfronthosting.co.za> Message-ID: <1477735282.4.0.596593475806.issue28542@psf.upfronthosting.co.za> Xavier de Gaye added the comment: New patch. ---------- Added file: http://bugs.python.org/file45263/readme_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 06:35:25 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 29 Oct 2016 10:35:25 +0000 Subject: [issue21590] Systemtap and DTrace support In-Reply-To: <1401195995.8.0.935339035852.issue21590@psf.upfronthosting.co.za> Message-ID: <1477737325.03.0.0149400599877.issue21590@psf.upfronthosting.co.za> SilentGhost added the comment: Building the documentation on Ubuntu 16.10, I started getting the following warnings: /Doc/howto/instrumentation.rst:58: WARNING: Could not lex literal_block as "python3". Highlighting skipped. /Doc/howto/instrumentation.rst:139: WARNING: Could not lex literal_block as "c". Highlighting skipped. /Doc/howto/instrumentation.rst:211: WARNING: Could not lex literal_block as "c". Highlighting skipped. /Doc/howto/instrumentation.rst:328: WARNING: Could not lex literal_block as "c". Highlighting skipped. I guess the trick of using c for systemtap doesn't work anymore, not entirely sure what's the problem with the python3 highlighting. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 07:19:59 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 29 Oct 2016 11:19:59 +0000 Subject: [issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9 In-Reply-To: <1458200556.85.0.71774056033.issue26578@psf.upfronthosting.co.za> Message-ID: <1477739999.9.0.873839893289.issue26578@psf.upfronthosting.co.za> Xiang Zhang added the comment: > So I would prefer to remove it in the next version of Python, and not bother fixing Xiang?s bug in existing versions. +1. In rfc7230, "The expectation to support HTTP/0.9 requests has been removed". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 08:43:06 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 29 Oct 2016 12:43:06 +0000 Subject: [issue21590] Systemtap and DTrace support In-Reply-To: <1401195995.8.0.935339035852.issue21590@psf.upfronthosting.co.za> Message-ID: <1477744986.76.0.0638661606395.issue21590@psf.upfronthosting.co.za> SilentGhost added the comment: Here is the patch that fixes warning in /Doc/howto/instrumentation.rst as well as cleans up a few nits here and there. I've removed attempt at highlighting using c since that doesn't work in practice. ---------- keywords: +patch nosy: +berker.peksag stage: -> patch review versions: +Python 3.7 Added file: http://bugs.python.org/file45264/21590_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 09:53:40 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 29 Oct 2016 13:53:40 +0000 Subject: [issue28548] http.server parse_request() bug and error reporting In-Reply-To: <1477707629.04.0.029938034758.issue28548@psf.upfronthosting.co.za> Message-ID: <20161029095337.055576f6@subdivisions.wooz.org> Barry A. Warsaw added the comment: On Oct 29, 2016, at 02:20 AM, Martin Panter wrote: >Here is a patch to parse the version from the request in more cases. Since it >is more of a cosmetic improvement for handling erroneous requests, I would >probably only apply it to the next Python version (3.7 atm). Or do you think >it should go into bug fix versions as well? That would be a RM decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 10:14:48 2016 From: report at bugs.python.org (=?utf-8?q?Cl=C3=A9ment?=) Date: Sat, 29 Oct 2016 14:14:48 +0000 Subject: [issue25660] tabs don't work correctly in python repl In-Reply-To: <1447876730.91.0.918964104484.issue25660@psf.upfronthosting.co.za> Message-ID: <1477750488.27.0.667437809115.issue25660@psf.upfronthosting.co.za> Cl?ment added the comment: Thanks Martin for the clarification! I'll leave it to you to decide whether there is something to fix here (I'll admit to not understanding much of that code). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 10:34:34 2016 From: report at bugs.python.org (Miguel) Date: Sat, 29 Oct 2016 14:34:34 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477751674.43.0.189001361572.issue28498@psf.upfronthosting.co.za> Miguel added the comment: Why dont we do the job well from the beginning and refactor _configure() and adapt other dependent code? It's not so complicated to change the dependent code. Many people around the world use Tkinter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 10:44:06 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 29 Oct 2016 14:44:06 +0000 Subject: [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <1477752246.98.0.447585026381.issue26638@psf.upfronthosting.co.za> SilentGhost added the comment: Patch (v3) is fine, except it no longer applies cleanly. I have a patch against the tip which I could upload if needed. I would also be in favour of disabling the unittest options directly, currently no link is generated and it doesn't seem like there is a straightforward solution in sight. ---------- nosy: +SilentGhost stage: patch review -> commit review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 11:01:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Oct 2016 15:01:51 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <20161029150145.22336.94849.FA0770CA@psf.io> Roundup Robot added the comment: New changeset 4b2679a06ace by Xavier de Gaye in branch '3.5': Issue #28444: Fix missing extensions modules when cross compiling. https://hg.python.org/cpython/rev/4b2679a06ace New changeset cddb7b2aba34 by Xavier de Gaye in branch '3.6': Issue #28444: Merge with 3.5. https://hg.python.org/cpython/rev/cddb7b2aba34 New changeset a87d4324e804 by Xavier de Gaye in branch 'default': Issue #28444: Merge with 3.6. https://hg.python.org/cpython/rev/a87d4324e804 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 11:05:12 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 29 Oct 2016 15:05:12 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1477753512.49.0.512501848883.issue28444@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 11:09:32 2016 From: report at bugs.python.org (Yutao Yuan) Date: Sat, 29 Oct 2016 15:09:32 +0000 Subject: [issue28549] curses: calling addch() with an 1-length str segfaults with ncurses6 compiled with --enable-ext-colors In-Reply-To: <1477677069.87.0.354681142627.issue28549@psf.upfronthosting.co.za> Message-ID: <1477753772.71.0.914604932872.issue28549@psf.upfronthosting.co.za> Yutao Yuan added the comment: Yes, it works for me now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 11:35:49 2016 From: report at bugs.python.org (Steve Dower) Date: Sat, 29 Oct 2016 15:35:49 +0000 Subject: [issue28554] Windows: _socket module fails to compile on "AMD64 Windows7 SP1 3.x" buildbot "because "AlwaysCreate" was specified" In-Reply-To: <1477725231.13.0.640835129837.issue28554@psf.upfronthosting.co.za> Message-ID: <1477755349.74.0.605447019365.issue28554@psf.upfronthosting.co.za> Steve Dower added the comment: I don't think the build failed, what's more likely is that my recent test_site additions (to test restricted sys.path) are not cleaning up correctly and that's leading to other issue. I've emailed Jeremy to check the buildbot, and I'm working on making those tests more safe in case they abort without cleaning up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 11:46:49 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 29 Oct 2016 15:46:49 +0000 Subject: [issue28556] typing.py upgrades Message-ID: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> New submission from Guido van Rossum: Over at https://github.com/python/typeshed we have a number of big changes in store. I'm eager to get these into 3.6, so I'm merging them in now, in time for 3.6b3. (Recall that PEP 484 and typing.py remain provisional until 3.7 rolls around.) ---------- messages: 279680 nosy: gvanrossum priority: normal severity: normal status: open title: typing.py upgrades _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 11:52:56 2016 From: report at bugs.python.org (Steve Dower) Date: Sat, 29 Oct 2016 15:52:56 +0000 Subject: [issue28554] Windows: _socket module fails to compile on "AMD64 Windows7 SP1 3.x" buildbot "because "AlwaysCreate" was specified" In-Reply-To: <1477725231.13.0.640835129837.issue28554@psf.upfronthosting.co.za> Message-ID: <1477756376.77.0.016778299642.issue28554@psf.upfronthosting.co.za> Steve Dower added the comment: Forgot to include the issue number in the commit message, but 0c910ea1c968 has the test improvements (whether or not they'll help here remains to be seen... I added some extra cleanup to rt.bat that might help the buildbots recover if this was the issue). ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 11:55:16 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Oct 2016 15:55:16 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <20161029155513.31907.646.ADD01AD5@psf.io> Roundup Robot added the comment: New changeset a47b07d0aba0 by Guido van Rossum in branch '3.5': Issue #28556: updates to typing.py https://hg.python.org/cpython/rev/a47b07d0aba0 New changeset d2b5c3bfa2b5 by Guido van Rossum in branch '3.6': Issue #28556: updates to typing.py (3.5->3.6) https://hg.python.org/cpython/rev/d2b5c3bfa2b5 New changeset 2c75b13ccf82 by Guido van Rossum in branch 'default': Issue #28556: updates to typing.py (3.6->3.7) https://hg.python.org/cpython/rev/2c75b13ccf82 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 12:40:38 2016 From: report at bugs.python.org (Garrett Nievin) Date: Sat, 29 Oct 2016 16:40:38 +0000 Subject: [issue28473] mailbox.MH crashes on certain Claws Mail .mh_sequences files In-Reply-To: <1476830366.57.0.390859510096.issue28473@psf.upfronthosting.co.za> Message-ID: <20161029123915.09849289@hal> Garrett Nievin added the comment: Yes, I couldn't access the mailbox at all. Here's what happens: $ cat mymail.py ; ./mymail.py #!/usr/bin/python3 import mailbox for message in mailbox.MH('~/mail/Personal'): print(message['subject']) Traceback (most recent call last): File "/usr/lib/python3.5/mailbox.py", line 1148, in get_sequences name, contents = line.split(':') ValueError: not enough values to unpack (expected 2, got 1) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./mymail.py", line 3, in for message in mailbox.MH('~/mail/Personal'): File "/usr/lib/python3.5/mailbox.py", line 108, in itervalues value = self[key] File "/usr/lib/python3.5/mailbox.py", line 72, in __getitem__ return self.get_message(key) File "/usr/lib/python3.5/mailbox.py", line 1037, in get_message for name, key_list in self.get_sequences().items(): File "/usr/lib/python3.5/mailbox.py", line 1162, in get_sequences line.rstrip()) mailbox.FormatError: Invalid sequence specification: 74 27976-27984 27987-27989 27993-27994 27996-28008 28010-28023 28025 28027-28035 28038-28054 28056-28077 28080-28104 28107-28109 28112-28117 28120-28123 28127 28129 28131 28133-28142 28145-28154 28156-28189 28191-28197 28199-28204 28206-28218 28220-28224 28226 28230-28234 28239-28242 28244-28249 28251 28253-28260 28262-28263 28265-28269 28274-28280 28282-28286 28290-28297 28300-28306 28308-28351 28354-28362 28364-28421 28423-28437 28440 28448-28452 28457-28461 28464-28475 28478-28482 28484-28489 28491-28498 28500-28504 28507-28517 28522-28525 28527-28529 28531 28536-28550 28554-28555 28562-28564 28567-28574 28577-28579 28581-28582 28586 28588-28594 28597-28603 28605-28613 28619 28622 28625-28628 28630 28632-28633 28636-28639 28643-28650 28654-28668 28671-28672 28676-28679 28681-28690 28695-28706 28710-28712 28714 28716-28717 28719-28725 28728-28730 28732-28742 28745-28748 28750-28751 28753-28763 28765-28768 28770 28772-28814 28817-28840 28843-28859 28862-28873 28876-28894 28899-28900 28902-28917 28920-28934 28936-28939 28941-28943 28945 28949-28954 28956-28959 28963-28976 28984-28988 28990-28995 28997-29017 29021-29028 29030-29068 29070-29073 29076-29083 29088 29099 29102-29104 29106-29107 29109-29119 29121-29139 29142 29144-29145 29149 29154 29163-29164 29167-29172 29174-29175 29180-29183 29189-29200 29202-29213 29215-29223 29226-29227 29230 29232-29244 29246-29253 29258-29282 29284-29294 29296-29307 29309 29311-29319 29326-29342 29345-29351 29354-29364 29371-29382 29387-29390 29393-29414 29416-29419 29421 29423-29445 29448-29486 29488-29495 29497-29507 29509-29519 29521-29539 29541-29554 29556-29557 29559-29563 29566-29571 29575-29589 29593-29601 29604-29609 29611-29617 29620-29622 29624-29647 29650-29651 29653-29664 29666-29674 29676-29683 29689-29694 29696-29701 29704-29705 29709-29711 29714-29730 29733-29751 29754 29756-29758 29760-29762 29764-29768 29770-29771 29773-29780 29782-29784 29787 29790-29805 29807-29808 29811-29819 29822-29826 29829-29831 29834-29843 29845-29848 29850-29853 29855-29864 29870 29873-29891 29893-29942 29944-29962 29970-29972 29974-29975 29977-29981 29986-29988 29992-29996 29999-30002 30006-30008 30010 30014-30039 30041-30072 30075-30087 30089-30090 30093-30142 30145-30156 30158-30171 30174-30177 30180-30194 30197 30202-30203 30206-30214 30216 30218-30227 30230-30236 30239-30277 30282-30284 30288-30316 30322-30341 30343-30373 30376-30386 30388-30405 30407-30412 30417-30418 30421-30445 30449-30452 30456-30463 30468-30488 30492-30500 30502-30510 30516-30530 30532-30538 30540-30543 30546-30548 30551 30553-30576 30578-30608 30613 30616-30618 30620-30632 30635-30639 30646-30648 30650-30651 30655-30673 30675 30678-30681 30685-30693 30695-30738 30741-30742 30745 30747 30749-30757 30760-30782 30784 30786-30792 30794-30800 30803-30809 30812-30826 30828-30837 30840-30841 30843-30847 30850-30893 30897-30898 30900 30902-30904 30906-30920 30922-30932 30938 30943-30984 30986-30990 30992-30994 30996-31001 31003-31013 31015-31018 31021-31036 31039 31043-31047 31051-31061 31064-31068 31070 31073-31074 31077-31088 31093-31095 31097-31105 31108-31115 31117 31119-31144 31147-31156 31163 31166-31181 31184-31185 31189 31191 31196-31204 31208 31210-31219 31221-31230 31232-31296 31299 31301-31308 31312-31321 31324-31327 31329-31346 31349-31368 31371-31375 31378-31387 31391-31397 31400-31401 31403-31409 31412-31423 31426-31522 31525-31534 31539-31549 31554-31555 31557-31558 31560-31584 31589-31618 31621-31637 31640-31648 31656-31669 31671-31680 31683 31685-31696 31698-31706 31708-31717 31719-31738 31740-31749 31751-31752 31755-31756 31758-31764 31766-31767 31772-31775 31777-31796 31798-31828 31830-31880 31884-31886 31888-31890 31892-31958 31961-31963 31966-31992 31996-31998 32000-32003 32006-32025 32029-32037 32039-32044 32047-32053 32056-32069 32071-32073 32075-32082 32084-32092 32095 32097-32101 32106-32136 32138 32141 32145-32156 32163-32181 32184-32199 32202-32205 32208-32212 32215-32260 32262-32284 32287-32301 32304-32352 32359-32446 32448-32456 32458-32467 32469-32472 32474-32494 32497-32611 32614-32633 32636-32665 32669-32719 32721-32743 32747-32789 32791-32794 32797-32806 32808-32819 32822 32824 32827 32829-32830 32832-32842 32846 32849-32853 32855-32862 32864-32867 32870-32871 32877-32881 32885-32886 32892-32898 32900-32912 32914-32986 32988 32991-33014 33016-33021 33023-33030 33032-33048 33051-33058 33060-33084 33087 33089-33090 33093-33098 33100-33121 33124-33127 33130-33143 33145 33147-33158 33160-33183 33187-33232 33235-33269 33271-33273 33275-33299 33302-33303 33305-33338 33341-33370 33374-33392 33394 33396-33397 33399-33405 33407-33408 33410-33422 33424-33432 33434-33440 33442-33446 33448-33462 33465-33480 33484-33551 33553-33568 33570-33575 33577-33578 33580-33589 33592-33605 33607-33613 33615-33625 33627-33635 33637-33646 33649-33652 33654-33657 33659-33667 33670-33700 33702-33705 33707-33710 33712-33743 33745-33774 33776-33782 33784 33786 33789-33794 33796-33827 33829-33858 33864 33866-33879 33882-33883 33885-33899 33901-33902 33904-33906 33909-33929 33932-33948 33950-33951 33953 33956-33983 33985-34002 34004 34006-34015 34019-34035 34039-34048 34051-34068 34072-34079 34081-34085 34087-34088 34091 34093 34096-34099 34102-34115 34117-34121 34126-34135 34139-34144 34147-34152 34154-34201 34204-34207 34209 34215-34220 34224-34247 34250-34287 34289 34293 34295-34296 34298 34300 34302-34309 34312-34353 34364-34368 34371-34375 34377-34383 34385-34411 34417-34457 34459-34472 34474-34479 34481-34517 34521-34589 34591-34610 34612-34629 34631 34633-34646 34648-34672 34675-34689 34691-34700 34703-34723 34727 34729 34731-34732 34735-34736 34739-34744 34749-34754 34757-34772 34776-34778 34780-34785 34787 34790 34792-34819 34821-34828 34830-34862 34865-34871 34873 34875 34877 34879-34883 34885-34903 34905 34909-34911 34913-34930 34932-34961 34964-35001 35003-35004 35007 35009-35033 35035-35048 35050-35058 35061-35062 35064 35068-35077 35079-35083 35087-35091 35093-35095 35098-35136 35138-35141 35144-35222 35224 35226 35230-35250 35255-35310 35312-35333 35336-35345 35348-35361 35366-35374 35379 35381-35382 35384-35390 35392-35397 35400-35403 35405-35411 35420-35479 35485-35500 35502 35504-35513 35518-35521 35524-35528 35531-35538 35540 35543-35553 35557-35571 35573 35576-35586 35589-35609 35611-35621 35623-35624 35626-35640 35642 35644-35645 35647-35648 35650-35651 35653-35659 35661-35666 35668-35672 35674 35676-35678 35680 35684 35686-35687 35689 35692 35694 35701-35702 35704 35707-35709 35711-35712 35729 35734 35740 35744 35746-35749 35754-35755 35760-35762 35766 35770-35772 35774-35775 35777 35780-35787 35791 35794-35798 35801-35854 35857 35860-35868 35871-35880 35882-35885 35889 35894-35921 35923 35926-35942 35944-35954 35957-35988 35990-35991 35993-36008 36010-36012 36014-36071 36073-36083 36085-36128 36131-36146 36151-36163 36165 36170 36174-36181 36183-36206 36208 36212 36215-36222 36224-36227 36232-36242 36247 36249-36271 36273 36276-36383 36385-36393 36395-36401 36404-36405 36408-36415 36417-36422 36424 36426-36433 36435-36441 36443 36445-36459 36463-36473 36476-36481 36485 36487 36489-36502 36505-36508 36510-36537 36540-36556 36558-36561 36564-36567 36569-36576 36578-36625 36627 36629-36636 36638-36657 36662 36665-36666 36668-36671 36673-36686 36688-36695 36697 36701-36706 36708-36714 36721-36734 36741-36747 36753-36757 36759-36761 36763-36780 36782-36783 36785-36812 36814 36816 36818-36821 36824-36849 36851-36853 36855-36865 36869 36871 36873 36875-36876 36880 36882 36884-36885 36887-36888 36890 36893 36896-36901 36903-36904 36906-36919 36923 36927 36930 36932 36936-36949 36952 36954-37040 37042-37055 37057-37062 37064-37229 37231-37251 37254-37286 37288-37294 37296-37299 37301-37304 37306-37310 37312-37321 37323-37324 37327-37336 37338-37339 37341-37364 37369 37371 37376 37378 37380-37385 37387-37401 37406-37412 37414-37430 37433-37434 37437-37438 37440-37457 37459-37462 37465 37467-37482 37484-37490 37493-37525 37527-37531 37533-37541 37543-37553 37555-37588 37592-37626 37629-37637 37639-37640 37643-37657 37663-37664 37668-37681 37683 37685-37712 37714-37719 37721 -37723 37725 37728-37730 37732-37742 37745-37753 37757-37759 37761-37766 37768-37798 37800-37822 37824-37826 37828 37830-37831 37833-37836 37838-37840 37842-37843 37846-37852 37856-37891 37893 37897 37899-37912 37918-37925 37927-37928 37931-37932 37935-37940 37942-37963 37965 37968-37974 37977-37980 37984-37993 37995 37998-38004 38007 38009-38011 38015-38016 38019 38021-38025 38029-38067 38071-38076 38079-38080 38083-38089 38092 38094 38096-38102 38104-38107 38109-38110 38113-38114 38117 38120-38127 38129-38130 38132-38139 38143-38150 38152-38154 38156-38157 38159 38161-38162 38164-38168 38172-38176 38178-38181 38183-38237 38239 38242-38256 38258 38260-38261 38263-38265 38267-38275 38278 38281-38295 38297-38302 38307-38319 38321-38342 38345 38351 38353-38377 38381-38382 38384-38388 38390 38392 38394-38401 38403-38408 38410-38426 38428-38434 38436-38444 38450 38452-38456 38458-38460 38462-38465 38468-38470 38473-38493 38496-38497 38499-38526 38528-38529 38532-38561 38563-38572 38575-38580 38582-38583 38585-38619 38621-38691 38693-38694 38697-38753 38755-38765 38767-38783 38787-38793 38796-38805 38810 38813-38814 38817 38819-38836 38839 38841-38843 38846-38855 38857-38874 38876-38878 38880-38889 38891-38893 38895-38898 38900 38902 38905-38909 38911-38920 38922-38924 38927-38956 38958 38967 38969 38971-38975 38977-38983 38987-38991 38994-39001 39003-39004 39007-39008 39011 39013 39017-39027 39029-39037 39039-39046 39048-39056 39058-39060 39063-39065 39067-39069 39071-39073 39075 39077 39081-39082 39086-39087 39090 39092-39102 39104-39124 39126-39139 39143-39148 39150-39166 39168-39174 39177-39189 39191-39199 39203-39208 39211 39213-39214 39216-39221 39223-39224 39227-39228 39231-39244 39246-39250 39252-39258 39262 39264-39266 39269-39273 39277-39290 39292 39294-39298 39300-39302 39305-39310 39315-39359 39361-39367 39369-39377 39380-39385 39389-39393 39395-39413 39415-39418 39421-39437 39439 39442-39449 39452-39460 39462-39463 39465-39493 39496-39539 39541-39562 39567-39573 39577-39580 39583-39654 39656-39689 39692-39754 39757-39766 39768-39797 39799-39811 39813 39815-39825 39828-39844 39846-39848 39850-39855 39857 39859-39866 39868-39909 39911-39921 39923-39934 39937-39939 39941 39943-39945 39947-39956 39958-39966 39968-39969 39972-39973 39978 39985 39987-39989 39992-39995 39997-39998 40002-40004 40006-40008 40012-40019 40021-40022 40024 40026-40039 40041-40046 40049-40066 40068-40079 40083-40092 40094-40119 40121-40128 40131-40144 40149-40162 40164-40169 40171-40176 40178-40191 40193-40201 40203-40205 40207-40208 40213 40215-40224 40226-40232 40234-40237 40239-40250 40253-40280 40282-40297 40301-40304 40306-40308 40310-40315 40318-40319 40322-40326 40328-40332 40334-40340 40342-40352 40354-40356 40358-40366 40368 40370-40384 40386 40393-40406 40408-40413 40415-40427 40431-40503 40505-40514 40516-40520 40524-40543 40545-40547 40549-40562 40564-40565 40568-40581 40584-40602 40605-40613 40620-40637 40639-40662 40664-40712 40714-40722 40724-40726 40728-40731 40735-40741 40743-40784 40786-40793 40796-40803 40805-40806 40808-40815 40817-40838 40841-40858 40861-40871 40875-40886 40888-40895 40897-40912 40914-40917 40919-40941 40943-40951 40954-40965 40967-40987 40989-41004 41008-41009 41011-41015 41017-41030 41033-41042 41044-41046 41048-41051 41053-41056 41062-41077 41079 41083-41088 41091-41094 41096-41105 41109-41144 41146-41152 41154-41156 41158 41161-41165 41169-41177 41179-41195 41199-41216 41218-41263 41265-41288 41290-41298 41300-41304 41306 41308-41310 41314-41317 41319-41325 41330 41333-41335 41339-41362 41364-41377 41386-41388 41390-41411 41414-41430 41432-41434 41437 41439-41440 41443-41453 41455-41456 41459 41461 41464 41466-41468 41470-41472 41475-41488 41491 41493-41495 41497-41502 41504-41507 41512-41514 41516 41519-41522 41524-41525 41527-41529 41532-41533 41536-41541 41543-41546 41548-41550 41556 41558-41565 41569 41571-41577 41580 41582 41584 41586-41592 41594-41596 41598-41600 41602 41606 41608 41610-41621 41627-41644 41652-41659 41661-41731 41733-41745 41747-41761 41763-41808 41812-41836 41838-41852 41854-41925 41927-41929 41931-41932 41934-42079 42081-42109 42111-42123 42125-42136 42140-42147 42149-42180 42182 42185-42228 42230-42256 42258-42264 42266-42267 42272-42305 42307-42391 42393-42420 42422-42425 42427 42429-42435 42438-42458 42460 42462-42484 42486 42488-42512 42514-42516 42518-42526 42528-42541 42544-42585 42587-42620 42622-42624 42626-42652 42654-42655 42657-42663 42665-42668 42670-42682 42685-42707 42709-42710 42712-42717 42719-42721 42724 42726-42730 42732 42734-42739 42741-42744 42746-42752 42754-42900 42902-42910 42912-42915 42918-42926 42928-42944 42946-42959 42961-42978 42981-42983 42985-42987 42989-42990 42992-43006 43008-43011 43013-43016 43018-43024 43027 43029-43048 43050-43056 43058-43075 43077-43092 43097-43124 43126-43175 43177 43179-43180 43182-43184 43186-43219 43223 43225-43277 43280 43282-43325 43327-43340 43342-43465 43467-43470 43473-43483 43485-43487 43490-43494 43498-43500 43502-43504 43506-43510 43512-43516 43518-43521 43524-43526 43528-43529 43531-43540 43542-43543 43545 43548-43549 43552-43553 43555-43562 43565-43566 43570-43581 43587-43599 43602-43609 43612-43616 43618-43622 43625-43628 43636-43637 43639-43642 43644 43646-43649 43651 43653-43659 43662-43664 43669-43670 43672-43736 43738-43742 43746-43757 43760-43765 43767 43769-43772 43776-43781 43784-43795 43798-43827 43830-43840 43842-43850 43852-43861 43863-43865 43868-43897 43899-43900 43902-43906 43908-43913 43916-43930 43933-43953 43955-43957 43959 43962-43975 43978-43983 43985-43994 43996-43999 44001 44003-44009 44011 44013 44016-44023 44025-44027 44029-44035 44037-44042 44044 44046-44047 44049-44063 44065-44092 44094-44105 44107-44108 44110 44114-44123 44125-44138 44142 44145-44146 44148-44151 44153-44162 44164-44168 44170-44174 44176-44192 44194-44197 44199 44202-44204 44206-44218 44220-44246 44249-44256 44258-44281 44284-44287 44289 44291-44298 44300 44302 44304-44310 44312-44318 44321-44324 44327-44345 44347-44348 44350-44355 44357 44359-44373 44375-44381 44383-44389 44391-44403 44405 44408-44420 44422-44454 44456-44460 44462 44464-44477 44479-44483 44485-44487 44490-44521 44523-44527 44529-44541 44546-44558 44560-44562 44564-44571 44573-44574 44576-44601 44603-44608 44610-44611 44613-44618 44621-44632 44635-44641 44643-44644 44646-44656 44658-44668 44671-44673 44676-44696 44699-44707 44710-44711 44714-44715 44719-44725 44727-44737 44741-44744 44747-44767 44769-44780 44782-44785 44788-44790 44792-44804 44807-44814 44817-44870 44872-44923 44925-44936 44939-44941 44945-44946 44950 44952-44958 44961-44963 44965-44967 44969-44975 44977-44988 44991-45004 45006-45026 45032-45034 45036-45059 45061-45062 45065-45074 45076-45091 45093-45094 45096-45112 45115-45138 45140-45154 45156 45161 45165-45166 45169 45174 45179 45181 45183-45202 45204-45205 45207-45208 45210 45214-45217 45219-45221 45225 45227-45234 45236-45243 45245 45249 45251-45254 45257 45259-45264 45266-45268 45271 45273 45275-45277 45279 45281-45285 45287-45290 45292 45296-45301 45303 45306-45311 45313 45315-45331 45335-45336 45338-45344 45347 45350-45352 45354-45355 45358-45363 45365-45366 45369 45372-45384 45386-45390 45392-45404 45406-45408 45410-45422 45425-45430 45432-45478 45480 45483-45510 45512 45515-45533 45535-45538 45544-45545 45547-45559 45561-45563 45567-45577 45579-45583 45586-45610 45612-45624 45629-45683 45686-45707 45709-45732 45734-45743 45745-45749 45752-45787 45789-45792 45796-45797 45799-45822 45825-45914 45916-45918 45920-46083 46086-46094 46096-46100 46102-46115 46118-46122 46125-46133 46135 46137-46143 46145-46149 46151-46163 46165-46172 46174-46181 46183-46198 46200-46205 46207-46210 46215-46218 46221-46246 46249-46307 46311-46319 46321-46337 46340-46342 46344-46346 46349 46351-46366 46368-46388 46392-46393 46401-46403 46406-46414 46416-46424 46428-46443 46445-46456 46458-46464 46466-46474 46476-46508 46512-46516 46518-46575 46577-46652 46656-46664 46666-46854 46856-46879 46883-46896 46898-46906 46908-46925 46927-46943 46945-46955 46957-46976 46978-46984 46987-46994 46996-47003 47007-47019 47022-47049 47052-47053 47055-47062 47064-47078 47080 47087- 47318 47320-47321 47323-47338 47340-47352 47355-47376 47378-47399 47401-47421 47423-47452 47454-47571 47573-47590 47592-47593 47597-47600 47603 47605-47608 47610-47611 47613-47617 47620-47624 47626-47629 47631-47653 47657-47663 47666-47693 47695-47703 47705 47707-47718 47720 47724 47726-47729 47732-47754 47758-47761 47763-47766 47768-47779 47781-47783 47785-47791 47793-47814 47818-47822 47824-47850 47852 47854 47856-47869 47872-47892 47895-47947 47949-48000 48002-48050 48052-48055 48057 48060-48071 48074-48079 48083-48093 48096-48102 48104-48126 48128-48173 48175-48181 48185 48187-48188 48191-48198 48201-48204 48206-48262 48264-48299 48301-48335 48338-48373 48376-48403 48406-48407 48409-48425 48429-48557 48562-48574 48576 48579-48722 48725-48806 48809-48817 48819-48824 48828-48841 48844-48885 48887-48900 48902-48958 48960-48962 48964-48981 48983 48985-48991 48994-48995 48998-49019 49022-49067 49069 49071-49081 49083-49123 49126-49129 49131-49134 49137-49142 49144-49147 49149-49152 49154-49192 49194-49216 49218-49219 49224-49229 49231-49249 49251-49254 49257-49261 49266-49274 49276-49293 49295-49300 49302-49311 49313-49324 49326-49396 49398-49399 49401-49407 49409-49430 49432-49436 49438-49455 49457-49498 49500-49507 49509-49516 49518-49549 49551-49556 49562-49565 49568 49576-49594 49596-49622 49626-49633 49635-49637 49639-49652 49654-49657 49659-49691 49695-49710 49712-49743 49746 49748-49752 49754 49759-49871 49873-49935 49937-49939 49943-49944 49946 49948-49962 49964-49980 49982-49985 49987-49989 49992-49993 49997-50018 50020-50029 50032-50038 50040-50048 50051-50188 50190-50219 50221-50325 50327-50344 50346-50403 50405-50442 50444-50448 50450-50455 50457-50459 50462 50464-50466 50470-50473 50475-50481 50484-50498 50500-50502 50504 50506 50508 50510 50512-50524 50526-50527 50529-50559 50561-50587 50589-50676 50678-50689 50692-50693 50696-50702 50705 50708-50716 50719-50815 50817-50821 50823-50842 50845 50847 50849-50853 50855-50856 50858-50863 50865-50868 50870-50916 50918-50935 50937-50946 50948-50949 50954-50956 50958-50963 50965 50967-50989 50991-51015 51017-51028 51031 51035-51037 51039-51044 51046-51109 51111-51157 51159-51177 51180-51187 51190-51195 51197 51199 51204-51216 51219-51225 51227 51230-51235 51238-51268 51270-51285 51289-51295 51297-51327 51329-51406 51409-51412 51414-51417 51419-51424 51426-51441 51444-51450 51453-51456 51458 51460-51545 51547-51559 51562-51564 51567-51570 51572 51575-51584 51586 51588-51604 51606-51610 51612-51648 51650-51651 51653-51660 51662-51666 51668-51679 51683-51684 51687 51689-51694 51696 51699 51702 51706-51714 51716-51718 51720-51736 51739-51742 51744 51749 51752-51754 51758-51759 51761-51763 51765-51766 51769-51770 51773 51775-51798 51800 51802-51812 51817-51818 51821-51841 51843-51857 51861-51863 51865-51880 51882-51895 51897 51899-51918 51920-51928 51930-51931 51933-51935 51940 51944-51945 51948-51952 51955-51956 51958-51970 51972-51983 51986-51987 51989-51992 51994-52002 52004 52008-52027 52029-52030 52032-52043 52045-52048 52050-52053 52055-52058 52060-52064 52066-52069 52071-52076 52080-52098 52101-52118 52121-52136 52139-52158 52160-52166 52168-52209 52211-52218 52220-52243 52245-52275 52277-52285 52291-52293 52297-52323 52327-52330 52333-52334 52336-52337 52345-52346 52352-52358 52360-52365 52369-52372 52375-52377 52380-52382 52385-52394 52396-52421 52423-52454 52457-52477 52484 52487 52490-52513 52515-52517 52521-52522 52525 52528-52532 52534 52538 52540-52542 52544-52550 52553-52599 52602-52613 52615-52617 52619-52631 52633-52638 52640-52644 52646 52648-52658 52660-52663 52665-52668 52670-52680 52682-52689 52691-52697 52699-52702 52704-52708 52710-52751 52753-52755 52757-52758 52760-52790 52792-52794 52796-52807 52810-52826 52828-52835 52837-52840 52842-52849 52852 52856-52884 52886-52889 52891 52893-52898 52902-52942 52944-52945 52947 52949-52955 52957-52975 52977-52997 52999-53160 53162-53177 53179-53190 53192-53197 53200-53214 53216-53221 53223-53236 53238-53253 53255-53266 53269-53271 53273-53277 53279-53282 53284-53347 53349-53379 53381-53389 53391-53402 53405-53434 53436-53441 53443-53451 53453-53459 53463-53464 53467-53475 53477-53512 53515-53535 53537-53538 53541-53627 53629-53651 53653-53662 53664-53671 53673-53682 53684-53690 53692-53694 53698-53700 53702-53703 53705 53708-53724 53726-53733 53735-53736 53738-53739 53741-53774 53776-53795 53797-53799 53801-53805 53807-53810 53814-53833 53835-53845 53848-53854 53856-53864 53867-53873 53875-53877 53880 53884-53891 53893-53901 53903-53915 53917-53943 53946-53964 53969-53972 53976-53983 53985-53986 53988-54015 54017-54018 54020-54026 54031-54059 54061-54062 54064-54065 54067-54073 54075-54091 54093-54094 54096-54100 54102-54149 54151-54175 54177 54179-54206 54208-54219 54221 54224-54238 54240-54248 54250-54277 54280-54282 54287-54296 54298-54302 54304-54318 54321-54327 54330 54332-54334 54336-54362 54364-54365 54369-54373 54375-54376 54378-54400 54402-54414 54416 54418-54433 54435-54521 54523-54542 54549 54551-54571 54574-54575 54577-54578 54581-54588 54590-54596 54599-54600 54602-54609 54611-54612 54614-54615 54617-54624 54627-54629 54632-54665 54667 54669-54688 54690-54713 54715-54868 54871-55220 55222-55293 55295-55296 55299-55303 55305 55308-55350 55353-55405 55407-55458 55461-55462 55464-55475 55477-55738 55740-55745 55747-55809 55811-55827 55830-55834 55836-55865 55867-55871 55873-55890 55892-55943 55946-55990 55992-56029 56032 56034-56052 56055-56061 56063-56103 56105-56112 56114-56118 56120-56144 56146-56187 56189-56190 56192-56200 56202-56207 56210-56243 56245-56296 56298-56300 56302-56310 56313-56316 56319-56322 56324-56326 56328-56338 56340-56350 56353-56359 56361 56363-56367 56370 56373-56387 56390-56395 56397-56412 56414-56416 56418-56438 56441-56448 56452-56470 56473-56479 56481-56485 56487-56507 56509 56511-56545 56547-56555 56557-56563 56565 56567-56616 56622-56687 56690 56693-56698 56700 56702-56705 56707-56712 56718 56720-56725 56729-56730 56735-56764 56766-56777 56779-56803 56806-56814 56819-56825 56827-56834 56836-56846 56849-56853 56855 56857-56858 56860-56866 56868-56869 56871-56875 56878-56894 56896-56907 56909-56913 56916-56918 56922-56923 56925 56927-56942 56944-56958 56962-56984 56989-57027 57029-57055 57058-57060 57062-57065 57067-57069 57072 57074-57081 57085-57095 57097-57099 57101-57104 57106-57119 57121 57123-57124 57126-57135 57139-57144 57146-57147 57149-57152 57155-57158 57160-57171 57173-57176 57178-57182 57185-57197 57200-57205 57207-57249 57252-57253 57256-57264 57267-57269 57271-57274 57276-57278 57280-57293 57295-57298 57300-57382 57384 57386-57450 57453 57455-57506 57508-57540 57542-57591 57593-57602 57605-57612 57614-57630 57632-57636 57638-57648 57650-57654 57657-57668 57670-57680 57682-57685 57687-57700 57703-57706 57708-57709 57712-57716 57718-57725 57727-57735 57737-57772 57774-57775 57778-57788 57790-57797 57799 57802-57809 57815-57825 57827-57829 57831-57868 57870-57903 57905-57912 57914 57916 57919-57929 57931 57933 57938-57949 57951-57954 57956-57971 57973-57981 57983-57985 57987-57988 57992-58024 58026-58034 58036-58039 58041 58043-58044 58046-58048 58050 58052 58054-58057 58059-58070 58073-58082 58084-58085 58087-58104 58106-58114 58116-58119 58121-58159 58163-58220 58223-58487 58489-58516 58519-58544 58546-58551 58553-58565 58567-58569 58572-58583 58585-58837 58839 58841-58855 58857-58860 58863-58874 58877-58893 58895-58909 58915-58931 58934-58964 58966 58968-58969 58971-58998 59000-59092 59097-59109 59111-59115 59118-59122 59124 59126-59128 59131 59133-59136 59138-59139 59141-59145 59147-59190 59192-59230 59232-59238 59240 59243-59249 59253-59254 59256-59733 59735-59756 59758-59948 59950-59967 59969-59970 59972-60028 60030-60035 60037-60048 60051-60055 60057-60074 60076-60079 60081-60099 60101 60103 60105-60110 60112-60126 60128-60140 60142-60145 60149-60151 60154-60161 60164-60168 60170-60178 60180-60182 60185-60191 60193-60196 60198-60199 60201-60202 60204 60207-60208 60210-60212 60214 60217-60220 60223-60224 60226-60250 60252-60260 60262-60284 60286-60308 60310-60313 60315-60329 60331-60345 60347-60351 60354-60367 60369 60371-60424 60427-60428 60430 60432 60434-60458 6 0460-60482 60484-60490 60492-60504 60506 60508-60509 60516-60517 60519-60532 60534 60536-60540 60542-60547 60549-60554 60556-60606 60608-60614 60616-60643 60645-60652 60654-60658 60661-60663 60666-60673 60675-60687 60689-60693 60695-61019 61021-61045 61048-61075 61077 61079-61087 On Wed, 19 Oct 2016 13:26:33 +0000 "R. David Murray" wrote: > R. David Murray added the comment: > > I meant 'nmh'. Also, if the problem is that mailbox blows up on an .mh_sequences file with bad records and doesn't provide any way to access the valid records (like nmh mostly manages to do), then that is something that could be fixed, and we can reopen the issue. > > ---------- > versions: +Python 3.6, Python 3.7 -Python 3.5 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 12:41:24 2016 From: report at bugs.python.org (Garrett Nievin) Date: Sat, 29 Oct 2016 16:41:24 +0000 Subject: [issue28473] mailbox.MH crashes on certain Claws Mail .mh_sequences files In-Reply-To: <1476830366.57.0.390859510096.issue28473@psf.upfronthosting.co.za> Message-ID: <20161029124020.2c08c3e7@hal> Garrett Nievin added the comment: Interestingly, mailutils mh (GNU Mailutils 2.99.99, Ubuntu 16.10) doesn't have a problem with these files, so I'm using that instead of nmh. I assume this is relevant: http://www.nongnu.org/nmh/diff.html The limitation on the length of lines in the file containing your public sequences (.mh_sequences) has been removed. That should be the end of the error message ".mh_sequences is poorly formatted". That's the message I got with nmh, but not with mailutils mh. Cheers, Garrett On Wed, 19 Oct 2016 13:26:33 +0000 "R. David Murray" wrote: > R. David Murray added the comment: > > I meant 'nmh'. Also, if the problem is that mailbox blows up on an .mh_sequences file with bad records and doesn't provide any way to access the valid records (like nmh mostly manages to do), then that is something that could be fixed, and we can reopen the issue. > > ---------- > versions: +Python 3.6, Python 3.7 -Python 3.5 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 13:07:25 2016 From: report at bugs.python.org (David Szotten) Date: Sat, 29 Oct 2016 17:07:25 +0000 Subject: [issue28557] error message for bad raw readinto Message-ID: <1477760845.01.0.230790209004.issue28557@psf.upfronthosting.co.za> New submission from David Szotten: Was just tracking down a bug in eventlet, which manifested as "OSError: raw readinto() returned invalid length -1 (should have been between 0 and 8192)" I was misled for a while by the fact that readinto was in fact returning b'', not -1. This improves the error message in that case by including the TypeError from the failed conversion of b'' to an int. Would prefer to still return an OSError with the TypeError as a cause, but couldn't figure out how to do that. Hints/help would be appreciated. ---------- components: IO files: readinto_error.patch keywords: patch messages: 279685 nosy: davidszotten priority: normal severity: normal status: open title: error message for bad raw readinto versions: Python 3.7 Added file: http://bugs.python.org/file45265/readinto_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 13:21:51 2016 From: report at bugs.python.org (Chris) Date: Sat, 29 Oct 2016 17:21:51 +0000 Subject: [issue28558] argparse Incorrect Handling of Store Actions Message-ID: <1477761711.09.0.834244461105.issue28558@psf.upfronthosting.co.za> New submission from Chris: argparse does not handle Store actions correctly when "nargs = 1" is provided. The documentation indicates the value should be assigned to the dest, but instead a list with the value as the only item is assigned to dest. ---------- files: test_argparse.py messages: 279686 nosy: Flux priority: normal severity: normal status: open title: argparse Incorrect Handling of Store Actions type: behavior versions: Python 2.7, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file45266/test_argparse.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 13:29:05 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 29 Oct 2016 17:29:05 +0000 Subject: [issue28558] argparse Incorrect Handling of Store Actions In-Reply-To: <1477761711.09.0.834244461105.issue28558@psf.upfronthosting.co.za> Message-ID: <1477762145.03.0.148324242625.issue28558@psf.upfronthosting.co.za> Xiang Zhang added the comment: This is the expected behaviour. The doc explicitly says "Note that nargs=1 produces a list of one item. This is different from the default, in which the item is produced by itself". Read https://docs.python.org/3/library/argparse.html#nargs. ---------- nosy: +xiang.zhang resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 13:29:24 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 29 Oct 2016 17:29:24 +0000 Subject: [issue28558] argparse Incorrect Handling of Store Actions In-Reply-To: <1477761711.09.0.834244461105.issue28558@psf.upfronthosting.co.za> Message-ID: <1477762164.43.0.670951755115.issue28558@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 13:52:40 2016 From: report at bugs.python.org (Jeremy Kloth) Date: Sat, 29 Oct 2016 17:52:40 +0000 Subject: [issue28554] Windows: _socket module fails to compile on "AMD64 Windows7 SP1 3.x" buildbot "because "AlwaysCreate" was specified" In-Reply-To: <1477725231.13.0.640835129837.issue28554@psf.upfronthosting.co.za> Message-ID: <1477763560.54.0.120226692033.issue28554@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Steve's guess wrt the _pth file being the cause was spot on. The buildbot is back on track with successful results. ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 14:16:31 2016 From: report at bugs.python.org (Dimitri Merejkowsky) Date: Sat, 29 Oct 2016 18:16:31 +0000 Subject: [issue28559] Unclear error message when raising wrong type of exceptions Message-ID: <1477764991.61.0.67228056749.issue28559@psf.upfronthosting.co.za> New submission from Dimitri Merejkowsky: Motivation for the patch came from a tweet[1] of David Beazley: def SomeError(Exception): pass raise SomeError('blah') (Note the `def` keyword instead of `class`): If you run that, you get: > TypeError: exceptions must derive from BaseException Which is not very helpful. Attached patch changes the error message to be: > TypeError: exceptions must derive from BaseException, got NoneType (By the way, it's very close to what Python2 used to say in this case) ---------- components: Interpreter Core files: 0001-Fix-error-message-when-raising-with-the-wrong-type.patch keywords: patch messages: 279689 nosy: Dimitri Merejkowsky priority: normal severity: normal status: open title: Unclear error message when raising wrong type of exceptions type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file45267/0001-Fix-error-message-when-raising-with-the-wrong-type.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 14:18:23 2016 From: report at bugs.python.org (Big Stone) Date: Sat, 29 Oct 2016 18:18:23 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477765103.85.0.990484264994.issue28522@psf.upfronthosting.co.za> Big Stone added the comment: thank you all for the patch IDLEX was a requirement for a french examination. I think the reason was to see the line numbers on the left of the editor. For sure since IDLEX birth, IDLE has made some progress and IDLEX is becoming irrelevant, but this lovely tiny feature seems still missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 14:29:03 2016 From: report at bugs.python.org (Big Stone) Date: Sat, 29 Oct 2016 18:29:03 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477765743.42.0.0767777828942.issue28522@psf.upfronthosting.co.za> Big Stone added the comment: the "show line number on the left" feature is on the "github web editor", on "atom", and on "spyder" and "erik" python IDE, so rather the expected standard for python editing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 14:38:44 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Oct 2016 18:38:44 +0000 Subject: [issue28552] Distutils fail if sys.executable is None In-Reply-To: <1477692785.38.0.0178074609676.issue28552@psf.upfronthosting.co.za> Message-ID: <1477766324.98.0.198677581679.issue28552@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, you are right; I was thinking that distutils and/or pip re-executed python for certain tasks, but upon reflection I don't think they do. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 14:47:04 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Oct 2016 18:47:04 +0000 Subject: [issue28473] mailbox.MH crashes on certain Claws Mail .mh_sequences files In-Reply-To: <1476830366.57.0.390859510096.issue28473@psf.upfronthosting.co.za> Message-ID: <1477766824.2.0.76888784842.issue28473@psf.upfronthosting.co.za> R. David Murray added the comment: OK. There is definitely something that could be done here if someone wants to tackle it. At a minimum, read the lines that we can read and produce a warning of some sort for the ones we can't. If more than one other mh style programming is allowing this variant syntax, we could also choose to support it. I'm going to reclassify this as an enhancement because it appears to be support for "new" formatting, but I'm not adverse to considering it a bug. ---------- resolution: third party -> stage: resolved -> status: closed -> open type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 14:54:56 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 29 Oct 2016 18:54:56 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1477767296.68.0.206594460302.issue28556@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 14:58:08 2016 From: report at bugs.python.org (Donald Stufft) Date: Sat, 29 Oct 2016 18:58:08 +0000 Subject: [issue28552] Distutils fail if sys.executable is None In-Reply-To: <1477766324.98.0.198677581679.issue28552@psf.upfronthosting.co.za> Message-ID: <55E46FF9-BB45-48FB-80F3-77280F505E2B@stufft.io> Donald Stufft added the comment: We re-execute Python to run setup.py. Even from wheels we do it to compile pyc files. Sent from my iPhone > On Oct 29, 2016, at 2:38 PM, R. David Murray wrote: > > > R. David Murray added the comment: > > Yes, you are right; I was thinking that distutils and/or pip re-executed python for certain tasks, but upon reflection I don't think they do. > > ---------- > stage: -> needs patch > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 15:29:44 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 29 Oct 2016 19:29:44 +0000 Subject: [issue28542] document cross compilation In-Reply-To: <1477563460.46.0.569265292251.issue28542@psf.upfronthosting.co.za> Message-ID: <1477769384.81.0.33162247581.issue28542@psf.upfronthosting.co.za> Xavier de Gaye added the comment: I have changed my Android build system to use DESTDIR, it is simpler than using 'mount --bind'. Thanks for the suggestion Martin. Here is a new patch adding some text for the Android cross compilation. ---------- Added file: http://bugs.python.org/file45268/readme_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 15:45:09 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Oct 2016 19:45:09 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <20161029194506.25435.66355.B59CED91@psf.io> Roundup Robot added the comment: New changeset 94010653379c by Guido van Rossum in branch '3.5': Issue #28556: updates to typing.py (fix copy, deepcopy, pickle) https://hg.python.org/cpython/rev/94010653379c New changeset 465b345559ea by Guido van Rossum in branch '3.6': Issue #28556: updates to typing.py (fix copy, deepcopy, pickle) (3.5->3.6) https://hg.python.org/cpython/rev/465b345559ea New changeset f23f435494f1 by Guido van Rossum in branch 'default': Issue #28556: updates to typing.py (fix copy, deepcopy, pickle) (3.6->3.7) https://hg.python.org/cpython/rev/f23f435494f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 16:31:21 2016 From: report at bugs.python.org (Eric Appelt) Date: Sat, 29 Oct 2016 20:31:21 +0000 Subject: [issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet) In-Reply-To: <1453293464.25.0.570690037157.issue26163@psf.upfronthosting.co.za> Message-ID: <1477773081.16.0.311970967348.issue26163@psf.upfronthosting.co.za> Eric Appelt added the comment: I dug into this failure a little bit and verified that it is specifically the "letter_range" portion of the test that sporadically fails. The hash of any frozenset constructed from floats, ints, or the empty frozenset, as well as frozensets recursively containing any of the previous have deterministic hashes that don't vary with the seed. I isolated the letter_range test for various values of n to see how often this failure generally happened. I scanned the first 10000 integers set to PYTHONHASHSEED and got the following failures: n=2 - n=3 - n=4 300, 1308, 2453, 4196, 5693, 8280, 8353 n=5 4846, 5693 n=6 3974 n=7 36, 1722, 5064, 8562, 8729 n=8 2889, 5916, 5986 n=9 - n=10 - I checked to see the behavior of psuedorandom integers in the range 0 to 2**64-1 by making a large sample of values taken from "len({random.randint(0,2**64) & 127 for _ in range(128)})", and found that the value of "u" in the test for n=7 if the hashes really are effectively randomly distributed follows a gaussian distribution with a mean of ~81 and deviation of ~3.5. So a value of 31 would be nearly 14 deviations from the mean which seems quite unreasonable. I then took the distribution of the set sizes from the letter_range test for n=7 with 10,000 different seeds and plotted it alongside the distribution of set sizes from the last 7 bits of pseudorandom numbers in the attached file "frozenset_string_n7_10k.png". The hashes of the frozensets of single letters follows a very different distribution. Either this test is inappropriate and will cause sporadic build failures, or there is a problem with the hash algorithm. ---------- nosy: +Eric Appelt Added file: http://bugs.python.org/file45269/frozenset_string_n7_10k.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 16:37:24 2016 From: report at bugs.python.org (Eric Appelt) Date: Sat, 29 Oct 2016 20:37:24 +0000 Subject: [issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet) In-Reply-To: <1453293464.25.0.570690037157.issue26163@psf.upfronthosting.co.za> Message-ID: <1477773444.32.0.12718368839.issue26163@psf.upfronthosting.co.za> Eric Appelt added the comment: I also looked at hashes of strings themselves rather than frozensets to check the hashing of strings directly. For example, n=3: ['', 'a', 'b', 'c', 'ab', 'ac', 'bc', 'abc'] rather than: [frozenset(), frozenset({'a'}), frozenset({'b'}), frozenset({'c'}), frozenset({'b', 'a'}), frozenset({'c', 'a'}), frozenset({'b', 'c'}), frozenset({'b', 'a', 'c'})] I made a distribution as with the last comment but now using the # of unique last-7 bit sequences in a set of 128 such strings (n=7) and compared to pseudorandom integers, just as was done before with frozensets of the letter combinations. This is shown in the file "str_string_n7_10k.png". The last 7-bits of the small string hashes produce a distribution much like regular pseudorandom integers. So if there is a problem with the hash algorithm, it appears to be related to the frozenset hashing and not strings. ---------- Added file: http://bugs.python.org/file45270/str_string_n7_10k.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 17:59:33 2016 From: report at bugs.python.org (Ram Rachum) Date: Sat, 29 Oct 2016 21:59:33 +0000 Subject: [issue28560] Implement `PurePath.startswith` and `PurePath.endswith` Message-ID: <1477778373.6.0.891058430621.issue28560@psf.upfronthosting.co.za> New submission from Ram Rachum: Today I had to check whether a path object started with `/foo`. The nicest way I could think of was `str(p).startswith('/foo')`. What do you think about implementing `p.startswith('/foo')`? ---------- components: Library (Lib) messages: 279699 nosy: cool-RR, pitrou priority: normal severity: normal status: open title: Implement `PurePath.startswith` and `PurePath.endswith` type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 19:06:12 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Oct 2016 23:06:12 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <20161029230609.31793.85139.B5EAB875@psf.io> Roundup Robot added the comment: New changeset 0201a87d773d by Guido van Rossum in branch '3.5': Issue #28556: updates to typing.py (add Coroutine, prohibit Generic[T]()) https://hg.python.org/cpython/rev/0201a87d773d New changeset 2c2fec17247d by Guido van Rossum in branch '3.6': Issue #28556: updates to typing.py (add Coroutine, prohibit Generic[T]()) (3.5->3.6) https://hg.python.org/cpython/rev/2c2fec17247d New changeset fe842efbe1ed by Guido van Rossum in branch 'default': Issue #28556: updates to typing.py (add Coroutine, prohibit Generic[T]()) (3.6->3.7) https://hg.python.org/cpython/rev/fe842efbe1ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 19:57:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Oct 2016 23:57:18 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <20161029235715.114791.70711.FFEEDB16@psf.io> Roundup Robot added the comment: New changeset 32bfc81111b6 by Raymond Hettinger in branch '3.6': Issue #18844: Make the various ways for specifing weights produce the same results. https://hg.python.org/cpython/rev/32bfc81111b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 20:43:15 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 00:43:15 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <20161030004309.114807.23076.446A1861@psf.io> Roundup Robot added the comment: New changeset 09a87b16d5e5 by Raymond Hettinger in branch '3.6': Issue #18844: Strengthen tests to include a case with unequal weighting https://hg.python.org/cpython/rev/09a87b16d5e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 22:57:03 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Oct 2016 02:57:03 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1477796223.59.0.486827366625.issue28522@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #17535 is about adding line numbers to IDLE editor. I have approved it in priciple, but not yet the proposed patch, or a revision thereof. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 01:16:49 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 30 Oct 2016 05:16:49 +0000 Subject: [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1477804609.97.0.49955483778.issue11681@psf.upfronthosting.co.za> Martin Panter added the comment: As well as the usage string, it is missing from the list of options in the main documentation at Doc/using/cmdline.rst. There are a couple of places (sys.rst and warnings.rst) that reference :option:`-b`, and newer versions of Sphinx complain about this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 01:21:34 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 30 Oct 2016 05:21:34 +0000 Subject: [issue28532] Show sys.version when -V option is supplied twice. In-Reply-To: <1477417861.44.0.42778795289.issue28532@psf.upfronthosting.co.za> Message-ID: <1477804894.37.0.513454915052.issue28532@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- keywords: +easy stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 01:25:53 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 30 Oct 2016 05:25:53 +0000 Subject: [issue28532] Show sys.version when -V option is supplied twice. In-Reply-To: <1477417861.44.0.42778795289.issue28532@psf.upfronthosting.co.za> Message-ID: <1477805153.86.0.945122399581.issue28532@psf.upfronthosting.co.za> St?phane Wirtel added the comment: " -V : print the Python version number and exit (also --version)\n\ + when given twice, print more information about build\n\ + can be supplied multiple times to show more information\n\" Why do you indicate "multiple times" because there are only 2 possibilites, -V or -VV, no more. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 01:29:21 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 30 Oct 2016 05:29:21 +0000 Subject: [issue28532] Show sys.version when -V option is supplied twice. In-Reply-To: <1477417861.44.0.42778795289.issue28532@psf.upfronthosting.co.za> Message-ID: <1477805361.05.0.71385881952.issue28532@psf.upfronthosting.co.za> INADA Naoki added the comment: Since I'm not good English writer, I copied & modified from -v option. -VVV is same to -VV, similar to -vvv is same to -vv. -v : verbose (trace import statements); also PYTHONVERBOSE=x can be supplied multiple times to increase verbosity ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 01:41:37 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 30 Oct 2016 05:41:37 +0000 Subject: [issue28532] Show sys.version when -V option is supplied twice. In-Reply-To: <1477417861.44.0.42778795289.issue28532@psf.upfronthosting.co.za> Message-ID: <1477806097.46.0.663182768112.issue28532@psf.upfronthosting.co.za> St?phane Wirtel added the comment: yep, but in this case, just add -VV will add more details about the current revision. About -VVV or -VV, yes, it's similar because the same C code version >= 2, Py_GetVersion() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 01:50:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 05:50:18 +0000 Subject: [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <20161030055015.17076.48477.FEAD6ABC@psf.io> Roundup Robot added the comment: New changeset 307d7568b6ae by Martin Panter in branch '3.5': Issue #26638: Mask undefined CLI options to defeat new Sphinx warnings https://hg.python.org/cpython/rev/307d7568b6ae New changeset 57f4ba6b29bf by Martin Panter in branch '3.5': Issue #26638: Work around more CLI options that can?t be linked https://hg.python.org/cpython/rev/57f4ba6b29bf New changeset a0d272fbc7de by Martin Panter in branch '3.6': Issue #26638: Merge option warning fixes from 3.5 into 3.6 https://hg.python.org/cpython/rev/a0d272fbc7de New changeset 85e2cfe5b12d by Martin Panter in branch 'default': Issue #26638: Merge option warning fixes from 3.6 https://hg.python.org/cpython/rev/85e2cfe5b12d New changeset c4b934a77a08 by Martin Panter in branch '2.7': Issue #26638: Disable inappropriate links to Python interpreter options https://hg.python.org/cpython/rev/c4b934a77a08 New changeset 0ff00d53d6a9 by Martin Panter in branch '2.7': Issue #26638: Mask undefined CLI options to defeat new Sphinx warnings https://hg.python.org/cpython/rev/0ff00d53d6a9 New changeset cf91d48aa353 by Martin Panter in branch '2.7': Issue #26638: Cannot directly link to main option from the ?timeit? module https://hg.python.org/cpython/rev/cf91d48aa353 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 01:52:35 2016 From: report at bugs.python.org (Mike Kaplinskiy) Date: Sun, 30 Oct 2016 05:52:35 +0000 Subject: [issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True) In-Reply-To: <1455835021.39.0.133039555561.issue26388@psf.upfronthosting.co.za> Message-ID: <1477806755.02.0.781206156162.issue26388@psf.upfronthosting.co.za> Mike Kaplinskiy added the comment: Hey Nick, Definitely agree that this refactor is big enough to try adding target modules. There's a somewhat hidden feature in the second patch that does this: `use_globals_from_sys_modules` takes `sys.globals` from the `sys.modules` entry for the module. It's a constructor arg though. It's only used by `_run_module_as_main`, but making it more official sounds good. Given that goal, I'm a bit worried about how to accurately describe the behavior of `runnable.globals`. Particularly, what's a good API? Here are a couple of options I'm thinking of: - `x = load_module(...); x.module = sys.modules['foo']; x.run()`. Pros: allows setting the module that's to be used for maximal customizability. Cons: `x.globals` is poorly defined in that scenario. What should it reflect AFTER calling `x.run()`? What should it be before/after setting `x.module`? Should it overwrite __file__, __loader__, etc in the target module? Should it restore the values? When should it do this? - `x = load_module(...); x.overwrite_sys_modules = True; x.run()` This is a version of the above that perhaps makes it a bit easier to document what happens to which globals when. - `x = load_module(..., target_module=sys.modules['foo']); x.run()` Pros: less ambiguity about globals. They're always either local or the module's. Cons: all other "customizations" can be set after load_module is called. This is very asymmetric from an API perspective. There's also some ambiguity about what happens to the __file__, __line__, etc. - `x = load_module(...); x.run(target_module=...);` This is pretty much the sum of the cons of the above and more. Mostly here for completeness. I'm leaning towards the second option for API symmetry. The largest hurdle is defining a behavior w.r.t. globals that is least surprising. Maybe something like - if set to True, the globals in the target will be overwritten (i.e. .update) with the globals in the runner when `run()` is called. If folks want to save/restore anything around globals in the target module, they are free to do so themselves before calling .run(). Separately, what needs this type of behavior, other than for backwards compatibility? Do you know of any specific use-case? It feels like almost everything should be covered by a combination of add_to_sys_modules (i.e. temporary modules in sys.modules) and inspecting runner.globals after execution. What do you think? Mike. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 02:04:34 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 30 Oct 2016 06:04:34 +0000 Subject: [issue28532] Show sys.version when -V option is supplied twice. In-Reply-To: <1477417861.44.0.42778795289.issue28532@psf.upfronthosting.co.za> Message-ID: <1477807474.4.0.949939247387.issue28532@psf.upfronthosting.co.za> Martin Panter added the comment: I left some review comments. Also (as a native English speaker), I think it is okay to drop the third line about ?multiple times?. You already say it may be given twice in the line above. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 02:34:21 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 30 Oct 2016 06:34:21 +0000 Subject: [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <1477809261.82.0.451548122352.issue26638@psf.upfronthosting.co.za> Martin Panter added the comment: For the ?unittest? module, I added separate text with a link: (see Warning control). Similarly for ?timeit? in 2.7. Now the only Sphinx warnings I get are a handful about syntax highlighting, and two genuine ones relating to the missing -b documentation (Issue 11681). ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 03:45:51 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 30 Oct 2016 07:45:51 +0000 Subject: [issue28561] Report surrogate characters range in utf8_encoder Message-ID: <1477813551.36.0.0620162768049.issue28561@psf.upfronthosting.co.za> New submission from Xiang Zhang: In utf8_encoder, when a codecs returns a string with non-ascii characters, it raises encodeerror but the start and end position are not perfect. This seems like an oversight during evolution. Before, utf8_encoder only recognize one surrogate character a time. After 2b5357b38366, it tries to recognize as much as possible a time. Patch also includes some cleanup. ---------- files: utf8_encoder.patch keywords: patch messages: 279712 nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Report surrogate characters range in utf8_encoder type: behavior Added file: http://bugs.python.org/file45271/utf8_encoder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 04:24:22 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 30 Oct 2016 08:24:22 +0000 Subject: [issue28532] Show sys.version when -V option is supplied twice. In-Reply-To: <1477417861.44.0.42778795289.issue28532@psf.upfronthosting.co.za> Message-ID: <1477815862.18.0.233515675166.issue28532@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: http://bugs.python.org/file45272/verbose-version2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 04:32:36 2016 From: report at bugs.python.org (SilentGhost) Date: Sun, 30 Oct 2016 08:32:36 +0000 Subject: [issue28560] Implement `PurePath.startswith` and `PurePath.endswith` In-Reply-To: <1477778373.6.0.891058430621.issue28560@psf.upfronthosting.co.za> Message-ID: <1477816356.1.0.78324864971.issue28560@psf.upfronthosting.co.za> SilentGhost added the comment: Do you mean that /foo was just an arbitrary string, rather than one of the parent directories? Because in that case it seems a perfectly correct way to go about comparison. If /foo was one of the parents, there are plenty of options: .parts, .parents, .relative_to. It seems like a fairly rare usecase to extend the api. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 04:43:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 08:43:27 +0000 Subject: [issue28561] Report surrogate characters range in utf8_encoder In-Reply-To: <1477813551.36.0.0620162768049.issue28561@psf.upfronthosting.co.za> Message-ID: <1477817007.52.0.412205215133.issue28561@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka components: +Interpreter Core versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 04:53:13 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 30 Oct 2016 08:53:13 +0000 Subject: [issue28532] Show sys.version when -V option is supplied twice. In-Reply-To: <1477417861.44.0.42778795289.issue28532@psf.upfronthosting.co.za> Message-ID: <1477817593.6.0.421456899457.issue28532@psf.upfronthosting.co.za> Martin Panter added the comment: Sorry, I should have said: the other two files (Misc/python.man and Modules/main.c) also need an extra ?the?, like you changed in Doc/using/cmdline.rst. Other than that, it looks okay to me. But I guess you could add a quick test case in Lib/test/test_cmd_line.py. There?s already one for single -V and --version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 04:55:48 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 30 Oct 2016 08:55:48 +0000 Subject: [issue28561] Report surrogate characters range in utf8_encoder In-Reply-To: <1477813551.36.0.0620162768049.issue28561@psf.upfronthosting.co.za> Message-ID: <1477817748.61.0.61559336074.issue28561@psf.upfronthosting.co.za> Changes by Xiang Zhang : Added file: http://bugs.python.org/file45273/utf8_encoder_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 05:40:56 2016 From: report at bugs.python.org (Aristotel) Date: Sun, 30 Oct 2016 09:40:56 +0000 Subject: [issue28259] Ctypes bug windows In-Reply-To: <1474647946.24.0.533944480109.issue28259@psf.upfronthosting.co.za> Message-ID: <1477820456.53.0.347175675084.issue28259@psf.upfronthosting.co.za> Aristotel added the comment: Any update on this? It blocks development of my project. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 05:48:36 2016 From: report at bugs.python.org (Ram Rachum) Date: Sun, 30 Oct 2016 09:48:36 +0000 Subject: [issue28560] Implement `PurePath.startswith` and `PurePath.endswith` In-Reply-To: <1477778373.6.0.891058430621.issue28560@psf.upfronthosting.co.za> Message-ID: <1477820916.84.0.00324535781652.issue28560@psf.upfronthosting.co.za> Ram Rachum added the comment: I mean that `/foo` is one of the parent directories. "there are plenty of options ..." Can you please spell them out precisely? The full line of code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 05:54:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 09:54:39 +0000 Subject: [issue28387] double free in io.TextIOWrapper In-Reply-To: <1475868777.61.0.59647562301.issue28387@psf.upfronthosting.co.za> Message-ID: <1477821279.72.0.419544707205.issue28387@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report and patch Sebastian. In Python 3 the solution can be simpler, just move the line "_PyObject_GC_UNTRACK(self);" above the line "textiowrapper_clear(self);". But calling PyObject_ClearWeakRefs() also should be moved up. Otherwise half-destroyed TextIOWrapper instance can be accessed via weak references. Following patches do this (and small refactoring). ---------- versions: +Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45274/textiowrapper_clear-3.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 05:54:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 09:54:52 +0000 Subject: [issue28387] double free in io.TextIOWrapper In-Reply-To: <1475868777.61.0.59647562301.issue28387@psf.upfronthosting.co.za> Message-ID: <1477821292.7.0.306201244454.issue28387@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45275/textiowrapper_clear-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 05:56:24 2016 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 30 Oct 2016 09:56:24 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1477821384.41.0.383940201584.issue28426@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: > New changeset 15a494886c5a by Serhiy Storchaka in branch '3.6': > Issue #28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(), > https://hg.python.org/cpython/rev/15a494886c5a s/that encode form str/that encode from str/ in Include/unicodeobject.h ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 06:03:25 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 10:03:25 +0000 Subject: [issue28560] Implement `PurePath.startswith` and `PurePath.endswith` In-Reply-To: <1477778373.6.0.891058430621.issue28560@psf.upfronthosting.co.za> Message-ID: <1477821805.31.0.76401446098.issue28560@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >>> from pathlib import Path >>> p = Path('/foo/bar') >>> Path('/foo') in p.parents True >>> Path('/spam') in p.parents False >>> p.parts[:2] == ('/', 'foo') True >>> p.parts[:2] == ('/', 'spam') False >>> p.relative_to('/foo') PosixPath('bar') >>> p.relative_to('/spam') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/pathlib.py", line 864, in relative_to .format(str(self), str(formatted))) ValueError: '/foo/bar' does not start with '/spam' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 06:31:43 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 30 Oct 2016 10:31:43 +0000 Subject: [issue28532] Show sys.version when -V option is supplied twice. In-Reply-To: <1477417861.44.0.42778795289.issue28532@psf.upfronthosting.co.za> Message-ID: <1477823503.2.0.407906969871.issue28532@psf.upfronthosting.co.za> INADA Naoki added the comment: Oh, it seems I hurried too much. Thanks to pointing it out. ---------- Added file: http://bugs.python.org/file45276/verbose-version3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 07:16:46 2016 From: report at bugs.python.org (Ram Rachum) Date: Sun, 30 Oct 2016 11:16:46 +0000 Subject: [issue28560] Implement `PurePath.startswith` and `PurePath.endswith` In-Reply-To: <1477778373.6.0.891058430621.issue28560@psf.upfronthosting.co.za> Message-ID: <1477826206.56.0.00172578969135.issue28560@psf.upfronthosting.co.za> Ram Rachum added the comment: Thanks. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 07:44:46 2016 From: report at bugs.python.org (SilentGhost) Date: Sun, 30 Oct 2016 11:44:46 +0000 Subject: [issue28560] Implement `PurePath.startswith` and `PurePath.endswith` In-Reply-To: <1477778373.6.0.891058430621.issue28560@psf.upfronthosting.co.za> Message-ID: <1477827886.19.0.0873576808161.issue28560@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- resolution: wont fix -> rejected stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 10:48:07 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 30 Oct 2016 14:48:07 +0000 Subject: [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1477838887.59.0.665025827506.issue28499@psf.upfronthosting.co.za> Vinay Sajip added the comment: The current documentation makes it very simple for naive users, with the main section being a reference and leaving the details to the basic and advanced tutorials and the cookbook. This was deliberately done in response to earlier feedback that the documentation provided too much detail for simple usage, and numerous people at the time responded positively to that set of changes. I'm happy to look at any proposals to improve the layout of the logging documentation, but remember that it must satisfy a lot of different audiences at different levels. Is there a link to Florian's talk somewhere? I couldn't find anything on the PyCon-fr 2016 website. Is it in English, and if not, is there a translation / transcript in English available? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 10:49:19 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 30 Oct 2016 14:49:19 +0000 Subject: [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1477838959.04.0.649220649713.issue28499@psf.upfronthosting.co.za> Vinay Sajip added the comment: s/leaving the details/leaving the more narrative aspects/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 10:57:38 2016 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 30 Oct 2016 14:57:38 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477839458.42.0.23631654831.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'll work on this later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 11:01:47 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 30 Oct 2016 15:01:47 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1477839707.38.0.372506265819.issue28524@psf.upfronthosting.co.za> Vinay Sajip added the comment: > The use case I've found is that I often have logging enabled while writing code, and then want to shut it off once I've finished. You could do this by having a configuration which is quite verbose while doing development and then less verbose when in production mode. Then if an issue crops up in production, verbosity could be temporarily turned up in the production configuration while diagnosing the issue, then turned down again later, without making code changes. Remember that verbosity can be set at the handler level too, which sometimes gives finer-grained control of logging verbosity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 11:08:15 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 15:08:15 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477840095.13.0.329232548772.issue28498@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added a number of style comments on Rietveld. I believe klappnase could address them, but since there are too little time to beta3 and I have a weak hope to push this in 3.6, I addressed them myself. Rewritten docstrings and test. Ned, is it good to add this feature in 3.6? The patch just adds a couple of new methods, it doesn't affect existing programs. ---------- nosy: +ned.deily Added file: http://bugs.python.org/file45277/tk_busy_5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 11:28:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 15:28:13 +0000 Subject: [issue27275] KeyError thrown by optimised collections.OrderedDict.popitem() In-Reply-To: <1465446835.8.0.930561202137.issue27275@psf.upfronthosting.co.za> Message-ID: <20161030152802.34695.78579.F9CD1272@psf.io> Roundup Robot added the comment: New changeset 3f816eecc53e by Serhiy Storchaka in branch '3.5': Backed out changeset 9f7505019767 (issue #27275). https://hg.python.org/cpython/rev/3f816eecc53e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 12:26:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 16:26:18 +0000 Subject: [issue28561] Report surrogate characters range in utf8_encoder In-Reply-To: <1477813551.36.0.0620162768049.issue28561@psf.upfronthosting.co.za> Message-ID: <20161030162614.22961.17987.F00261F8@psf.io> Roundup Robot added the comment: New changeset 542065b03c10 by Serhiy Storchaka in branch '3.6': Issue #28561: Clean up UTF-8 encoder: remove dead code, update comments, etc. https://hg.python.org/cpython/rev/542065b03c10 New changeset ee3670d9bda6 by Serhiy Storchaka in branch 'default': Issue #28561: Clean up UTF-8 encoder: remove dead code, update comments, etc. https://hg.python.org/cpython/rev/ee3670d9bda6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 12:28:28 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 16:28:28 +0000 Subject: [issue28561] Report surrogate characters range in utf8_encoder In-Reply-To: <1477813551.36.0.0620162768049.issue28561@psf.upfronthosting.co.za> Message-ID: <1477844908.7.0.756503532212.issue28561@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Xiang. Yes, this all is follow up issue25267. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 12:39:47 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 30 Oct 2016 16:39:47 +0000 Subject: [issue26936] android: test_socket fails In-Reply-To: <1462288246.37.0.495121419926.issue26936@psf.upfronthosting.co.za> Message-ID: <1477845587.51.0.0303623916637.issue26936@psf.upfronthosting.co.za> Xavier de Gaye added the comment: This patch simply skips the statements that fail on Android. ---------- assignee: -> xdegaye components: +Tests -Cross-Build, Library (Lib) stage: -> patch review versions: +Python 3.7 Added file: http://bugs.python.org/file45278/test_socket.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 12:52:43 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 30 Oct 2016 16:52:43 +0000 Subject: [issue28562] test_asyncio fails on Android upon calling getaddrinfo() Message-ID: <1477846363.43.0.193615088108.issue28562@psf.upfronthosting.co.za> New submission from Xavier de Gaye: The error: ====================================================================== ERROR: test_create_connection_service_name (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/unittest/mock.py", line 1179, in patched return func(*args, **keywargs) File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_asyncio/test_base_events.py", line 1209, in test_create_connection_service_name t, p = self.loop.run_until_complete(coro) File "/sdcard/org.bitbucket.pyona/lib/python3.7/asyncio/base_events.py", line 449, in run_until_complete return future.result() File "/sdcard/org.bitbucket.pyona/lib/python3.7/concurrent/futures/thread.py", line 55, in run result = self.fn(*self.args, **self.kwargs) File "/sdcard/org.bitbucket.pyona/lib/python3.7/socket.py", line 743, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 9] servname not supported for ai_socktype The same error occurs also in issue 26936. msg266362 lists the conditions under which getaddrinfo() fails on Android. With this patch, the test succeeds on both Android API levels 21 and 23 (there is no level 22). ---------- components: Tests files: getaddrinfo.patch keywords: patch messages: 279731 nosy: xdegaye, yselivanov priority: normal severity: normal stage: patch review status: open title: test_asyncio fails on Android upon calling getaddrinfo() type: behavior versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45279/getaddrinfo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 12:53:28 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 16:53:28 +0000 Subject: [issue27939] Tkinter mainloop raises when setting the value of ttk.LabeledScale In-Reply-To: <1472811634.57.0.400970918265.issue27939@psf.upfronthosting.co.za> Message-ID: <20161030165325.45129.4384.5B4B4A69@psf.io> Roundup Robot added the comment: New changeset 394b2b4da150 by Serhiy Storchaka in branch '3.5': Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused https://hg.python.org/cpython/rev/394b2b4da150 New changeset 91884d043fdc by Serhiy Storchaka in branch '3.6': Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused https://hg.python.org/cpython/rev/91884d043fdc New changeset 9e3931aa1ff0 by Serhiy Storchaka in branch 'default': Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused https://hg.python.org/cpython/rev/9e3931aa1ff0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 12:53:56 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 16:53:56 +0000 Subject: [issue27939] Tkinter mainloop raises when setting the value of ttk.LabeledScale In-Reply-To: <1472811634.57.0.400970918265.issue27939@psf.upfronthosting.co.za> Message-ID: <1477846436.92.0.186084688873.issue27939@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 12:54:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 16:54:57 +0000 Subject: [issue28293] Don't completely dump the regex cache when full In-Reply-To: <1475038169.86.0.21816130335.issue28293@psf.upfronthosting.co.za> Message-ID: <1477846497.23.0.555246028136.issue28293@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 12:57:53 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 30 Oct 2016 16:57:53 +0000 Subject: [issue26865] Meta-issue: support of the android platform In-Reply-To: <1461685011.99.0.617135447086.issue26865@psf.upfronthosting.co.za> Message-ID: <1477846673.88.0.875833328804.issue26865@psf.upfronthosting.co.za> Xavier de Gaye added the comment: issue #28562: test_asyncio fails on Android upon calling getaddrinfo() ---------- dependencies: +test_asyncio fails on Android upon calling getaddrinfo() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 12:58:41 2016 From: report at bugs.python.org (Carl Ekerot) Date: Sun, 30 Oct 2016 16:58:41 +0000 Subject: [issue28563] Arbitrary code execution in gettext.c2py Message-ID: <1477846721.72.0.339090840874.issue28563@psf.upfronthosting.co.za> New submission from Carl Ekerot: The c2py-function in the gettext module is seriously flawed in many ways due to its use of eval to create a plural function: return eval('lambda n: int(%s)' % plural) My first discovery was that nothing prevents an input plural string that resembles a function call: gettext.c2py("n()")(lambda: os.system("sh")) This is of course a low risk bug, since it requires control of both the plural function string and the argument. Gaining arbitrary code execution using only the plural function string requires that the security checks are bypassed. The security checks utilize the tokenize module and makes sure that no NAME-tokens that are not "n" exist in the string. However, it does not check if the parser succeeds without any token.ERRORTOKEN being present. Hence, the following input will pass the security checks: gettext.c2py( '"(eval(foo) && ""' )(0) ----> 1 gettext.c2py( '"(eval(foo) && ""' )(0) gettext.pyc in (n) NameError: global name 'foo' is not defined It will pass since it recognizes the entire input as a STRING token, and subsequently fails with an ERRORTOKEN. Passing a string in the argument to eval will however break the exploit since the parser will read the start-of-string in the eval argument as end-of-string, and the eval argument will be read as a NAME-token. Instead of passing a string to eval, we can build a string from characters in the docstrings available in the context of the gettext module: gettext.c2py('"(eval(' 'os.__doc__[152:155] + ' # os. 'os.__doc__[46:52] + ' # system 'os.__doc__[318] + ' # ( 'os.__doc__[55] + ' # ' 'os.__doc__[10] + ' # s 'os.__doc__[42] + ' # h 'os.__doc__[55] + ' # ' 'os.__doc__[329]' # ) ') && ""')(0) This will successfully spawn a shell in Python 2.7.11. Bonus: With the new string interpolation in Python 3.7, exploiting gettext.c2py becomes trivial: gettext.c2py('f"{os.system(\'sh\')}"')(0) The tokenizer will recognize the entire format-string as just a string, thus bypassing the security checks. To mitigate these vulnerabilities, eval should be avoided by implementing a custom parser for the gettext plural function DSL. ---------- components: Library (Lib) messages: 279734 nosy: Carl Ekerot priority: normal severity: normal status: open title: Arbitrary code execution in gettext.c2py type: security versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 13:01:02 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 17:01:02 +0000 Subject: [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477846862.63.0.505701270645.issue28513@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 13:09:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 17:09:52 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477847392.03.0.225751416698.issue23262@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 13:22:35 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 17:22:35 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <20161030172231.7609.52389.32747E0B@psf.io> Roundup Robot added the comment: New changeset dacb52577c1c by Serhiy Storchaka in branch '3.5': Issue #23262: The webbrowser module now supports Firefox 36+ and derived https://hg.python.org/cpython/rev/dacb52577c1c New changeset f1abc92a756a by Serhiy Storchaka in branch '3.6': - Issue #23262: The webbrowser module now supports Firefox 36+ and derived https://hg.python.org/cpython/rev/f1abc92a756a New changeset cade42bd0ee0 by Serhiy Storchaka in branch 'default': Issue #23262: The webbrowser module now supports Firefox 36+ and derived https://hg.python.org/cpython/rev/cade42bd0ee0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 13:23:11 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 17:23:11 +0000 Subject: [issue27517] LZMACompressor and LZMADecompressor raise exceptions if given empty strings twice In-Reply-To: <1468544610.85.0.0793383244022.issue27517@psf.upfronthosting.co.za> Message-ID: <1477848191.62.0.755812896061.issue27517@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 13:25:30 2016 From: report at bugs.python.org (SilentGhost) Date: Sun, 30 Oct 2016 17:25:30 +0000 Subject: [issue28563] Arbitrary code execution in gettext.c2py In-Reply-To: <1477846721.72.0.339090840874.issue28563@psf.upfronthosting.co.za> Message-ID: <1477848330.92.0.980637868569.issue28563@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 13:26:16 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 17:26:16 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1477848376.95.0.091312450152.issue28385@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 13:31:48 2016 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 30 Oct 2016 17:31:48 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477848708.3.0.981738188416.issue28128@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 13:38:46 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 17:38:46 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <20161030173843.114895.61393.700C3B71@psf.io> Roundup Robot added the comment: New changeset 92cae79fa5d9 by Serhiy Storchaka in branch '3.5': Issue #28385: An error message when non-empty format spec is passed to https://hg.python.org/cpython/rev/92cae79fa5d9 New changeset 0a985f7c6731 by Serhiy Storchaka in branch '3.6': Issue #28385: An error message when non-empty format spec is passed to https://hg.python.org/cpython/rev/0a985f7c6731 New changeset 6e8183abcc35 by Serhiy Storchaka in branch 'default': Issue #28385: An error message when non-empty format spec is passed to https://hg.python.org/cpython/rev/6e8183abcc35 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 14:06:41 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 18:06:41 +0000 Subject: [issue27517] LZMACompressor and LZMADecompressor raise exceptions if given empty strings twice In-Reply-To: <1468544610.85.0.0793383244022.issue27517@psf.upfronthosting.co.za> Message-ID: <1477850801.36.0.869191949406.issue27517@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report and patch Benjamin. Seems your patch fixes the problem in default case. But the compressor still fails with the raw format. >>> import lzma >>> FILTERS_RAW_4 = [{"id": lzma.FILTER_DELTA, "dist": 4}, ... {"id": lzma.FILTER_X86, "start_offset": 0x40}, ... {"id": lzma.FILTER_LZMA2, "preset": 4, "lc": 2}] >>> c = lzma.LZMACompressor(lzma.FORMAT_RAW, filters=FILTERS_RAW_4) >>> c.compress(b'') b'' >>> c.compress(b'') Traceback (most recent call last): File "", line 1, in _lzma.LZMAError: Insufficient buffer space ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 14:17:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 18:17:07 +0000 Subject: [issue28563] Arbitrary code execution in gettext.c2py In-Reply-To: <1477846721.72.0.339090840874.issue28563@psf.upfronthosting.co.za> Message-ID: <1477851427.48.0.748126598032.issue28563@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 14:52:16 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 30 Oct 2016 18:52:16 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477853536.76.0.767819152451.issue28498@psf.upfronthosting.co.za> Ned Deily added the comment: With ActiveState 8.6.4.1 (the most recent version available) on macOS: ====================================================================== ERROR: test_tk_busy (tkinter.test.test_tkinter.test_misc.MiscTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/tkinter/test/test_tkinter/test_misc.py", line 33, in test_tk_busy f.tk_busy_hold(cursor='gumby') File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 849, in tk_busy_hold self.tk.call('tk', 'busy', 'hold', self._w, *self._options(kw)) _tkinter.TclError: unknown option "-cursor" ---------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 14:54:55 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 30 Oct 2016 18:54:55 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1477853695.38.0.20147115574.issue28385@psf.upfronthosting.co.za> Ned Deily added the comment: Buildbots are failing: ====================================================================== FAIL: test_errors (test.test_fstring.TestCase) (str="f'{(lambda: 0):x}'") ---------------------------------------------------------------------- TypeError: unsupported format string passed to function.__format__ During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/buildarea/3.6.angelico-debian-amd64/build/Lib/test/test_fstring.py", line 20, in assertAllRaise eval(str) AssertionError: "non-empty" does not match "unsupported format string passed to function.__format__" ====================================================================== FAIL: test_errors (test.test_fstring.TestCase) (str="f'{(0,):x}'") ---------------------------------------------------------------------- TypeError: unsupported format string passed to tuple.__format__ During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/buildarea/3.6.angelico-debian-amd64/build/Lib/test/test_fstring.py", line 20, in assertAllRaise eval(str) AssertionError: "non-empty" does not match "unsupported format string passed to tuple.__format__" ---------------------------------------------------------------------- Ran 48 tests in 1.389s ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 14:59:06 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 18:59:06 +0000 Subject: [issue28449] tarfile.open(mode = 'r:*', ignore_zeros = True) has 50% chance failed to open compressed tars? In-Reply-To: <1476522464.39.0.172513688494.issue28449@psf.upfronthosting.co.za> Message-ID: <20161030185903.45224.4442.E9044A55@psf.io> Roundup Robot added the comment: New changeset f108e063e299 by Serhiy Storchaka in branch '3.5': Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar https://hg.python.org/cpython/rev/f108e063e299 New changeset e2dd0f48e643 by Serhiy Storchaka in branch '2.7': Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar https://hg.python.org/cpython/rev/e2dd0f48e643 New changeset de8e83262644 by Serhiy Storchaka in branch '3.6': Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar https://hg.python.org/cpython/rev/de8e83262644 New changeset 220c70519958 by Serhiy Storchaka in branch 'default': Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar https://hg.python.org/cpython/rev/220c70519958 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 14:59:41 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 30 Oct 2016 18:59:41 +0000 Subject: [issue28553] int.to_bytes docs logic error In-Reply-To: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> Message-ID: <1477853981.04.0.963559026757.issue28553@psf.upfronthosting.co.za> INADA Naoki added the comment: Make sense. ---------- keywords: +easy, patch nosy: +inada.naoki stage: -> commit review versions: -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file45280/28553.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 14:59:50 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 18:59:50 +0000 Subject: [issue28449] tarfile.open(mode = 'r:*', ignore_zeros = True) has 50% chance failed to open compressed tars? In-Reply-To: <1476522464.39.0.172513688494.issue28449@psf.upfronthosting.co.za> Message-ID: <1477853990.86.0.317087835008.issue28449@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 15:13:25 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 19:13:25 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1477854805.94.0.869699112529.issue28385@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is better? 1. Replace "unsupported format string passed to" back to "non-empty format string passed to " in generated error message? Note that full error message is changed in any case, this is the purpose of this issue. 2. Change the pattern "non-empty" to "unsupported" in f-string tests. Or to other part of new error message. It may be changed again in future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 15:14:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 19:14:38 +0000 Subject: [issue28553] int.to_bytes docs logic error In-Reply-To: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> Message-ID: <1477854878.57.0.538073113249.issue28553@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 15:23:02 2016 From: report at bugs.python.org (Eric Appelt) Date: Sun, 30 Oct 2016 19:23:02 +0000 Subject: [issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet) In-Reply-To: <1453293464.25.0.570690037157.issue26163@psf.upfronthosting.co.za> Message-ID: <1477855382.67.0.129764493897.issue26163@psf.upfronthosting.co.za> Eric Appelt added the comment: I spent some time looking at the Objects/setobject.c code where the hashing scheme for frozensets, which essentially works by XOR-ing together the hashes from all its entries. Significant care is taken to shuffle bits at various stages, and the algorithm seems to be well thought out. My own attempts to change constants or add in reshufflings either didn't help the collision statistics or just made things worse. I think that there is something of a fundamental limitation here due to information loss in XOR, and other fast, commutative bitwise operations (i.e. AND, OR) are well known to be much worse. I did stumble on a 2006 paper by Boneh and Boyen [1] which looked at a potentially related problem of trying to combine two different hashing functions to improve collision resistance and found that there was no way to do this with fewer bits than just concatenating the hashes. The present ticket is more a problem of combining hashes from the same function in an order-independent way and may be completely unrelated. However, I imagine that concatenation followed by rehashing the result would remove the loss due to XORing unlucky choices of hashes. Concatenating everything seemed obviously too slow and/or unacceptable in terms of memory use, but I thought of a compromise where I would construct an array of 4 hash values, initialized to zero, and for each entry I would select an array index based on a reshuffling of the bits, and XOR that particular entry into the chosen index. This results in a hash that is 4x wider than the standard size that reduces the information loss incurred from XOR. This wide hash can then be hashed down to a normal sized hash. I implemented this algorithm and tested it using the same procedure as before. Specifically, all frozensets for every possible combination (128) of the letters abcdefg as single character strings are hashed, and the last 7 bits of each of their hashes are compared to see how many unique 7-bit patterns are produced. This is done for PYTHONHASHSEED values from 1 to 10000 to build a distribution. The distribution is compared to a similar distribution constructed from pseudorandom numbers for comparison. Unlike the current hashing algorithm for frozensets, and much like the result from hashes of strings, the result of this new "wide4" algorithm appears to be nearly ideal. The results are plotted in "frozenset_string_n7_10k_wide4.png" as attached. I will follow this up with a patch for the algorithm as soon as I run the complete test suite and clean up. Another option if the current algorithm is considered good enough is to alter the current test to retry on failure if the power set of letters 'abcdefg...' fails by shifting one letter and trying again, perhaps ensuring that 4/5 tests pass. This ought to greatly reduce the sporadic build failures. [1] http://ai.stanford.edu/~xb/crypto06b/blackboxhash.pdf ---------- Added file: http://bugs.python.org/file45281/frozenset_string_n7_10k_wide4.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 15:32:39 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 30 Oct 2016 19:32:39 +0000 Subject: [issue26937] the chown() method of the tarfile.TarFile class fails on Android In-Reply-To: <1462288467.92.0.772791237683.issue26937@psf.upfronthosting.co.za> Message-ID: <1477855959.65.0.832178340283.issue26937@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The chown() method of the tarfile.TarFile class does not attempt to do a chown when pwd is None, even when numeric_owner is True, and although an attempt is made to fall back to tarinfo.gid when getgrnam() fails, or to tarinfo.uid when getgrnam() fails, nothing is done if only one of the grp or pwd modules fails on import. This new patch is similar to the previous one and is more explicit. ---------- assignee: -> xdegaye components: -Cross-Build stage: -> patch review title: android: test_tarfile fails -> the chown() method of the tarfile.TarFile class fails on Android versions: +Python 3.7 Added file: http://bugs.python.org/file45282/pwd_grp_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 16:02:39 2016 From: report at bugs.python.org (Marian Beermann) Date: Sun, 30 Oct 2016 20:02:39 +0000 Subject: [issue28564] shutil.rmtree is inefficient due to listdir() instead of scandir() Message-ID: <1477857759.23.0.231777495226.issue28564@psf.upfronthosting.co.za> New submission from Marian Beermann: The use of os.listdir severely limits the speed of this function on anything except solid-state drives. Using the new-in-Python 3.5 os.scandir should eliminate this bottleneck. ---------- components: Library (Lib) messages: 279745 nosy: enkore priority: normal severity: normal status: open title: shutil.rmtree is inefficient due to listdir() instead of scandir() versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 16:37:56 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 20:37:56 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1477859876.75.0.0178656404695.issue28498@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, yes, this feature is not supported on OSX/Aqua. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 16:40:04 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 20:40:04 +0000 Subject: [issue28564] shutil.rmtree is inefficient due to listdir() instead of scandir() In-Reply-To: <1477857759.23.0.231777495226.issue28564@psf.upfronthosting.co.za> Message-ID: <1477860004.89.0.624245493493.issue28564@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka type: -> enhancement versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 16:53:37 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 20:53:37 +0000 Subject: [issue28549] curses: calling addch() with an 1-length str segfaults with ncurses6 compiled with --enable-ext-colors In-Reply-To: <1477677069.87.0.354681142627.issue28549@psf.upfronthosting.co.za> Message-ID: <1477860817.27.0.8557550573.issue28549@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 16:54:40 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 20:54:40 +0000 Subject: [issue28549] curses: calling addch() with an 1-length str segfaults with ncurses6 compiled with --enable-ext-colors In-Reply-To: <1477677069.87.0.354681142627.issue28549@psf.upfronthosting.co.za> Message-ID: <20161030205437.17235.14960.E9511D50@psf.io> Roundup Robot added the comment: New changeset d06bf822585c by Serhiy Storchaka in branch '3.5': Issue #28549: Fixed segfault in curses's addch() with ncurses6. https://hg.python.org/cpython/rev/d06bf822585c New changeset 382b3d19e9fc by Serhiy Storchaka in branch '3.6': Issue #28549: Fixed segfault in curses's addch() with ncurses6. https://hg.python.org/cpython/rev/382b3d19e9fc New changeset 11cb97de3edd by Serhiy Storchaka in branch 'default': Issue #28549: Fixed segfault in curses's addch() with ncurses6. https://hg.python.org/cpython/rev/11cb97de3edd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 17:00:39 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 21:00:39 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes In-Reply-To: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> Message-ID: <20161030210034.62964.97941.BA46A661@psf.io> Roundup Robot added the comment: New changeset ea4cc65fc0fc by Serhiy Storchaka in branch '3.6': Issue #28541: Improve test coverage for encoding detection in json library. https://hg.python.org/cpython/rev/ea4cc65fc0fc New changeset e9169a8c0692 by Serhiy Storchaka in branch 'default': Issue #28541: Improve test coverage for encoding detection in json library. https://hg.python.org/cpython/rev/e9169a8c0692 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 17:01:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 21:01:17 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes In-Reply-To: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> Message-ID: <1477861277.93.0.576903008492.issue28541@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Eric. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 17:02:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 21:02:55 +0000 Subject: [issue28549] curses: calling addch() with an 1-length str segfaults with ncurses6 compiled with --enable-ext-colors In-Reply-To: <1477677069.87.0.354681142627.issue28549@psf.upfronthosting.co.za> Message-ID: <1477861375.48.0.231578327103.issue28549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for testing this. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 17:10:18 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 21:10:18 +0000 Subject: [issue28541] Improve test coverage for json library - loading bytes In-Reply-To: <1477537617.88.0.425466142378.issue28541@psf.upfronthosting.co.za> Message-ID: <1477861818.53.0.0974038582028.issue28541@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 17:20:10 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 30 Oct 2016 21:20:10 +0000 Subject: [issue28542] document cross compilation In-Reply-To: <1477563460.46.0.569265292251.issue28542@psf.upfronthosting.co.za> Message-ID: <1477862410.51.0.581418555104.issue28542@psf.upfronthosting.co.za> Xavier de Gaye added the comment: One must also add '--(en|dis)able-ipv6' to configure, otherwise configure exits with: Fatal: You must get working getaddrinfo() function. or you can specify "--disable-ipv6". The ACTION-IF-CROSS-COMPILING parameter of the AC_RUN_IFELSE that checks for getaddrinfo is $ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 17:24:40 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 30 Oct 2016 21:24:40 +0000 Subject: [issue28542] document cross compilation In-Reply-To: <1477563460.46.0.569265292251.issue28542@psf.upfronthosting.co.za> Message-ID: <1477862680.05.0.758616183576.issue28542@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > The ACTION-IF-CROSS-COMPILING parameter of the AC_RUN_IFELSE that checks for getaddrinfo is $ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6". Hum, I should have written: The ACTION-IF-CROSS-COMPILING parameter of the AC_RUN_IFELSE that checks for getaddrinfo is $ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" when configure is run with --disable-ipv6 or --enable-ipv6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 19:14:20 2016 From: report at bugs.python.org (Eric Appelt) Date: Sun, 30 Oct 2016 23:14:20 +0000 Subject: [issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet) In-Reply-To: <1453293464.25.0.570690037157.issue26163@psf.upfronthosting.co.za> Message-ID: <1477869260.64.0.760616166482.issue26163@psf.upfronthosting.co.za> Eric Appelt added the comment: Ugh... so I think I made a mental error (i.e. confused myself) in the last comment. The result looked a bit "to good to be true" and I think that there is at least one error in my thinking about the problem. I tried testing with the width set to 2 and then 1 as a check and noticed that even without "widening" the problem was still fixed and the hash distributions matched that of pseudorandom numbers. It turns out that just running the XORed result of the shuffled entry hashes through the hashing algorithm gets rid of any bit patterns picked up through the process. Currently there is an LCG that is used to disperse patterns but I don't think it really helps the problems arising in these tests: hash = hash * 69069U + 907133923UL; I'm not attaching any more plots as the result can be described in words, but when the LCG applied to the hash after XORing all entries is replaced with a hashing of the result using the standard python hashing algorithm, the test problem goes away. Specifically, when 128 distinct sets are hashed, the resulting hashes have a distribution of unique values across their last 7 digits matches the distribution from pseudorandom numbers. The fix is implemented in a small patch that I have attached. ---------- keywords: +patch Added file: http://bugs.python.org/file45283/setobject.c.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 20:52:12 2016 From: report at bugs.python.org (Pedro Algarvio) Date: Mon, 31 Oct 2016 00:52:12 +0000 Subject: [issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument In-Reply-To: <1399160288.58.0.274862722075.issue21423@psf.upfronthosting.co.za> Message-ID: <1477875132.69.0.751039782918.issue21423@psf.upfronthosting.co.za> Changes by Pedro Algarvio : ---------- nosy: +Pedro.Algarvio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 20:58:06 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 00:58:06 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477875486.36.0.965399542017.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: Here's an updated patch, that fixes some problems with the earlier patch, and adds equivalent support for bytes. HOWEVER, I can't get the warnings machinery to raise a DeprecationWarning that would have all of the equivalent information that an actual SyntaxError would have. So this patch still raises SyntaxError, but with a better error context. I'm going to keep plugging away at this, but I'm hoping that someone with more experience with warnings using the C-API can chime in with some advice. Given the tight deadline, I can use all of the help I can get. The two functions that need help are decode_bytes_with_escapes and decode_unicode_with_escapes in ast.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 20:58:28 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 00:58:28 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477875508.15.0.510442511047.issue28128@psf.upfronthosting.co.za> Changes by Eric V. Smith : Added file: http://bugs.python.org/file45284/28128-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 20:58:37 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 00:58:37 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477875517.53.0.59866291948.issue28128@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 20:59:26 2016 From: report at bugs.python.org (Pedro Algarvio) Date: Mon, 31 Oct 2016 00:59:26 +0000 Subject: [issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument In-Reply-To: <1399160288.58.0.274862722075.issue21423@psf.upfronthosting.co.za> Message-ID: <1477875566.64.0.054861294763.issue21423@psf.upfronthosting.co.za> Pedro Algarvio added the comment: Would also love to see this in the stdlib soon. My use case is logging setup(forward logs to the main process). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 21:03:27 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 01:03:27 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1477875807.33.0.973876396492.issue28385@psf.upfronthosting.co.za> Eric V. Smith added the comment: I would change the f-string tests. I realize it's a fragile test, but it's the only way to test the strings in the exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 21:17:37 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 01:17:37 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477876657.63.0.137006364407.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: Oops, use 28128-3.diff. ---------- Added file: http://bugs.python.org/file45285/28128-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 21:52:23 2016 From: report at bugs.python.org (Benjamin Fogle) Date: Mon, 31 Oct 2016 01:52:23 +0000 Subject: [issue27517] LZMACompressor and LZMADecompressor raise exceptions if given empty strings twice In-Reply-To: <1468544610.85.0.0793383244022.issue27517@psf.upfronthosting.co.za> Message-ID: <1477878743.54.0.61151382818.issue27517@psf.upfronthosting.co.za> Benjamin Fogle added the comment: Ah, thank you. Good catch. I have reworked the patch to handle both cases. ---------- Added file: http://bugs.python.org/file45286/lzma_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 21:59:01 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 31 Oct 2016 01:59:01 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477879141.68.0.17668367806.issue28128@psf.upfronthosting.co.za> Emanuel Barry added the comment: Thank you Eric. Have you looked at making a new DeprecatedSyntaxWarning subclass of both DeprecationWarning and SyntaxWarning? Hopefully that's of some help. I don't see a review link, but from a quick glance this looks good. Thanks :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 22:58:06 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 31 Oct 2016 02:58:06 +0000 Subject: [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477882686.11.0.406664228245.issue28513@psf.upfronthosting.co.za> Xiang Zhang added the comment: LGTM. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 01:34:24 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 31 Oct 2016 05:34:24 +0000 Subject: [issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet) In-Reply-To: <1453293464.25.0.570690037157.issue26163@psf.upfronthosting.co.za> Message-ID: <1477892064.92.0.981120858795.issue26163@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 01:48:57 2016 From: report at bugs.python.org (lilydjwg) Date: Mon, 31 Oct 2016 05:48:57 +0000 Subject: [issue28565] datetime.strptime %Z doesn't get included in the result Message-ID: <1477892937.56.0.524633393868.issue28565@psf.upfronthosting.co.za> New submission from lilydjwg: With %z, the result gets a tzinfo, but with %Z, it succeeds but the result is without timezone info: >>> datetime.datetime.strptime('2016-10-31T03:58:24 CST', '%Y-%m-%dT%H:%M:%S %Z') datetime.datetime(2016, 10, 31, 3, 58, 24) >>> datetime.datetime.strptime('2016-10-31T03:58:24 +0800', '%Y-%m-%dT%H:%M:%S %z') datetime.datetime(2016, 10, 31, 3, 58, 24, tzinfo=datetime.timezone(datetime.timedelta(0, 28800))) So the first one loses infomation (and will result in wrong values if the programmer isn't aware of this, and the local timezone is different than the one in the string). ---------- messages: 279761 nosy: lilydjwg priority: normal severity: normal status: open title: datetime.strptime %Z doesn't get included in the result type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 02:13:53 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Oct 2016 06:13:53 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <20161031061350.32315.46589.A70F2CDC@psf.io> Roundup Robot added the comment: New changeset f43078ec598c by Serhiy Storchaka in branch '3.6': Update the f-string test broken in issue #28385. https://hg.python.org/cpython/rev/f43078ec598c New changeset 931410a04240 by Serhiy Storchaka in branch 'default': Update the f-string test broken in issue #28385. https://hg.python.org/cpython/rev/931410a04240 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 02:19:44 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 06:19:44 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1477894784.31.0.491068679468.issue28385@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Shouldn't the type of error be changed from TypeError to ValueError? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 02:36:09 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Oct 2016 06:36:09 +0000 Subject: [issue27517] LZMACompressor and LZMADecompressor raise exceptions if given empty strings twice In-Reply-To: <1468544610.85.0.0793383244022.issue27517@psf.upfronthosting.co.za> Message-ID: <20161031063606.31793.62109.2A061A93@psf.io> Roundup Robot added the comment: New changeset b06f15507978 by Serhiy Storchaka in branch '3.5': Issue #27517: LZMA compressor and decompressor no longer raise exceptions if https://hg.python.org/cpython/rev/b06f15507978 New changeset fb64c7a81010 by Serhiy Storchaka in branch '3.6': Issue #27517: LZMA compressor and decompressor no longer raise exceptions if https://hg.python.org/cpython/rev/fb64c7a81010 New changeset 98c078fca8e0 by Serhiy Storchaka in branch 'default': Issue #27517: LZMA compressor and decompressor no longer raise exceptions if https://hg.python.org/cpython/rev/98c078fca8e0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 02:36:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 06:36:55 +0000 Subject: [issue27517] LZMACompressor and LZMADecompressor raise exceptions if given empty strings twice In-Reply-To: <1468544610.85.0.0793383244022.issue27517@psf.upfronthosting.co.za> Message-ID: <1477895815.45.0.452862825147.issue27517@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for you contribution Benjamin. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 02:43:10 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 06:43:10 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477896190.42.0.529792271466.issue23262@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What to do with 2.7? We can just backport the patch from 3.5, but also can use the version check from earlier Oleg's patches. 2.7 was released long time ago and still can be used on systems with old browsers (however it is very unlikely that Python is updated, but browsers are not). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 02:50:50 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 31 Oct 2016 06:50:50 +0000 Subject: [issue28565] datetime.strptime %Z doesn't get included in the result In-Reply-To: <1477892937.56.0.524633393868.issue28565@psf.upfronthosting.co.za> Message-ID: <1477896650.03.0.192985478168.issue28565@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 02:52:44 2016 From: report at bugs.python.org (Oleg Broytman) Date: Mon, 31 Oct 2016 06:52:44 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1477896764.3.0.970800895263.issue23262@psf.upfronthosting.co.za> Oleg Broytman added the comment: Let's me disagree because Python 2.7 is a very special case. One can easily update a browser ? they are perfectly compatible. But one cannot just update Python 2.7 because Python 3 is rather a different language that requires a lot of porting effort. So I can imagine Python 2.7 with new browser on the same computer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 03:44:06 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 07:44:06 +0000 Subject: [issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return In-Reply-To: <1473760278.9.0.335020145509.issue28123@psf.upfronthosting.co.za> Message-ID: <1477899846.0.0.00254888037458.issue28123@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually ignoring exceptions in _PyDict_GetItem_KnownHash causes a subtle difference between Python and C implementations. Making _PyDict_GetItem_KnownHash not ignoring exceptions looks right thing. But dict_merge expects that _PyDict_GetItem_KnownHash don't raise an exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 03:53:22 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 07:53:22 +0000 Subject: [issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return In-Reply-To: <1473760278.9.0.335020145509.issue28123@psf.upfronthosting.co.za> Message-ID: <1477900402.69.0.0043380368105.issue28123@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- priority: normal -> high stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 04:01:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 08:01:27 +0000 Subject: [issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet) In-Reply-To: <1453293464.25.0.570690037157.issue26163@psf.upfronthosting.co.za> Message-ID: <1477900887.36.0.981824129299.issue26163@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Eric, did you tested with FNV or SipHash24 hashing algorithm? Using standard Python hashing algorithm adds hash randomization for frozensets. This is worth at least be mentioned in What's New document. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 04:05:08 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 31 Oct 2016 08:05:08 +0000 Subject: [issue28553] int.to_bytes docs logic error In-Reply-To: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> Message-ID: <1477901108.17.0.658543104698.issue28553@psf.upfronthosting.co.za> Mark Dickinson added the comment: Patch LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 04:11:16 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 31 Oct 2016 08:11:16 +0000 Subject: [issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet) In-Reply-To: <1453293464.25.0.570690037157.issue26163@psf.upfronthosting.co.za> Message-ID: <1477901476.46.0.643978432154.issue26163@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 04:36:02 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 08:36:02 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477902962.54.0.135261928902.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'll take a look at it, Emanuel. But I can't promise how much progress I'll be able to make today. I also think that at that point it becomes so complex that it fails Ned's test for inclusion in 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 04:42:32 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Oct 2016 08:42:32 +0000 Subject: [issue28553] int.to_bytes docs logic error In-Reply-To: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> Message-ID: <20161031084229.34734.17335.6DDA6D55@psf.io> Roundup Robot added the comment: New changeset 32d8c89e90d1 by INADA Naoki in branch '3.5': Issue #28553: Fix logic error in example code of int.to_bytes doc. https://hg.python.org/cpython/rev/32d8c89e90d1 New changeset 2ae3f1599c34 by INADA Naoki in branch '3.6': Issue #28553: Fix logic error in example code of int.to_bytes doc. https://hg.python.org/cpython/rev/2ae3f1599c34 New changeset 66f255754ce9 by INADA Naoki in branch 'default': Issue #28553: Fix logic error in example code of int.to_bytes doc. https://hg.python.org/cpython/rev/66f255754ce9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 04:43:15 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 31 Oct 2016 08:43:15 +0000 Subject: [issue28553] int.to_bytes docs logic error In-Reply-To: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> Message-ID: <1477903395.23.0.693560452879.issue28553@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 04:43:43 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 08:43:43 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477903423.96.0.27034669022.issue28128@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45287/28128-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 05:00:38 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 31 Oct 2016 09:00:38 +0000 Subject: [issue26936] android: test_socket fails In-Reply-To: <1462288246.37.0.495121419926.issue26936@psf.upfronthosting.co.za> Message-ID: <1477904438.39.0.67358301683.issue26936@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Entered https://code.google.com/p/android/issues/detail?id=226677 on the AOSP issue tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 05:41:12 2016 From: report at bugs.python.org (Anish Patel) Date: Mon, 31 Oct 2016 09:41:12 +0000 Subject: [issue28566] Python installation fails on Windows because of pip feature Message-ID: <1477906872.22.0.975968443395.issue28566@psf.upfronthosting.co.za> New submission from Anish Patel: Originally created issue: https://github.com/pypa/pip/issues/4033#issuecomment-256865622 Copied text below: I had already Python 3 installed with the environment variable PYTHONHOME=C:\Program Files\Python35. I attempted to install Python 2, but received this issue (although I was installing python 2 after having installed 3): http://stackoverflow.com/questions/23349957/solving-install-issues-with-python-3-4-on-windows After multiple attempts, I was able to successfully install Python 2 by doing either of following: * Removing the pip feature from Python 2 installation * Removing my PYTHONHOME environment variable and running a complete Python 2 installation Although I resolved my issue, I would like to file this as a bug if it hasn't been filed already. ---------- components: Installation, Windows messages: 279774 nosy: Anish Patel, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python installation fails on Windows because of pip feature type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 05:43:41 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 31 Oct 2016 09:43:41 +0000 Subject: [issue28565] datetime.strptime %Z doesn't produce aware object In-Reply-To: <1477892937.56.0.524633393868.issue28565@psf.upfronthosting.co.za> Message-ID: <1477907021.66.0.449063505036.issue28565@psf.upfronthosting.co.za> SilentGhost added the comment: According to documentation %z is the only directive that would result in the aware object. %Z is not capable of doing that, so what you're asking is a new feature - that could only go in 3.7 ---------- components: +Library (Lib) nosy: +SilentGhost title: datetime.strptime %Z doesn't get included in the result -> datetime.strptime %Z doesn't produce aware object type: behavior -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 05:54:46 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 09:54:46 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477907686.49.0.971844136445.issue28128@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch emits DeprecationWarning instead of SyntaxError. I still not tested it. ---------- Added file: http://bugs.python.org/file45288/28128-4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 06:26:18 2016 From: report at bugs.python.org (Alex Croitor) Date: Mon, 31 Oct 2016 10:26:18 +0000 Subject: [issue28567] Bus error / segmentation fault on macOS debug build when using ctypes OpenGL Message-ID: <1477909577.25.0.765804576339.issue28567@psf.upfronthosting.co.za> New submission from Alex Croitor: Hi, I'm building Python 2.7.11 with debug symbols and no optimizations, but without the --with-debug switch, on macOS 10.11.5, El Capitan + XCode 7.3.1. Whenever I try to execute an OpenGL demo or example, I get a segmentation fault or a bus error with a weird back trace. If I build Python2 in regular release mode (-O2) the demos run fine without crashing. I also tried building Python 3.5.2, both in release, and debug mode, and the demos do not crash either. What I tried after, was to update the files used in Modules/_ctypes/libffi_osx folder, with the latest version (libffi-3.2.1), and some small build adjustments, and then it doesn't crash anymore with -O0. But then I did a diff of libffi_osx on Python 2 and 3, and there are no significant differences there. So I assume the issue is somewhere in the _ctypes module code. Providing configure line for python2 (it was mostly the same for python3) ./configure --prefix="/usr/local/Cellar/python/2.7.11_custom" --enable-ipv6 --datarootdir=/usr/local/Cellar/python/2.7.11_custom/share --datadir=/usr/local/Cellar/python/2.7.11_custom/share --enable-framework=/usr/local/Cellar/python/2.7.11_custom/Frameworks --without-gcc MACOSX_DEPLOYMENT_TARGET=10.11 CFLAGS="-O0 -fno-inline -fno-omit-frame-pointer -g" LDFLAGS="-O0" CPPFLAGS="-O0" OPT="-O0 -g" CC="clang" Setting just -O0 without the no-inline and no-omit-frame-pointer does not influence anything, Python2 still crashes. Attaching a small python test from the opengl source package. And here is the backtrace: Process 32599 stopped * thread #1: tid = 0x15ecc1, 0x00007fff95bb2d11 AppKit`-[NSView _drawRect:clip:] + 3689, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) frame #0: 0x00007fff95bb2d11 AppKit`-[NSView _drawRect:clip:] + 3689 AppKit`-[NSView _drawRect:clip:]: -> 0x7fff95bb2d11 <+3689>: movss %xmm0, (%r13,%r15) 0x7fff95bb2d18 <+3696>: movss 0x4(%r13,%r15), %xmm1 ; xmm1 = mem[0],zero,zero,zero 0x7fff95bb2d1f <+3703>: ucomiss %xmm0, %xmm1 0x7fff95bb2d22 <+3706>: jbe 0x7fff95bb2d2b ; <+3715> (lldb) bt error: unable to find CIE at 0x00000018 for cie_id = 0x00000004 for entry at 0x00000018. error: unable to find CIE at 0x00000050 for cie_id = 0x00000004 for entry at 0x00000050. error: time.so debug map object file '/Users/alex/Dev/python2_debug/Python-2.7.11/debug/build/temp.macosx-10.11-x86_64-2.7-pydebug/Users/alex/Dev/python2_debug/Python-2.7.11/Modules/timemodule.o' has changed (actual time is 0x58171936, debug map time is 0x58171933) since this executable was linked, file will be ignored * thread #1: tid = 0x15ecc1, 0x00007fff95bb2d11 AppKit`-[NSView _drawRect:clip:] + 3689, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) * frame #0: 0x00007fff95bb2d11 AppKit`-[NSView _drawRect:clip:] + 3689 frame #1: 0x00007fff95c0acad AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1873 frame #2: 0x00007fff95c0b08a AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2862 frame #3: 0x00007fff95bb03fb AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 838 frame #4: 0x00007fff95bafbe0 AppKit`-[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 334 frame #5: 0x00007fff95badfeb AppKit`-[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2449 frame #6: 0x00007fff95ba93f5 AppKit`-[NSView displayIfNeeded] + 1950 frame #7: 0x00007fff95ba8c3c AppKit`-[NSWindow displayIfNeeded] + 232 frame #8: 0x00007fff9622d41b AppKit`___NSWindowGetDisplayCycleObserver_block_invoke6365 + 476 frame #9: 0x00007fff95ba85d6 AppKit`__37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 941 frame #10: 0x00007fff8ba17f71 QuartzCore`CA::Transaction::run_commit_handlers(CATransactionPhase) + 85 frame #11: 0x00007fff8ba1742c QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 160 frame #12: 0x00007fff8ba170ec QuartzCore`CA::Transaction::commit() + 508 frame #13: 0x00007fff8ba22977 QuartzCore`CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 71 frame #14: 0x00007fff8dd47067 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 frame #15: 0x00007fff8dd46fd7 CoreFoundation`__CFRunLoopDoObservers + 391 frame #16: 0x00007fff8dd25ef8 CoreFoundation`CFRunLoopRunSpecific + 328 frame #17: 0x00007fff8c95c3f6 Foundation`-[NSRunLoop(NSRunLoop) limitDateForMode:] + 201 frame #18: 0x00000001051c0232 GLUT`-[GLUTApplication run] + 269 frame #19: 0x00000001051cce59 GLUT`glutMainLoop + 254 frame #20: 0x00000001017818af _ctypes.so`ffi_call_unix64 + 79 at darwin64.S:76 frame #21: 0x000000010178253f _ctypes.so`ffi_call(cif=0x00007fff5fbfe610, fn=(GLUT`glutMainLoop), rvalue=0x00007fff5fbfe6a0, avalue=0x00007fff5fbfe6a0) + 1487 at x86-ffi64.c:581 frame #22: 0x000000010177782c _ctypes.so`_call_function_pointer(flags=4353, pProc=(GLUT`glutMainLoop), avalues=0x00007fff5fbfe6a0, atypes=0x00007fff5fbfe6a0, restype=0x00000001017899b0, resmem=0x00007fff5fbfe6a0, argcount=0) + 332 at callproc.c:836 frame #23: 0x0000000101776fd1 _ctypes.so`_ctypes_callproc(pProc=(GLUT`glutMainLoop), argtuple=0x0000000100321060, flags=4353, argtypes=0x0000000100321060, restype=0x0000000100213a28, checker=0x0000000000000000) + 1345 at callproc.c:1179 frame #24: 0x0000000101768214 _ctypes.so`PyCFuncPtr_call(self=0x0000000105276060, inargs=0x0000000100321060, kwds=0x0000000000000000) + 1172 at _ctypes.c:3965 frame #25: 0x0000000100016d32 Python`PyObject_Call(func=0x0000000105276060, arg=0x0000000100321060, kw=0x0000000000000000) + 130 at abstract.c:2546 frame #26: 0x0000000100156dd6 Python`do_call(func=0x0000000105276060, pp_stack=0x00007fff5fbfec80, na=0, nk=0) + 566 at ceval.c:4568 frame #27: 0x000000010015466a Python`call_function(pp_stack=0x00007fff5fbfec80, oparg=0) + 2138 at ceval.c:4373 frame #28: 0x000000010014e843 Python`PyEval_EvalFrameEx(f=0x0000000101625660, throwflag=0) + 65187 at ceval.c:2987 frame #29: 0x000000010013e893 Python`PyEval_EvalCodeEx(co=0x00000001016283b0, globals=0x0000000100395958, locals=0x0000000100395958, args=0x0000000000000000, argcount=0, kws=0x0000000000000000, kwcount=0, defs=0x0000000000000000, defcount=0, closure=0x0000000000000000) + 4979 at ceval.c:3582 frame #30: 0x000000010013d515 Python`PyEval_EvalCode(co=0x00000001016283b0, globals=0x0000000100395958, locals=0x0000000100395958) + 85 at ceval.c:669 frame #31: 0x000000010018ce22 Python`run_mod(mod=0x0000000103824050, filename="./test_glutinit.py", globals=0x0000000100395958, locals=0x0000000100395958, flags=0x00007fff5fbff660, arena=0x0000000101503b40) + 98 at pythonrun.c:1370 frame #32: 0x000000010018d28f Python`PyRun_FileExFlags(fp=0x00007fff7ae2b050, filename="./test_glutinit.py", start=257, globals=0x0000000100395958, locals=0x0000000100395958, closeit=1, flags=0x00007fff5fbff660) + 223 at pythonrun.c:1356 frame #33: 0x000000010018c5e9 Python`PyRun_SimpleFileExFlags(fp=0x00007fff7ae2b050, filename="./test_glutinit.py", closeit=1, flags=0x00007fff5fbff660) + 729 at pythonrun.c:948 frame #34: 0x000000010018c03c Python`PyRun_AnyFileExFlags(fp=0x00007fff7ae2b050, filename="./test_glutinit.py", closeit=1, flags=0x00007fff5fbff660) + 140 at pythonrun.c:752 frame #35: 0x00000001001afdff Python`Py_Main(argc=2, argv=0x00007fff5fbff700) + 4271 at main.c:640 frame #36: 0x0000000100000f82 Python`___lldb_unnamed_function1$$Python + 34 frame #37: 0x00007fffa03a25ad libdyld.dylib`start + 1 ---------- components: ctypes files: test_glutinit.py messages: 279777 nosy: Alex Croitor priority: normal severity: normal status: open title: Bus error / segmentation fault on macOS debug build when using ctypes OpenGL type: crash versions: Python 2.7 Added file: http://bugs.python.org/file45289/test_glutinit.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 06:34:16 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 31 Oct 2016 10:34:16 +0000 Subject: [issue28567] Bus error / segmentation fault on macOS debug build when using ctypes OpenGL In-Reply-To: <1477909577.25.0.765804576339.issue28567@psf.upfronthosting.co.za> Message-ID: <1477910056.94.0.851703564776.issue28567@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 06:39:30 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 10:39:30 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477910370.37.0.716552498613.issue28128@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed bytes literals decoding (test_codecs was failed). ---------- Added file: http://bugs.python.org/file45290/28128-5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 07:23:29 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 31 Oct 2016 11:23:29 +0000 Subject: [issue28564] shutil.rmtree is inefficient due to listdir() instead of scandir() In-Reply-To: <1477857759.23.0.231777495226.issue28564@psf.upfronthosting.co.za> Message-ID: <1477913009.19.0.880233023843.issue28564@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 07:23:54 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 31 Oct 2016 11:23:54 +0000 Subject: [issue28563] Arbitrary code execution in gettext.c2py In-Reply-To: <1477846721.72.0.339090840874.issue28563@psf.upfronthosting.co.za> Message-ID: <1477913034.11.0.868185968594.issue28563@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 07:26:02 2016 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 31 Oct 2016 11:26:02 +0000 Subject: [issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x In-Reply-To: <1476450540.6.0.486887198503.issue28440@psf.upfronthosting.co.za> Message-ID: <1477913162.43.0.0254445225401.issue28440@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Another reason to remove this feature: installing python 2.7.12 using the installer on www.python.org breaks the system install of Python, likely because of this issue. I'm a bit sad that this feature has to go, but modern Python use (in particular virtualenv) has reduced the need for this feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 07:28:42 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 31 Oct 2016 11:28:42 +0000 Subject: [issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return In-Reply-To: <1473760278.9.0.335020145509.issue28123@psf.upfronthosting.co.za> Message-ID: <1477913322.37.0.734776799726.issue28123@psf.upfronthosting.co.za> Xiang Zhang added the comment: dict_merge was altered after the patch. I make it ignore explicitly the error now, to not affect former behaviour. Serhiy, I apply your suggestion to use _PyLong_AsByteArray for Py_hash_t, but I am not familiar with the API. It needs a review. ---------- Added file: http://bugs.python.org/file45291/issue28123_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 07:57:36 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 11:57:36 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477915056.7.0.125883978329.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: Serihy: I had tried this approach earlier, but it doesn't work. With your -5.diff patch, the output is (using Nick's test case): $ rm -rf __pycache__/ ; ./python -Werror escape_warning.py Traceback (most recent call last): File "escape_warning.py", line 1, in import bad_escape DeprecationWarning: invalid escape sequence \d $ With my -4.diff patch, you get the desired full stack trace: $ rm -rf __pycache__/ ; ./python -Wall escape_warning.py Traceback (most recent call last): File "escape_warning.py", line 1, in import bad_escape File "/home/eric/local/python/cpython/bad_escape.py", line 1 print('\d') ^ SyntaxError: invalid escape sequence \d $ The trick is: how to make the DeprecationWarning version produce output similar to the SyntaxError case? Note that with DeprecationWarning, you don't see the line in bad_escape.py that actually contains the string with the invalid escape. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 08:02:43 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 12:02:43 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477915363.36.0.264360519805.issue28128@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added additional tests. ---------- Added file: http://bugs.python.org/file45292/28128-6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 08:06:13 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 12:06:13 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477915573.19.0.509902495865.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: Also, you'll note that with or without your patch, you get the same behavior. The code in hg already raises DeprecationWarning, just in a different place. So unless we can improve the DeprecationWarning output, we're better off doing nothing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 08:16:11 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 31 Oct 2016 12:16:11 +0000 Subject: [issue1520879] make install change: Allow $DESTDIR to be relative Message-ID: <1477916171.26.0.523388318834.issue1520879@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> out of date stage: test needed -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 08:23:29 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 31 Oct 2016 12:23:29 +0000 Subject: [issue28485] compileall.compile_dir(workers=) does not raise ValueError if multithreading disabled In-Reply-To: <1476949159.83.0.8638287974.issue28485@psf.upfronthosting.co.za> Message-ID: <1477916609.98.0.056350433815.issue28485@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: +Library (Lib) stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 08:36:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 12:36:07 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477917367.46.0.0620395401845.issue28128@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Following patch just raises SyntaxError if DeprecationWarning was raised as error. Still needed tests for this. > Also, you'll note that with or without your patch, you get the same behavior. Not the same. New warnings contain correct information about a file and a line. $ ./python-unpatched -Wa escape_warning.py _frozen_importlib:205: DeprecationWarning: invalid escape sequence '\d' \d $ ./python-patched -Wa escape_warning.py /home/serhiy/py/cpython-3.6/bad_escape.py:2: DeprecationWarning: invalid escape sequence \d print('\d') \d $ ./python-unpatched -We escape_warning.py Traceback (most recent call last): File "escape_warning.py", line 1, in import bad_escape DeprecationWarning: invalid escape sequence '\d' $ ./python-patched -We escape_warning.py Traceback (most recent call last): File "escape_warning.py", line 1, in import bad_escape File "/home/serhiy/py/cpython-3.6/bad_escape.py", line 2 print('\d') ^ SyntaxError: invalid escape sequence \d ---------- Added file: http://bugs.python.org/file45293/28128-7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 08:42:23 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 12:42:23 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477917743.82.0.781450185371.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm not in front of a computer at the moment, but the output looks good. Also, my very quick glance at -7.diff's warn_invalid_escape_sequence looks reasonable, although I can't say for sure whether raising the error in PyErr_WarnExplicitObject followed by raising another error in ast_error is absolutely correct (it's outside my expertise). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 08:47:06 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 12:47:06 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1477918026.55.0.566449719469.issue28385@psf.upfronthosting.co.za> Eric V. Smith added the comment: TypeError is documented as "Raised when an operation or function is applied to an object of inappropriate type". I think that fits this case: you're applying some format code to a type that doesn't support it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 08:56:51 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 12:56:51 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1477918611.43.0.136994757488.issue28385@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But on other hand, the error depends on the value of format specifier: >>> format('abc', '') 'abc' >>> format('abc', 'j') Traceback (most recent call last): File "", line 1, in ValueError: Unknown format code 'j' for object of type 'str' >>> format([1, 2, 3], '') '[1, 2, 3]' >>> format([1, 2, 3], 'j') Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to list.__format__ If keep TypeError I think it would be better to restore former error message "non-empty format string". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 09:06:06 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 31 Oct 2016 13:06:06 +0000 Subject: [issue28566] Python installation fails on Windows because of pip feature In-Reply-To: <1477906872.22.0.975968443395.issue28566@psf.upfronthosting.co.za> Message-ID: <1477919166.88.0.858447088896.issue28566@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks for the write up. This has already been resolved for 2.7.13 (where install will complete but pip won't be available), and as you discovered you should never set PYTHONHOME (or PYTHONPATH) globally, since it will affect every version and not just the one you intended. ---------- resolution: -> out of date stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 09:22:21 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Oct 2016 13:22:21 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <20161031132214.45045.39879.FF084263@psf.io> Roundup Robot added the comment: New changeset 259745f9a1e4 by Eric V. Smith in branch 'default': Issue 28128: Print out better error/warning messages for invalid string escapes. https://hg.python.org/cpython/rev/259745f9a1e4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 09:23:02 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 13:23:02 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477920182.17.0.782545135921.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: I've pushed this to the default branch. I'll watch the buildbots. Then Ned can decide if this goes in to 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 09:33:44 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 13:33:44 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477920824.08.0.450441897197.issue28128@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Searching on GitHub it seems to me that the most frequent issue with supporting Python 3.6 is eliminating or silencing warnings about invalid escape sequences. Any help with this is very important. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 10:43:05 2016 From: report at bugs.python.org (Eric Appelt) Date: Mon, 31 Oct 2016 14:43:05 +0000 Subject: [issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet) In-Reply-To: <1453293464.25.0.570690037157.issue26163@psf.upfronthosting.co.za> Message-ID: <1477924985.21.0.760437198069.issue26163@psf.upfronthosting.co.za> Eric Appelt added the comment: If I understand the reporting properly all tests so far have used SipHash24: Python 3.7.0a0 (default:5b33829badcc+, Oct 30 2016, 17:29:47) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sysconfig >>> sysconfig.get_config_var("Py_HASH_ALGORITHM") 0 >>> import sys >>> sys.hash_info.algorithm 'siphash24' It sounds like it is worth it for me to be more rigorous and perform a battery of tests using FNV and then SipHash24 to compare: - Performing no dispersion after the frozenset hash is initially computed from XORing entry hashes (control) - Performing dispersion using an LCG after the frozenset hash is initially computed from XORing entry hashes (current approach) - Performing dispersion using the selected hash algorithm (FNV/SipHash24) after the frozenset hash is initially computed from XORing entry hashes (proposed approach) I'll take the six plots and merge them into a single PNG, and also post my (short)testing and plotting scripts for reproducibility and checking of the results. I can also write a regression test if you think that would be good to have in the test suite (perhaps skipped by default for time), where instead of using the same seven letters a-g as test strings and varying PYTHONHASHSEED, I could perform the letter test for n=7 with 10000 different sets of short random strings to see if any fell below threshold. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 11:00:41 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 31 Oct 2016 15:00:41 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477926041.97.0.475841531753.issue28128@psf.upfronthosting.co.za> Emanuel Barry added the comment: As Nick pointed out in an earlier message on this thread and as Serhiy observed on GitHub issues, backporting this patch to 3.6 is a must. Large projects' use of Python 3.6 has shown that it's hard to track down the actual cause of the error; it only makes sense to improve that before the final release. Serhiy, are you working on #28028 alongside this, or can it be removed from the dependencies? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 11:07:01 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 15:07:01 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477926421.77.0.279461136464.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: I agree it would be nice to get this in to 3.6. I'm not sure I'd go so far as to say it's a must and can't wait for 3.6.1. It's a non-trivial change, and it's up to Ned to say if it can go in to 3.6. If you don't run with -Wall or -Werror, then you won't notice any new behavior with invalid escapes, correct? Maybe post to python-dev and see if we can get more reviewers? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 11:10:14 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 31 Oct 2016 15:10:14 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477926614.91.0.807264503067.issue28128@psf.upfronthosting.co.za> Ned Deily added the comment: I agree that the current behavior for 3.6 is very user-unfriendly so I think the risks of making such an extensive change at this point in the release cycle are outweighed by the severity of the problem. So let's get it into 3.6 now; there's still time for it to make 360b3. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 11:18:22 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 31 Oct 2016 15:18:22 +0000 Subject: [issue28028] Convert warnings to SyntaxWarning in parser In-Reply-To: <1473362584.72.0.509126494717.issue28028@psf.upfronthosting.co.za> Message-ID: <1477927102.67.0.83587620257.issue28028@psf.upfronthosting.co.za> Changes by Emanuel Barry : ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 11:18:30 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 31 Oct 2016 15:18:30 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477927110.78.0.644789171617.issue28128@psf.upfronthosting.co.za> Emanuel Barry added the comment: Even better than what I was aiming for :) ---------- dependencies: -Convert warnings to SyntaxWarning in parser priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 11:21:50 2016 From: report at bugs.python.org (Tim Graham) Date: Mon, 31 Oct 2016 15:21:50 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477927310.74.0.69606607687.issue28128@psf.upfronthosting.co.za> Tim Graham added the comment: The patch is working well to identify warnings when running Django's test suite. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 11:26:07 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 15:26:07 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477927566.98.0.052599092829.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'll work on this as soon as I can, coordinating with Ned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 11:31:38 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Mon, 31 Oct 2016 15:31:38 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477927898.93.0.229399818719.issue28128@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: The error message is much better now, thanks you all! Seems the ^ pointer is not always correct. For example, in the function scope it's correct: $ cat test.py def foo(): s = 'C:\Program Files\Microsoft' $ python3.7 -W error test.py File "test.py", line 2 s = 'C:\Program Files\Microsoft' ^ SyntaxError: invalid escape sequence \P On the other hand, top-level literals confuses the pointer: $ cat test.py s = 'C:\Program Files\Microsoft' $ python3.7 -W error test.py File "test.py", line 1 s = 'C:\Program Files\Microsoft' ^ SyntaxError: invalid escape sequence \P Is that expected? Using 259745f9a1e4 on Arch Linux 64-bit ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 11:39:18 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 31 Oct 2016 15:39:18 +0000 Subject: [issue28542] document cross compilation In-Reply-To: <1477563460.46.0.569265292251.issue28542@psf.upfronthosting.co.za> Message-ID: <1477928358.7.0.966540833549.issue28542@psf.upfronthosting.co.za> Xavier de Gaye added the comment: New patch, less verbose and taking into account the previous posts. ---------- Added file: http://bugs.python.org/file45294/readme_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 11:50:59 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 15:50:59 +0000 Subject: [issue28028] Convert warnings to SyntaxWarning in parser In-Reply-To: <1473362584.72.0.509126494717.issue28028@psf.upfronthosting.co.za> Message-ID: <1477929059.59.0.106973578527.issue28028@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 12:37:10 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 31 Oct 2016 16:37:10 +0000 Subject: [issue28564] shutil.rmtree is inefficient due to listdir() instead of scandir() In-Reply-To: <1477857759.23.0.231777495226.issue28564@psf.upfronthosting.co.za> Message-ID: <1477931830.65.0.116938256174.issue28564@psf.upfronthosting.co.za> Josh Rosenberg added the comment: You need to cache the names up front because the loop is unlinking entries, and readdir isn't consistent when the directory entries are mutated between calls. https://github.com/kripken/emscripten/issues/2528 FindFirstFile/FindNextFile likely has similar issues, even if they're not consistently seen (due to DeleteFile itself not guaranteeing deletion until the last handle to the file is closed). scandir might save some stat calls, but you'd need to convert it from generator to list before the loop begins, which would limit the savings a bit. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 12:43:09 2016 From: report at bugs.python.org (Anselm Kruis) Date: Mon, 31 Oct 2016 16:43:09 +0000 Subject: [issue28568] Build files in PC/VS9.0 contain an outdated sqlite version number Message-ID: <1477932189.44.0.0903388711161.issue28568@psf.upfronthosting.co.za> New submission from Anselm Kruis: Python 2.7 only. Tested with 2.7.12. Commit fa68df1d5e65 for #19450 changes the sqlite version for Python 2.7 on Windows from 3.6.21 to 3.8.11.0, but only for the build files in PCbuild. The documentation states, that the build files under PC\VS9.0 are also fully supported, but they still refer to sqlite version 3.6.21. This causes the command "PC\VS9.0\build.bat -r -e" to fail, because it first fetches sqlite 3.9.11.0 from svn.python.org and then tries to build sqlite 3.6.21, which is of course not available. The attached patch fixes the problem. ---------- components: Build, Windows files: fix-sqlite-version.patch keywords: patch messages: 279802 nosy: anselm.kruis, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Build files in PC/VS9.0 contain an outdated sqlite version number type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file45295/fix-sqlite-version.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 12:44:00 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 31 Oct 2016 16:44:00 +0000 Subject: [issue26919] android: test_cmd_line fails In-Reply-To: <1462267115.39.0.594600458307.issue26919@psf.upfronthosting.co.za> Message-ID: <1477932240.0.0.302000230507.issue26919@psf.upfronthosting.co.za> Xavier de Gaye added the comment: An interactive session confirms that the problem is indeed with the command line arguments of python invoked by subprocess (and the problem is fixed by the patch): >>> from test.support import FS_NONASCII >>> cmd = "assert(ord(%r) == %s)" % (FS_NONASCII, ord(FS_NONASCII)) >>> exec(cmd) >>> import subprocess, sys >>> subprocess.run([sys.executable, '-c', cmd]) Unable to decode the command from the command line: UnicodeEncodeError: 'utf-8' codec can't encode characters in position 12-13: surrogates not allowed CompletedProcess(args=['/data/data/org.bitbucket.pyona/python/bin/python', '-c', "assert(ord('\xe6') == 230)"], returncode=1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 12:45:03 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 31 Oct 2016 16:45:03 +0000 Subject: [issue28530] Howto detect if an object is of type os.DirEntry In-Reply-To: <1477410376.41.0.315236150527.issue28530@psf.upfronthosting.co.za> Message-ID: <1477932303.99.0.441013652539.issue28530@psf.upfronthosting.co.za> Brett Cannon added the comment: As mentioned, this issue is fixed in Python 3.6 by exposing os.DirEntry which is just a direct import of what is in the posix module (which is the same thing as the nt module; name changes depending on the OS so just ignore the posix/nt part of all of this). And we can't backport the addition to the os module as that would break backwards-compatibility in a bug fix release. So I'm closing this as out of date. ---------- nosy: +brett.cannon resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 12:45:25 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 31 Oct 2016 16:45:25 +0000 Subject: [issue26919] android: test_cmd_line fails In-Reply-To: <1462267115.39.0.594600458307.issue26919@psf.upfronthosting.co.za> Message-ID: <1477932325.98.0.0755404993147.issue26919@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- assignee: -> xdegaye components: +Interpreter Core -Cross-Build, Library (Lib) stage: -> commit review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 12:54:40 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 31 Oct 2016 16:54:40 +0000 Subject: [issue26919] on Android python fails to decode/encode command line arguments In-Reply-To: <1462267115.39.0.594600458307.issue26919@psf.upfronthosting.co.za> Message-ID: <1477932880.61.0.150147399387.issue26919@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- title: android: test_cmd_line fails -> on Android python fails to decode/encode command line arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:00:26 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 31 Oct 2016 17:00:26 +0000 Subject: [issue28544] Implement asyncio.Task in C In-Reply-To: <1477585991.46.0.161960308899.issue28544@psf.upfronthosting.co.za> Message-ID: <1477933226.37.0.778030776317.issue28544@psf.upfronthosting.co.za> Brett Cannon added the comment: Just an FYI, for testing code that has both pure Python and C versions you can follow the advice in https://www.python.org/dev/peps/pep-0399/#details . And if you want to really simplify things you start down the road of what test_importlib uses: https://github.com/python/cpython/blob/master/Lib/test/test_importlib/util.py#L81 . ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:03:08 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 31 Oct 2016 17:03:08 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477933388.36.0.365952854699.issue28199@psf.upfronthosting.co.za> Jason R. Coombs added the comment: In https://github.com/pypa/setuptools/issues/836, I've pinpointed this commit as implicated in dictionaries spontaneously losing keys. I have not yet attempted to replicate the issue in a standalone environment, and I'm hoping someone with a better understanding of the implementation can devise a reproduction that distills the issue that setuptools seems only to hit in very specialized conditions. Please let me know if I can help by providing more detail in the environment where this occurs or by filing another ticket. Somewhere we should capture that this is a regression pending release in 3.6.0b3 today, and for that reason, I'm adding Ned to this ticket. ---------- nosy: +jason.coombs, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:04:35 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 31 Oct 2016 17:04:35 +0000 Subject: [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477933475.52.0.581590298716.issue28513@psf.upfronthosting.co.za> SilentGhost added the comment: Serhiy, this needs .. program:: zipfile directive specified before cmdoption. Without it :option:`-c` links to python's -c, rather than zipfile's. The -l and -e are linked correctly, but the option links would have be be changed for all three, i.e. to :option:`-c ` ---------- nosy: +SilentGhost stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:07:36 2016 From: report at bugs.python.org (Aviv Palivoda) Date: Mon, 31 Oct 2016 17:07:36 +0000 Subject: [issue28518] execute("begin immediate") throwing OperationalError In-Reply-To: <1477307118.31.0.70785963389.issue28518@psf.upfronthosting.co.za> Message-ID: <1477933656.14.0.0420789965532.issue28518@psf.upfronthosting.co.za> Aviv Palivoda added the comment: I looked into this error and I think the problem is the sqlite3_stmt_readonly check in _pysqlite_query_execute (cursor.c line 517): if (self->connection->begin_statement && !sqlite3_stmt_readonly(self->statement->st) && !self->statement->is_ddl) { if (sqlite3_get_autocommit(self->connection->db)) { result = _pysqlite_connection_begin(self->connection); if (!result) { goto error; } Py_DECREF(result); } } As you can see we check if the current statement is not readonly and if so we start a transaction. The problem is that sqlite3_stmt_readonly return false for the "begin immediate" statement. When this happens we open a transaction with _pysqlite_connection_begin and then executing the "begin immediate". I think this is a error in sqlite as the documentation says: "ransaction control statements such as BEGIN, COMMIT, ROLLBACK, SAVEPOINT, and RELEASE cause sqlite3_stmt_readonly() to return true," (https://www.sqlite.org/c3ref/stmt_readonly.html) ---------- nosy: +palaviv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:15:16 2016 From: report at bugs.python.org (Vsevolod Velichko) Date: Mon, 31 Oct 2016 17:15:16 +0000 Subject: [issue26959] pickle: respect dispatch for functions again In-Reply-To: <1462407226.68.0.381104260984.issue26959@psf.upfronthosting.co.za> Message-ID: <1477934116.36.0.352993394731.issue26959@psf.upfronthosting.co.za> Vsevolod Velichko added the comment: Hi, any progress here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:20:29 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 31 Oct 2016 17:20:29 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477934429.22.0.46259350703.issue28199@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Jason, for the heads-up. Serhiy, can you take a look at this quickly? I'm going to hold 360b3 until we have a better idea what's going on. ---------- priority: normal -> release blocker resolution: fixed -> duplicate stage: resolved -> test needed status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:25:37 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 31 Oct 2016 17:25:37 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477934737.6.0.22997090775.issue28199@psf.upfronthosting.co.za> Xiang Zhang added the comment: The bug seems to lies in https://hg.python.org/cpython/file/tip/Objects/dictobject.c#l1291. We should use oldkeys->dk_nentries instead of numentries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:31:26 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 31 Oct 2016 17:31:26 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477935086.27.0.268157888488.issue28199@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- Removed message: http://bugs.python.org/msg279811 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:32:14 2016 From: report at bugs.python.org (Andrey Fedorov) Date: Mon, 31 Oct 2016 17:32:14 +0000 Subject: [issue28569] mock.attach_mock should work with return value of patch() Message-ID: <1477935134.31.0.733482108189.issue28569@psf.upfronthosting.co.za> New submission from Andrey Fedorov: The attach_mock in the following code sample fails silently: >>> from mock import patch, Mock >>> p = patch('requests.get', autospec=True) >>> manager = Mock() >>> manager.attach_mock(p.start(), 'requests_get') >>> import requests >>> requests.get('https://google.com') >>> manager.mock_calls [] >>> p.stop() >>> manager.mock_calls [] It seems this would be a useful use-case, especially given that this code would work as-expected if 'requests.get' in the second line were replaced with a path to a class. ---------- components: Library (Lib) messages: 279812 nosy: Andrey Fedorov, michael.foord priority: normal severity: normal status: open title: mock.attach_mock should work with return value of patch() type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:32:38 2016 From: report at bugs.python.org (Andrey Fedorov) Date: Mon, 31 Oct 2016 17:32:38 +0000 Subject: [issue28569] mock.attach_mock should work with any return value of patch() In-Reply-To: <1477935134.31.0.733482108189.issue28569@psf.upfronthosting.co.za> Message-ID: <1477935158.06.0.124813462843.issue28569@psf.upfronthosting.co.za> Changes by Andrey Fedorov : ---------- title: mock.attach_mock should work with return value of patch() -> mock.attach_mock should work with any return value of patch() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:40:23 2016 From: report at bugs.python.org (Marian Beermann) Date: Mon, 31 Oct 2016 17:40:23 +0000 Subject: [issue28564] shutil.rmtree is inefficient due to listdir() instead of scandir() In-Reply-To: <1477857759.23.0.231777495226.issue28564@psf.upfronthosting.co.za> Message-ID: <1477935623.27.0.851561536844.issue28564@psf.upfronthosting.co.za> Marian Beermann added the comment: The main issue on *nix is more likely that by using listdir you get directory order, while what you really need is inode ordering. scandir allows for that, since you get the inode from the DirEntry with no extra syscalls - especially without an open() or stat(). Other optimizations are also possible. For example opening the directory and using unlinkat() would likely shave off a bit of CPU. But the dominating factor here is likely the bad access pattern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:51:13 2016 From: report at bugs.python.org (Eric Snow) Date: Mon, 31 Oct 2016 17:51:13 +0000 Subject: [issue28550] if inline statement does not work with multiple assignment. In-Reply-To: <1477678025.32.0.74165596104.issue28550@psf.upfronthosting.co.za> Message-ID: <1477936273.41.0.338579852338.issue28550@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 14:17:31 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 18:17:31 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477937851.4.0.378042075503.issue28199@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have rolled back the changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 14:19:31 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 31 Oct 2016 18:19:31 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477937971.12.0.0574251824888.issue28199@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Serhiy! Jason, can you verify that there is no longer a 3.6 regression with your tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 14:20:03 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 31 Oct 2016 18:20:03 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477938003.38.0.820426486595.issue28199@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Testing now... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 14:21:02 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 31 Oct 2016 18:21:02 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477938062.94.0.989360776778.issue28199@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Confirmed. Tests are now passing where they were failing before. Thanks for the quick response! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 14:22:43 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 31 Oct 2016 18:22:43 +0000 Subject: [issue28199] Compact dict resizing is doing too much work In-Reply-To: <1474236829.43.0.744002065698.issue28199@psf.upfronthosting.co.za> Message-ID: <1477938163.04.0.306655328593.issue28199@psf.upfronthosting.co.za> Ned Deily added the comment: Excellent, thanks everyone! I'll leave this open for re-evaluation for 3.7. ---------- priority: release blocker -> resolution: duplicate -> stage: test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 14:34:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 18:34:38 +0000 Subject: [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477938878.15.0.525247710537.issue28513@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks SilentGhost! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 14:49:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Oct 2016 18:49:13 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <20161031184909.34814.45378.D0D4B43E@psf.io> Roundup Robot added the comment: New changeset ee82266ad35b by Eric V. Smith in branch '3.6': Issue 28128: Print out better error/warning messages for invalid string escapes. Backport to 3.6. https://hg.python.org/cpython/rev/ee82266ad35b New changeset 7aa001a48120 by Eric V. Smith in branch 'default': Issue 28128: Null merge with 3.6: already applied to default. https://hg.python.org/cpython/rev/7aa001a48120 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 15:26:57 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 31 Oct 2016 19:26:57 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1477942017.93.0.982721415478.issue28128@psf.upfronthosting.co.za> Eric V. Smith added the comment: Chi Hsuan Yen: I'll investigate, and open another issue as needed. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 15:36:07 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 31 Oct 2016 19:36:07 +0000 Subject: [issue26920] android: test_sys fails In-Reply-To: <1462267582.58.0.744255750518.issue26920@psf.upfronthosting.co.za> Message-ID: <1477942567.55.0.853118080407.issue26920@psf.upfronthosting.co.za> Xavier de Gaye added the comment: For the record, on the Android emulator we have now (not sure where this change has been made): >>> sys.getfilesystemencoding() 'utf-8' >>> locale.getpreferredencoding(False) 'ascii' So test_ioencoding_nonascii succeeds now. Anyway the problem with this test is being fixed at issue 19058. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 15:44:08 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 31 Oct 2016 19:44:08 +0000 Subject: [issue26920] android: test_sys fails In-Reply-To: <1462267582.58.0.744255750518.issue26920@psf.upfronthosting.co.za> Message-ID: <1477943048.24.0.922144432308.issue26920@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- assignee: -> xdegaye components: +Interpreter Core -Cross-Build, Extension Modules stage: -> commit review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 15:51:23 2016 From: report at bugs.python.org (Cory Benfield) Date: Mon, 31 Oct 2016 19:51:23 +0000 Subject: [issue28570] httplib mishandles unknown 1XX status codes Message-ID: <1477943483.09.0.68269146794.issue28570@psf.upfronthosting.co.za> New submission from Cory Benfield: Long story short ~~~~~~~~~~~~~~~~ http.client does not tolerate non-100 or 101 status codes from the 1XX block in a sensible manner: it treats them as final responses, rather than as provisional ones. Expected behaviour ~~~~~~~~~~~~~~~~~~ When http.client receives a 1XX status code that it does not recognise, it should either surface these to a user that expects them by means of a callback, or it should ignore them and only show the user the eventual final status code. This is required by RFC 7231 Section 6.2 (Informational 1xx), which reads: > A client MUST be able to parse one or more 1xx responses received prior to a final response, even if the client does not expect one. A user agent MAY ignore unexpected 1xx responses. Actual behaviour ~~~~~~~~~~~~~~~~ http.client treats the 1XX status code as final. It parses the header block as though it were a response in the 2XX or higher range. http.client will assume that there is no content in the 1XX response, and so will leave the following final response unconsumed in the socket buffer. This means that if the HTTPConnection is re-used, the user will see the final response following the 1XX as the response to the next request, even though it is not. Steps to reproduce ~~~~~~~~~~~~~~~~~~ The following "server" can demonstrate the issue: import socket import time document = b''' title

Hello, world!

''' s = socket.socket() s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 8080)) s.listen(5) while True: new_socket, _ = s.accept() data = b'' while not data.endswith(b'\r\n\r\n'): data += new_socket.recv(8192) new_socket.sendall( b'HTTP/1.1 103 Early Hints\r\n' b'Server: socketserver/1.0.0\r\n' b'Link: ; rel=preload; as=style\r\n' b'Link: ; rel=preload; as=script\r\n' b'\r\n' ) time.sleep(1) new_socket.sendall( b'HTTP/1.1 200 OK\r\n' b'Server: socketserver/1.0.0\r\n' b'Content-Type: text/html\r\n' b'Content-Length: %s\r\n' b'Link: ; rel=preload; as=style\r\n' b'Link: ; rel=preload; as=script\r\n' b'Connection: close\r\n' b'\r\n' % len(document) ) new_socket.sendall(document) new_socket.close() If this server is run directly, the following client can be used to test it: from http.client import HTTPConnection c = HTTPConnection('localhost', 8080) c.request('GET', '/') r = c.getresponse() print("Status: {} {}".format(r.status, r.reason)) print("Headers: {}".format(r.getheaders())) print("Body: {}".format(r.read())) This client will print Status: 103 Early Hints Headers: [('Content-Length', '0'), ('Server', 'socketserver/1.0.0'), ('Link', '; rel=preload; as=style'), ('Link', '; rel=preload; as=script')] Body: b'' This response is wrong: the 200 header block is hidden from the client. Unfortunately, http.client doesn't allow us to ask for the next response: another call to "getresponse()" raises a "ResponseNotReady: Idle" exception. ---------- components: Library (Lib) messages: 279823 nosy: Lukasa priority: normal severity: normal status: open title: httplib mishandles unknown 1XX status codes type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 16:09:49 2016 From: report at bugs.python.org (Michael Felt) Date: Mon, 31 Oct 2016 20:09:49 +0000 Subject: [issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine In-Reply-To: <1378731781.77.0.0136191125302.issue18987@psf.upfronthosting.co.za> Message-ID: <1477944589.89.0.171758545564.issue18987@psf.upfronthosting.co.za> Michael Felt added the comment: There are so many places where there are references to where 32-bit and 64-bit are referred to - and, in particular, the value of os.uname()[4] For the discussion I went back to 32-bit Python on AIX A) michael at x071:[/data/prj/python/archive/Python-2.7.3]python Python 2.7.3 (default, Sep 26 2013, 20:43:10) [C] on aix5 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.platform() 'AIX-1-00C291F54C00-powerpc-32bit' >>> import os >>> os.uname()[4] '00C291F54C00' >>> import sys >>> sys.maxsize 2147483647 B) root at x066:~# python Python 2.7.3 (default, Mar 14 2014, 12:37:29) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.platform() 'Linux-3.2.0-4-powerpc64-ppc64-with-debian-7.8' >>> import os >>> os.uname()[4] 'ppc64' >>> import sys >>> sys.maxsize 2147483647 >>> The data comes from the same hardware - just different OS. re: os.uname()[4] and platform.platform() for AIX os.uname()[4] says next to nothing - the only bit relavant to the "machine" are the letters C4 and those are likely to be found on any POWER 32 and 64-bit (no longer have direct access to 32-bit hardware so must trust the documentation on that one) - for AIX platform.platform() does give proper machine and interpreter size. For Linux (debian in this case) os.uname()[4] identifies the hardware platform, and platform.platform() "looks" 64-bit to me, but sys.maxsize clearly shows this is 32-bit. I am willing to work on a patch - even digging on the POWER Linux side as well - but to write a patch the desired output is needed. And, I would suggest replacing the -m output with either -M or -p output: michael at x071:[/data/prj/python/archive/Python-2.7.3]uname -m -M 00C291F54C00 IBM,8203-E4A michael at x071:[/data/prj/python/archive/Python-2.7.3]uname -m -p 00C291F54C00 powerpc Again - what is the preferred output. IMHO - platform.platform() comes very close for what I would be expecting. AIX (noise) powerpc 32bit or AIX (noise) powerpc 64bit Comments? (and has this ever been discussed/specified in a PEP? In another discussion someone mentioned something about a wheel specification - but that refers back to distutils and IMHO this is "core" first, and distutils (should be) following) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 16:34:26 2016 From: report at bugs.python.org (Michael Felt) Date: Mon, 31 Oct 2016 20:34:26 +0000 Subject: [issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine In-Reply-To: <1378731781.77.0.0136191125302.issue18987@psf.upfronthosting.co.za> Message-ID: <1477946066.59.0.592565757131.issue18987@psf.upfronthosting.co.za> Michael Felt added the comment: FYI: This is 'actual' as I am working on an implementation of a cloud-init distro for AIX and it is very difficult to figure out the correct approach for a replacement value for os.uname[4] - when comparing with "Linux" logic I was thinking of using platform.platform().split("-")[3] but both are 32-bit on 64-bit hardware: >>> platform.platform().split("-") ['AIX', '1', '00C291F54C00', 'powerpc', '32bit'] >>> platform.platform().split("-")[4] '32bit' >>> platform.platform().split("-")[3] 'powerpc' >>> platform.platform().split("-") ['Linux', '3.2.0', '4', 'powerpc64', 'ppc64', 'with', 'debian', '7.8'] >>> platform.platform().split("-")[4] 'ppc64' >>> platform.platform().split("-")[3] 'powerpc64' This - also - seems tricky re: the placement of the - >>> platform.platform() 'Linux-3.2.0-4-powerpc64-ppc64-with-debian-7.8' compared with: >>> platform.platform() 'AIX-1-00C291F54C00-powerpc-32bit' Truely, some guidance from "the powers that be" is needed if there is ever to be uniformity. And if it 'cannot' be patched on 'old' versions, at least there will be a way to hack clarity into code (imho, a patch is better rather than hacks creating continued diversity - everyone continues to use their understanding of intent, creating new diverse wishes (aka features not benefits)) for what the code "must" do - because there are so many projects that used it this way (and others that used it that way) .... :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 16:38:01 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 31 Oct 2016 20:38:01 +0000 Subject: [issue28570] httplib mishandles unknown 1XX status codes In-Reply-To: <1477943483.09.0.68269146794.issue28570@psf.upfronthosting.co.za> Message-ID: <1477946281.1.0.404477457487.issue28570@psf.upfronthosting.co.za> SilentGhost added the comment: The fix could be as small as the attached patched, though I'm not sure that is the correct way of handling 101 code. ---------- keywords: +patch nosy: +SilentGhost Added file: http://bugs.python.org/file45296/28570.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 16:49:50 2016 From: report at bugs.python.org (Cory Benfield) Date: Mon, 31 Oct 2016 20:49:50 +0000 Subject: [issue28570] httplib mishandles unknown 1XX status codes In-Reply-To: <1477943483.09.0.68269146794.issue28570@psf.upfronthosting.co.za> Message-ID: <1477946990.76.0.212658290121.issue28570@psf.upfronthosting.co.za> Cory Benfield added the comment: 101 should probably be special-cased, because in that case the underlying protocol is being totally changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 17:19:59 2016 From: report at bugs.python.org (=?utf-8?b?TGx1w61z?=) Date: Mon, 31 Oct 2016 21:19:59 +0000 Subject: [issue28571] llist and scipy.stats conflicts, python segfault Message-ID: <1477948799.58.0.602345743052.issue28571@psf.upfronthosting.co.za> New submission from Llu?s: I'm running this small script that produces a segfault: https://gist.github.com/anonymous/d24748d5b6de88b31f18965932744211 My python version is Python 3.5.2 (default, Jun 28 2016, 08:46:01) [GCC 6.1.1 20160602] on linux. And running scipy version 0.18.1. Can someone confirm if this segfaults with other systems ? ---------- components: Interpreter Core messages: 279828 nosy: Llu?s priority: normal severity: normal status: open title: llist and scipy.stats conflicts, python segfault type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 17:21:59 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Oct 2016 21:21:59 +0000 Subject: [issue28572] IDLE: add tests for config dialog. Message-ID: <1477948919.57.0.703261528011.issue28572@psf.upfronthosting.co.za> New submission from Terry J. Reedy: The current test_configdialog creates an instance of ConfigDialog. Time to add some real tests so I can comfortably work on multiple other configdialog issues. The challenge is to do it so tests run without a blocking mainloop call and without IDLE's tcl update calls. Explicit root.update call can be added if needed. I also want to test without making the dialog visible. This is a problem for at least some event_generate calls, but their seem to be (mostly) better options. Buttons and Radiobuttons for both tk and ttk have an invoke method that works fine. Entry widget insert seems to work also to trigger that test action. Attached are partial tests for two of the four main tabs. ---------- assignee: terry.reedy files: config_dialog_test.diff keywords: patch messages: 279829 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: add tests for config dialog. type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45297/config_dialog_test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 17:25:09 2016 From: report at bugs.python.org (=?utf-8?b?TGx1w61z?=) Date: Mon, 31 Oct 2016 21:25:09 +0000 Subject: [issue28571] llist and scipy.stats conflicts, python segfault In-Reply-To: <1477948799.58.0.602345743052.issue28571@psf.upfronthosting.co.za> Message-ID: <1477949109.65.0.115908191493.issue28571@psf.upfronthosting.co.za> Llu?s added the comment: Confirmed with 2.7 as well. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 17:27:00 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Oct 2016 21:27:00 +0000 Subject: [issue28572] IDLE: add tests for config dialog. In-Reply-To: <1477948919.57.0.703261528011.issue28572@psf.upfronthosting.co.za> Message-ID: <1477949220.73.0.60909492226.issue28572@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Patch makes two types of change to configdialog. 1. Make tested widgets visible to their methods can be called. 2. Delete an erroneous command argument for General tab radiobutton. Calling SetKeysType on the General tab just redid adjustments on the Keys tab that were already done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 17:30:29 2016 From: report at bugs.python.org (Dave T) Date: Mon, 31 Oct 2016 21:30:29 +0000 Subject: [issue22595] F5 shortcut key not working in IDLE for OSX In-Reply-To: <1412927822.17.0.886129878448.issue22595@psf.upfronthosting.co.za> Message-ID: <1477949429.45.0.640647862367.issue22595@psf.upfronthosting.co.za> Dave T added the comment: Its on a windows 10 It doesn't come with the run application but the debug ---------- nosy: +Dave T versions: +Python 2.7 -Python 3.5 Added file: http://bugs.python.org/file45298/Py 2.7.JPG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 17:30:43 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 31 Oct 2016 21:30:43 +0000 Subject: [issue28571] llist and scipy.stats conflicts, python segfault In-Reply-To: <1477948799.58.0.602345743052.issue28571@psf.upfronthosting.co.za> Message-ID: <1477949443.33.0.755860673.issue28571@psf.upfronthosting.co.za> R. David Murray added the comment: This involves two third party C extensions, so there isn't really anything for us to do here until those projects have taken a look. If they can identify a CPython bug causing this, then we can do something. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 17:47:43 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 31 Oct 2016 21:47:43 +0000 Subject: [issue28572] IDLE: add tests for config dialog. In-Reply-To: <1477948919.57.0.703261528011.issue28572@psf.upfronthosting.co.za> Message-ID: <1477950463.98.0.428146075528.issue28572@psf.upfronthosting.co.za> Terry J. Reedy added the comment: msg279176 of #27755 describe experiments with ttk.combobox. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 17:59:40 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 31 Oct 2016 21:59:40 +0000 Subject: [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477951180.49.0.801253170391.issue28513@psf.upfronthosting.co.za> Martin Panter added the comment: Apparently (haven?t tried myself) if you put ?.. program:: zipfile? before the :option: invocations, it changes the default context and you don?t need the bit. The text in general looks fine. One very minor thing: I would use a hyphen when ?command line? is a modifier on another noun, i.e. command-line interface, command-line options. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 19:37:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Oct 2016 23:37:08 +0000 Subject: [issue28028] Convert warnings to SyntaxWarning in parser In-Reply-To: <1473362584.72.0.509126494717.issue28028@psf.upfronthosting.co.za> Message-ID: <20161031233705.114717.67214.EFFEB461@psf.io> Roundup Robot added the comment: New changeset 88e3df38d591 by Ned Deily in branch '3.6': Issue #28028: Update OS X installers to use SQLite 3.14.2. https://hg.python.org/cpython/rev/88e3df38d591 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 19:37:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Oct 2016 23:37:08 +0000 Subject: [issue28208] update sqlite to 3.14.2 In-Reply-To: <1474317408.19.0.662096879681.issue28208@psf.upfronthosting.co.za> Message-ID: <20161031233705.114717.3348.5CF96BA4@psf.io> Roundup Robot added the comment: New changeset 7e48e0557152 by Ned Deily in branch 'default': Issue #28208: merge from 3.6 https://hg.python.org/cpython/rev/7e48e0557152 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 19:42:13 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 31 Oct 2016 23:42:13 +0000 Subject: [issue28208] update sqlite to 3.14.2 In-Reply-To: <1474317408.19.0.662096879681.issue28208@psf.upfronthosting.co.za> Message-ID: <1477957333.55.0.429414844406.issue28208@psf.upfronthosting.co.za> Ned Deily added the comment: [typo in commit message, should be #28208] New changeset 88e3df38d591 by Ned Deily in branch '3.6': Issue #28028: Update OS X installers to use SQLite 3.14.2. https://hg.python.org/cpython/rev/88e3df38d591 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 19:42:24 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 31 Oct 2016 23:42:24 +0000 Subject: [issue28028] Convert warnings to SyntaxWarning in parser In-Reply-To: <1473362584.72.0.509126494717.issue28028@psf.upfronthosting.co.za> Message-ID: <1477957344.2.0.417189918665.issue28028@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- Removed message: http://bugs.python.org/msg279836 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 19:44:15 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 31 Oct 2016 23:44:15 +0000 Subject: [issue28208] update sqlite to 3.14.2 In-Reply-To: <1474317408.19.0.662096879681.issue28208@psf.upfronthosting.co.za> Message-ID: <1477957455.83.0.968660912003.issue28208@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch, Mariatta! Pushed for release in 3.6.0b3. ---------- priority: release blocker -> resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 19:53:31 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 31 Oct 2016 23:53:31 +0000 Subject: [issue28530] Howto detect if an object is of type os.DirEntry In-Reply-To: <1477410376.41.0.315236150527.issue28530@psf.upfronthosting.co.za> Message-ID: <1477958011.29.0.104536804574.issue28530@psf.upfronthosting.co.za> Eryk Sun added the comment: To clarify, DirEntry is only exposed in the posix/nt and os modules starting in 3.6. To get a reference to it in 3.5 you have to fall back on something like the following: import os try: from os import DirEntry except ImportError: import tempfile with tempfile.NamedTemporaryFile() as ftemp: scan = os.scandir(os.path.dirname(ftemp.name)) DirEntry = type(next(scan)) del scan, ftemp, tempfile In 3.5 os.scandir does not support the with statement or raise a resource warning. That behavior was added in 3.6, for which the workaround shouldn't be required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 19:53:40 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 23:53:40 +0000 Subject: [issue28564] shutil.rmtree is inefficient due to listdir() instead of scandir() In-Reply-To: <1477857759.23.0.231777495226.issue28564@psf.upfronthosting.co.za> Message-ID: <1477958020.27.0.102223822035.issue28564@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add support of file descriptor in os.scandir() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 19:57:08 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 31 Oct 2016 23:57:08 +0000 Subject: [issue28570] httplib mishandles unknown 1XX status codes In-Reply-To: <1477943483.09.0.68269146794.issue28570@psf.upfronthosting.co.za> Message-ID: <1477958228.8.0.138807373976.issue28570@psf.upfronthosting.co.za> Martin Panter added the comment: Consuming and ignoring 1xx responses seems reasonable for general cases. Treating 101 (Switching Protocols) as a special case also seems reasonable. I also agree it would be good to provide an API to return these responses (at least after the request is completely sent). Perhaps a new flag, c.getresponse(informational=True), or a new method, c.get_informational_response(timeout=...). The timeout is for servers that do not support ?Expect: 100-continue? mode; see Issue 1346874. There is also Issue 25919 discussing how to handle responses (including 1xx) while concurrently sending the request. That is a harder problem, but may be solvable with a few new APIs. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 19:59:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Oct 2016 23:59:11 +0000 Subject: [issue28248] Upgrade installers to OpenSSL 1.0.2j In-Reply-To: <1474552584.95.0.0318594270303.issue28248@psf.upfronthosting.co.za> Message-ID: <20161031235908.45150.9820.E723B204@psf.io> Roundup Robot added the comment: New changeset 33ad26897e30 by Ned Deily in branch '2.7': Issue #28248: Update macOS installer build to use OpenSSL 1.0.2j. https://hg.python.org/cpython/rev/33ad26897e30 New changeset a8799a63feb7 by Ned Deily in branch '3.5': Issue #28248: Update macOS installer build to use OpenSSL 1.0.2j. https://hg.python.org/cpython/rev/a8799a63feb7 New changeset c7e551f8c5d8 by Ned Deily in branch '3.6': Issue #28248: merge from 3.5 https://hg.python.org/cpython/rev/c7e551f8c5d8 New changeset 9e66ffa7a791 by Ned Deily in branch 'default': Issue #28248: merge from 3.6 https://hg.python.org/cpython/rev/9e66ffa7a791 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 20:02:53 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Nov 2016 00:02:53 +0000 Subject: [issue28248] Upgrade installers to OpenSSL 1.0.2j In-Reply-To: <1474552584.95.0.0318594270303.issue28248@psf.upfronthosting.co.za> Message-ID: <1477958573.51.0.125208971149.issue28248@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch, Mariatta. Pushed for released in 2.7.13, 3.5.3, and 3.6.0b3. ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 20:29:48 2016 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 01 Nov 2016 00:29:48 +0000 Subject: [issue28385] Bytes objects should reject all formatting codes with an error message In-Reply-To: <1475850520.09.0.230705784029.issue28385@psf.upfronthosting.co.za> Message-ID: <1477960188.81.0.0634696204733.issue28385@psf.upfronthosting.co.za> Eric V. Smith added the comment: I don't have a strong feeling one way or the other. I'd be surprised if anyone is catching these errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 21:12:25 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 01 Nov 2016 01:12:25 +0000 Subject: [issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return In-Reply-To: <1473760278.9.0.335020145509.issue28123@psf.upfronthosting.co.za> Message-ID: <1477962745.47.0.0227943496149.issue28123@psf.upfronthosting.co.za> Changes by Xiang Zhang : Added file: http://bugs.python.org/file45299/issue28123_v5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 21:24:00 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 01 Nov 2016 01:24:00 +0000 Subject: [issue28542] document cross compilation In-Reply-To: <1477563460.46.0.569265292251.issue28542@psf.upfronthosting.co.za> Message-ID: <1477963440.25.0.380595304901.issue28542@psf.upfronthosting.co.za> Martin Panter added the comment: Regarding 2.7, I guess it depends on your definition of ?support?. People have been cross-compiling Python 2.7 longer than I have been working on Python. In the past I have tried to apply cross compilation fixes to 2.7. But if you are only confident about 3.6, let?s just stick with that for the moment. FWIW, DESTDIR, --prefix, etc are not specific to cross compilation or Android. DESTDIR is also useful when building a package/tarball or whatever, rather than installing directly. And --prefix would be useful if you don?t have root access and want to install to $HOME or somewhere. These settings are mentioned in the 2.7 README, but it looks like Guido trimmed them out for Python 3.0 (revision 07d67a9725a7). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 21:29:20 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 01 Nov 2016 01:29:20 +0000 Subject: [issue12857] Expose called function on frame object In-Reply-To: <1314683667.85.0.876885324202.issue12857@psf.upfronthosting.co.za> Message-ID: <1477963760.16.0.487006319057.issue12857@psf.upfronthosting.co.za> Nick Coghlan added the comment: This topic came up in a discussion I was having with Yury, and thanks to generators and coroutines, I don't think "f_func" would be the right name for an attribute like this, with something more neutral like "f_origin" potentially being preferable The specific runtime debugging use case I have in mind is this: 1. Given a frame reference, navigate to the generator-iterator or coroutine that spawned that frame 2. Given gi_back and cr_back doubly-linked counterparts to the current gi_yieldfrom and cr_await introspection attributes on generators and coroutines, expose the relevant generator and/or coroutine stack in addition to the frame stack These secondary stacks could then potentially be incorporated into traceback outputs by default ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 21:45:31 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 01 Nov 2016 01:45:31 +0000 Subject: [issue28548] http.server parse_request() bug and error reporting In-Reply-To: <1477670229.81.0.419990644201.issue28548@psf.upfronthosting.co.za> Message-ID: <1477964731.33.0.663879174614.issue28548@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- versions: +Python 3.7 -Python 3.5 Added file: http://bugs.python.org/file45300/parse-version.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 22:45:26 2016 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 01 Nov 2016 02:45:26 +0000 Subject: [issue12857] Expose called function on frame object In-Reply-To: <1314683667.85.0.876885324202.issue12857@psf.upfronthosting.co.za> Message-ID: <1477968326.3.0.565044310687.issue12857@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 23:59:07 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 01 Nov 2016 03:59:07 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> Message-ID: <1477972747.88.0.41047745222.issue27781@psf.upfronthosting.co.za> Steve Dower added the comment: Before 3.6.0 beta 4 I need to make this change permanent. From memory, it's just an exception message that needs changing (and PEP 529 becomes final), but I'll review the changeset to be sure. ---------- nosy: +ned.deily priority: normal -> release blocker stage: commit review -> needs patch versions: +Python 3.7 _______________________________________ Python tracker _______________________________________