From report at bugs.python.org Sun Sep 1 00:13:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 31 Aug 2013 22:13:55 +0000 Subject: [issue18720] Switch suitable constants in the socket module to IntEnum In-Reply-To: <1376341849.32.0.0261370392458.issue18720@psf.upfronthosting.co.za> Message-ID: <3cSBfV6DXNzSbD@mail.python.org> Roundup Robot added the comment: New changeset 038543d34166 by Eli Bendersky in branch 'default': Switch the AF_* and SOCK_* constants in the socket module to IntEnum. http://hg.python.org/cpython/rev/038543d34166 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 00:16:16 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 31 Aug 2013 22:16:16 +0000 Subject: [issue18738] String formatting (% and str.format) issues with Enum In-Reply-To: <1376488136.41.0.00729697162282.issue18738@psf.upfronthosting.co.za> Message-ID: <1377987376.22.0.613222519232.issue18738@psf.upfronthosting.co.za> Ethan Furman added the comment: Okay, the final final patch. ;) ---------- Added file: http://bugs.python.org/file31539/issue18738.stoneleaf.05.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 00:18:38 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 31 Aug 2013 22:18:38 +0000 Subject: [issue18720] Switch suitable constants in the socket module to IntEnum In-Reply-To: <1377870942.88.0.889170323179.issue18720@psf.upfronthosting.co.za> Message-ID: <52226BC0.1040601@stoneleaf.us> Ethan Furman added the comment: Eli Bendersky added the comment: > > Another issue is _intenum_converter. Ethan - do you think it belongs in the enum module as a helper function or something of the sort? I'm fine with it being a non-public member of enum, although if we had a place for miscellaneous tools that might be a better spot for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 00:19:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 31 Aug 2013 22:19:13 +0000 Subject: [issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period In-Reply-To: <1376427240.14.0.584954211651.issue18730@psf.upfronthosting.co.za> Message-ID: <3cSBmd07hzzPkT@mail.python.org> Roundup Robot added the comment: New changeset 4d604f1f0219 by Eli Bendersky in branch 'default': Update whatsnew/3.4.rst wrt. the socket constants switch to IntEnum http://hg.python.org/cpython/rev/4d604f1f0219 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 00:21:55 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 31 Aug 2013 22:21:55 +0000 Subject: [issue18720] Switch suitable constants in the socket module to IntEnum In-Reply-To: <52226BC0.1040601@stoneleaf.us> Message-ID: Eli Bendersky added the comment: On Sat, Aug 31, 2013 at 3:18 PM, Ethan Furman wrote: > > Ethan Furman added the comment: > > Eli Bendersky added the comment: > > > > Another issue is _intenum_converter. Ethan - do you think it belongs in > the enum module as a helper function or something of the sort? > > I'm fine with it being a non-public member of enum, although if we had a > place for miscellaneous tools that might be a > better spot for it. > For the time being, I'm OK with Guido's suggestion to keep it lazy. As long as it's just being used in a single module, there's not much to think about. If we end up needing it when switching other modules, we'll see what to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 00:22:11 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 31 Aug 2013 22:22:11 +0000 Subject: [issue18738] String formatting (% and str.format) issues with Enum In-Reply-To: <1376488136.41.0.00729697162282.issue18738@psf.upfronthosting.co.za> Message-ID: <1377987731.08.0.678877257083.issue18738@psf.upfronthosting.co.za> Eli Bendersky added the comment: lgtm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 00:26:15 2013 From: report at bugs.python.org (Martin Mokrejs) Date: Sat, 31 Aug 2013 22:26:15 +0000 Subject: [issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173 Message-ID: <1377987974.98.0.815254157912.issue18897@psf.upfronthosting.co.za> New submission from Martin Mokrejs: I was trying to use DUMA to find errors in python runtime and it indeed killed python-based utility called emerge. Let's see what you say now: # export LD_PRELOAD=/usr/lib64/libduma.so.0.0.0 # sysctl -w vm.max_map_count=1000000 # emerge dev-lang/python:2.7 DUMA 2.5.15 (shared library, NO_LEAKDETECTION) Copyright (C) 2006 Michael Eddington Copyright (C) 2002-2008 Hayati Ayguen , Procitec GmbH Copyright (C) 1987-1999 Bruce Perens DUMA 2.5.15 (shared library, NO_LEAKDETECTION) Copyright (C) 2006 Michael Eddington Copyright (C) 2002-2008 Hayati Ayguen , Procitec GmbH Copyright (C) 1987-1999 Bruce Perens DUMA 2.5.15 (shared library, NO_LEAKDETECTION) Copyright (C) 2006 Michael Eddington Copyright (C) 2002-2008 Hayati Ayguen , Procitec GmbH Copyright (C) 1987-1999 Bruce Perens DUMA Aborting: mprotect() failed: Cannot allocate memory. Check README section 'MEMORY USAGE AND EXECUTION SPEED' if your (Linux) system may limit the number of different page mappings per process Illegal instruction (core dumped) # ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 127104 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 127104 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited # (gdb) where #0 0x00007febd6ed84d7 in kill () from /lib64/libc.so.6 #1 0x00007febd78e2f9c in DUMA_Abort () from /usr/lib64/libduma.so.0.0.0 #2 0x00007febd78e1b77 in _duma_allocate () from /usr/lib64/libduma.so.0.0.0 #3 0x00007febd78e1fef in _duma_malloc () from /usr/lib64/libduma.so.0.0.0 #4 0x00007febd7626c60 in sre_umatch (state=0x7fff96f0de10, pattern=0x7feb2804ecb8) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_sre.c:1173 #5 0x00007febd762932f in pattern_match (self=0x7feb2804ec58, args=(u'>=gnome-base/libbonobo-2.32::gentoo-haskell',), kw=0x0) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_sre.c:1896 #6 0x00007febd751ffcc in PyCFunction_Call (func=, arg=(u'>=gnome-base/libbonobo-2.32::gentoo-haskell',), kw=0x0) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Objects/methodobject.c:85 #7 0x00007febd75c4b81 in call_function (pp_stack=0x7fff96f0e6d0, oparg=1) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Python/ceval.c:4021 #8 0x00007febd75bf6c6 in PyEval_EvalFrameEx (f=Frame 0x7feb374ebce8, for file /usr/lib64/portage/pym/portage/dep/__init__.py, line 1227, in __init__ (self=, s=u'>=gnome-base/libbonobo-2.32::gentoo-haskell', unevaluated_atom=None, allow_wildcard=True, allow_repo=True, _use=None, eapi=None, is_valid_flag=None, eapi_attrs=<_eapi_attrs at remote 0x7feb31931f48>, atom_re=<_sre.SRE_Pattern at remote 0x7feb2804ec58>, blocker_prefix=u'', blocker=False), throwflag=0) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Python/ceval.c:2666 [cut] (gdb) bt full #0 0x00007febd6ed84d7 in kill () from /lib64/libc.so.6 No symbol table info available. #1 0x00007febd78e2f9c in DUMA_Abort () from /usr/lib64/libduma.so.0.0.0 No symbol table info available. #2 0x00007febd78e1b77 in _duma_allocate () from /usr/lib64/libduma.so.0.0.0 No symbol table info available. #3 0x00007febd78e1fef in _duma_malloc () from /usr/lib64/libduma.so.0.0.0 No symbol table info available. #4 0x00007febd7626c60 in sre_umatch (state=0x7fff96f0de10, pattern=0x7feb2804ecb8) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_sre.c:1173 end = 0x7fea931cfffc alloc_pos = 1648 ctx_pos = 1648 i = 128 ret = 0 jump = 2 sigcount = 187 ctx = 0x7fea931fbcf8 nextctx = 0x7fea931fbcf8 __PRETTY_FUNCTION__ = "sre_umatch" #5 0x00007febd762932f in pattern_match (self=0x7feb2804ec58, args=(u'>=gnome-base/libbonobo-2.32::gentoo-haskell',), kw=0x0) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/_sre.c:1896 state = {ptr = 0x7fea931cffbc, beginning = 0x7fea931cff50, start = 0x7fea931cff50, end = 0x7fea931cfffc, string = u'>=gnome-base/libbonobo-2.32::gentoo-haskell', pos = 0, endpos = 43, charsize = 4, lastindex = 2, lastmark = 43, mark = {0x7fea931cff50, 0x0, 0x7fea931cff50, 0x7fea931cffbc, 0x7fea931cff50, 0x7fea931cff58, 0x7fea931cff58, 0x7fea931cffbc, 0x7fea931cff58, 0x7fea931cffa8, 0x0 , 0x7fea931cffac, 0x7fea931cffb0, 0x7fea931cffb0, 0x7fea931cffbc, 0x7fea931cffb0, 0x7fea931cffbc, 0x7fea931cffbc, 0x7fea931cffbc, 0x7fea931cffbc, 0x7fea931cffbc, 0x0 , 0x7fea931cffbc, 0x0, 0x7fea931cffc0, 0x0 }, data_stack = 0x7fea931fb688 "\377\377\377\377\377\377\377\377", data_stack_size = 2424, data_stack_base = 1712, repeat = 0x0, lower = 0x7febd7620852 } status = 32746 string = u'>=gnome-base/libbonobo-2.32::gentoo-haskell' start = 0 end = 9223372036854775807 kwlist = {0x7febd7660ad8 "pattern", 0x7febd7660cd9 "pos", 0x7febd7660cdd "endpos", 0x0} #6 0x00007febd751ffcc in PyCFunction_Call (func=, arg=(u'>=gnome-base/libbonobo-2.32::gentoo-haskell',), kw=0x0) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Objects/methodobject.c:85 f = 0x7feb37087fc8 meth = 0x7febd76291f7 self = <_sre.SRE_Pattern at remote 0x7feb2804ec58> size = -1282872823 #7 0x00007febd75c4b81 in call_function (pp_stack=0x7fff96f0e6d0, oparg=1) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Python/ceval.c:4021 callargs = (u'>=gnome-base/libbonobo-2.32::gentoo-haskell',) flags = 3 tstate = 0x7febd7bd1f58 na = 1 nk = 0 n = 1 pfunc = 0x7feb374ebf88 func = x = <_sre.SRE_Pattern at remote 0x7feb2804ec58> w = 0x0 #8 0x00007febd75bf6c6 in PyEval_EvalFrameEx (f=Frame 0x7feb374ebce8, for file /usr/lib64/portage/pym/portage/dep/__init__.py, line 1227, in __init__ (self=, s=u'>=gnome-base/libbonobo-2.32::gentoo-haskell', unevaluated_atom=None, allow_wildcard=True, allow_repo=True, _use=None, eapi=None, is_valid_flag=None, eapi_attrs=<_eapi_attrs at remote 0x7feb31931f48>, atom_re=<_sre.SRE_Pattern at remote 0x7feb2804ec58>, blocker_prefix=u'', blocker=False), throwflag=0) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Python/ceval.c:2666 sp = 0x7feb374ebf90 stack_pointer = 0x7feb374ebf98 next_instr = 0x7feb930726fd "}\f" opcode = 131 oparg = 1 why = WHY_NOT err = 0 x = u'>=gnome-base/libbonobo-2.32::gentoo-haskell' v = w = 'match' u = False t = stream = 0x0 fastlocals = 0x7feb374ebe70 freevars = 0x7feb374ebf88 retval = 0x0 tstate = 0x7febd7bd1f58 co = 0x7feb92e96f70 instr_ub = -1 instr_lb = 0 instr_prev = -1 [cut] ---------- components: Interpreter Core files: core.emerge.4097.gdb.txt messages: 196684 nosy: mmokrejs priority: normal severity: normal status: open title: Illegal instruction at Python-2.7.5/Modules/_sre.c:1173 type: crash versions: Python 2.7 Added file: http://bugs.python.org/file31540/core.emerge.4097.gdb.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 00:28:16 2013 From: report at bugs.python.org (Martin Mokrejs) Date: Sat, 31 Aug 2013 22:28:16 +0000 Subject: [issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173 In-Reply-To: <1377987974.98.0.815254157912.issue18897@psf.upfronthosting.co.za> Message-ID: <1377988096.34.0.578555108498.issue18897@psf.upfronthosting.co.za> Martin Mokrejs added the comment: To a naive user two places with numbers are in the stacktrace: size = -1282872823 and instr_ub = -1 instr_lb = 0 instr_prev = -1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 00:46:16 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Aug 2013 22:46:16 +0000 Subject: [issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173 In-Reply-To: <1377987974.98.0.815254157912.issue18897@psf.upfronthosting.co.za> Message-ID: <1377989176.74.0.969528844725.issue18897@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is a malloc() failure, not a Python bug ("DUMA Aborting: mprotect() failed: Cannot allocate memory"). Line 1173 in _sre.c allocates a fixed-sized structure (SRE_REPEAT): ctx->u.rep = (SRE_REPEAT*) PyObject_MALLOC(sizeof(*ctx->u.rep)); That structure is probably 32 bytes long in 64-bit mode. ---------- nosy: +haypo, pitrou resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 00:49:10 2013 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 31 Aug 2013 22:49:10 +0000 Subject: [issue18738] String formatting (% and str.format) issues with Enum In-Reply-To: <1376488136.41.0.00729697162282.issue18738@psf.upfronthosting.co.za> Message-ID: <1377989350.04.0.634207467603.issue18738@psf.upfronthosting.co.za> Eric V. Smith added the comment: Looks good to me, too. Thanks for considering all of the feedback! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 01:16:37 2013 From: report at bugs.python.org (Martin Mokrejs) Date: Sat, 31 Aug 2013 23:16:37 +0000 Subject: [issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173 In-Reply-To: <1377987974.98.0.815254157912.issue18897@psf.upfronthosting.co.za> Message-ID: <1377990997.61.0.808263479972.issue18897@psf.upfronthosting.co.za> Martin Mokrejs added the comment: I was actually printing every 10 seconds how much memory it was using, the last before got killed was: PID VSZ RSS TIME ELAPSED %CPU %MEM COMMAND 4097 4938188 2445712 00:22:44 25:04 90.7 15.0 /usr/bin/python2.7 /usr/bin/emerge dev-lang/python:2.7 Provided I have 16GB RAM then maybe it was really some limit in the Bourne shell or OS which prevented DUMA to obtain more memory. But my own python-based app can can grow to even 12GB RSS on this computer so I wonder what limit would be the cause. Probably some overhead due to DUMA. I increased shell limits and looks it can continue further so far: vostro crashtest # ulimit -l unlimited vostro crashtest # ulimit -s unlimited vostro crashtest # ulimit -i unlimited vostro crashtest # vostro crashtest # ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) unlimited cpu time (seconds, -t) unlimited max user processes (-u) 127104 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited # Currently the emerge through DUMA is at: PID VSZ RSS TIME ELAPSED %CPU %MEM COMMAND 9528 6121764 3041960 00:34:16 56:05 61.1 18.6 /usr/bin/python2.7 /usr/bin/emerge dev-lang/python:2.7 and still continues ... Sorry, should better read the main STDERR output before diving into gdb stacktraces. I thought those negative numbers are a true sign of an error. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 01:25:16 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 31 Aug 2013 23:25:16 +0000 Subject: [issue18897] Illegal instruction at Python-2.7.5/Modules/_sre.c:1173 In-Reply-To: <1377987974.98.0.815254157912.issue18897@psf.upfronthosting.co.za> Message-ID: <1377991516.33.0.278379786429.issue18897@psf.upfronthosting.co.za> Tim Peters added the comment: Note this line in your first post: DUMA Aborting: mprotect() failed: Cannot allocate memory. Python never calls mprotect(), but DUMA() probably does. Also note what it said after that: Check README section 'MEMORY USAGE AND EXECUTION SPEED' if your (Linux) system may limit the number of different page mappings per process That is, it may be a limitation of your kernel. In any case, there's no Python issue here, so closing this. ---------- nosy: +tim.peters stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 02:04:15 2013 From: report at bugs.python.org (Martin Mokrejs) Date: Sun, 01 Sep 2013 00:04:15 +0000 Subject: [issue17628] str==str: compare the first character before calling memcmp() In-Reply-To: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> Message-ID: <1377993855.48.0.423478155584.issue17628@psf.upfronthosting.co.za> Martin Mokrejs added the comment: Regarding benchmarking and code performance inspection, maybe you want to try on your linux box: perf top perf stat /usr/bin/python mytest.py http://perf.wiki.kernel.org/ ---------- nosy: +mmokrejs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 02:26:08 2013 From: report at bugs.python.org (Stephen J. Turnbull) Date: Sun, 01 Sep 2013 00:26:08 +0000 Subject: [issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689 In-Reply-To: <1377534511.92.0.663269448586.issue18843@psf.upfronthosting.co.za> Message-ID: <1377995168.27.0.820602922435.issue18843@psf.upfronthosting.co.za> Stephen J. Turnbull added the comment: OK, I backed off the aggressive CFLAGS/CXXFLAGS to " -ggdb -pipe", and ran "emerge =dev-lang/python-2.7.5-r1" *once* each with and without the 'EXTRA_ECONF="--with-pydebug"' flag. Compiled with GCC 4.7.3. No crash, same test results as described previously for GCC 4.6.4. If you have other suggestions, let me know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 02:33:22 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 00:33:22 +0000 Subject: [issue18835] Add aligned memroy variants to the suite of PyMem functions/macros In-Reply-To: <1377484371.18.0.399621580043.issue18835@psf.upfronthosting.co.za> Message-ID: <1377995602.25.0.838170574477.issue18835@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Adding yet another API to allocate memory has a cost Please don't FUD this one to death. Aligned memory access is sometimes important and we currently have no straight-forward way to achieve it. If you're truly worried about adding single new function to the public C API, we can create just a single internal function: void *PyMem_RawMallocAligned(size_t size, size_t alignment). > aligning every data structure on a cacheline boundary > doesn't sound like a very good idea We don't have to align EVERY data structure. But I do have immediate beneficial use cases for set tables and for data blocks in deque objects. I need this function and would appreciate your help in fitting it in nicely with the current memory management functions and macros. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 02:33:44 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 00:33:44 +0000 Subject: [issue18835] Add aligned memory variants to the suite of PyMem functions/macros In-Reply-To: <1377484371.18.0.399621580043.issue18835@psf.upfronthosting.co.za> Message-ID: <1377995624.36.0.798359421491.issue18835@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- title: Add aligned memroy variants to the suite of PyMem functions/macros -> Add aligned memory variants to the suite of PyMem functions/macros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 02:35:47 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 00:35:47 +0000 Subject: [issue18835] Add aligned memory variants to the suite of PyMem functions/macros In-Reply-To: <1377484371.18.0.399621580043.issue18835@psf.upfronthosting.co.za> Message-ID: <1377995747.2.0.911587716216.issue18835@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg196692 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 02:36:11 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 00:36:11 +0000 Subject: [issue18835] Add aligned memory variants to the suite of PyMem functions/macros In-Reply-To: <1377484371.18.0.399621580043.issue18835@psf.upfronthosting.co.za> Message-ID: <1377995771.98.0.681989822972.issue18835@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Adding yet another API to allocate memory has a cost Please don't FUD this one to death. Aligned memory access is sometimes important and we currently have no straight-forward way to achieve it. If you're truly worried about adding single new function to the public C API, we can create just a single internal function: void * _PyMem_RawMallocAligned(size_t size, size_t alignment). > aligning every data structure on a cacheline boundary > doesn't sound like a very good idea We don't have to align EVERY data structure. But I do have immediate beneficial use cases for set tables and for data blocks in deque objects. I need this function and would appreciate your help in fitting it in nicely with the current memory management functions and macros. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 02:47:56 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 01 Sep 2013 00:47:56 +0000 Subject: [issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689 In-Reply-To: <1377534511.92.0.663269448586.issue18843@psf.upfronthosting.co.za> Message-ID: <1377996476.5.0.136828235745.issue18843@psf.upfronthosting.co.za> Tim Peters added the comment: Thanks for that, Stephen! I don't know of anything else you could try that would be helpful. The OP doesn't appear able to reproduce his problems either, and last I heard he was off running `emerge` under DUMA: http://duma.sourceforge.net/ Why? Hope springs eternal ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 03:46:28 2013 From: report at bugs.python.org (Stephen J. Turnbull) Date: Sun, 01 Sep 2013 01:46:28 +0000 Subject: [issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689 In-Reply-To: <1377534511.92.0.663269448586.issue18843@psf.upfronthosting.co.za> Message-ID: <1377999988.51.0.70377220492.issue18843@psf.upfronthosting.co.za> Stephen J. Turnbull added the comment: Yeah, hope is a good thing. But I've spent the last 20 years debugging an X11 application based on a Lisp interpreter, I save hope for fireflies, my dog, and my daughter these days. :-) To the OP: I don't follow Gentoo closely, but I have acquaintances who do. Between them and the occasional foray into the forums, I've gotten the impression that providing CFLAGS for optimization is associated with having hard-to-debug problems. They increase performance noticably only in a few applications. Python being a dynamic language, function calls and even variable references can be quite inefficient anyway. So I see no good reason to compile Python with aggressive CFLAGS, because it should be used only for moderately performance sensitive applications and as "glue code" and to provide UI. Instead, use them only for the specific applications that benefit (I suppose matplotlib *might* be one). Second, I tend to agree with the maintainers. The packages.env / pydebug.conf approach is the right thing for this kind of variant build. Third, you said you hoped to get better backtraces from --with-pydebug. That's a vain hope. Such options are intended to get better backtraces of C code from coredumps where the interpreter breaks down, not of Python code induced by Python exceptions caused by problems in user code. If you have trouble interpreting a backtrace, ask on python-list at python.org or comp.lang.python (they mirror each other, you only need one). If, after understanding the backtrace, you have an idea for way to get a better backtrace in this case, you can suggest it on python-ideas at python.org. Unfortunately, reporting "this backtrace is unintelligible, please improve it" as an RFE on the tracker is likely to get the reply "You're right, but we don't know how at this time. Patches welcome!" But you could try that if all else fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 03:58:54 2013 From: report at bugs.python.org (Martin Panter) Date: Sun, 01 Sep 2013 01:58:54 +0000 Subject: [issue18335] Add textwrap.dedent, .indent, as str methods. In-Reply-To: <1372656829.33.0.351971247179.issue18335@psf.upfronthosting.co.za> Message-ID: <1378000734.59.0.18123441179.issue18335@psf.upfronthosting.co.za> Martin Panter added the comment: If this goes ahead, would a bytes.dedent() method be also considered? I recently discovered that textwrap.dedent() does not work on bytes() in Python 3. I would have used it for the contents of an input file in a test case. For the record there?s an older issue 1237680 on this, rejected in 2005. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 04:18:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 Sep 2013 02:18:13 +0000 Subject: [issue18738] String formatting (% and str.format) issues with Enum In-Reply-To: <1376488136.41.0.00729697162282.issue18738@psf.upfronthosting.co.za> Message-ID: <3cSJ4N2yNBzSCt@mail.python.org> Roundup Robot added the comment: New changeset 058cb219b3b5 by Ethan Furman in branch 'default': Close #18738: Route __format__ calls to mixed-in type for mixed Enums (such as IntEnum). http://hg.python.org/cpython/rev/058cb219b3b5 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 04:27:13 2013 From: report at bugs.python.org (Ethan Furman) Date: Sun, 01 Sep 2013 02:27:13 +0000 Subject: [issue18745] Test enum in test_json is ignorant of infinity value In-Reply-To: <1376553540.47.0.197538167938.issue18745@psf.upfronthosting.co.za> Message-ID: <1378002433.02.0.681655371071.issue18745@psf.upfronthosting.co.za> Ethan Furman added the comment: Fixed formatting in patch. ;) ---------- Added file: http://bugs.python.org/file31541/issue18745.stoneleaf.02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 06:07:14 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 01 Sep 2013 04:07:14 +0000 Subject: [issue18896] Remove namedtuple 255 arguments restriction In-Reply-To: <1377972310.66.0.567176219008.issue18896@psf.upfronthosting.co.za> Message-ID: <1378008434.54.0.182426822567.issue18896@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 06:22:36 2013 From: report at bugs.python.org (Phil Webster) Date: Sun, 01 Sep 2013 04:22:36 +0000 Subject: [issue18592] IDLE: Unit test for SearchDialogBase.py In-Reply-To: <1375146770.41.0.774627283078.issue18592@psf.upfronthosting.co.za> Message-ID: <1378009356.61.0.0887689180392.issue18592@psf.upfronthosting.co.za> Phil Webster added the comment: Added tests for labels, a mock function for widget creation, a back option for radiobuttontests, and the docstring fixes that Terry mentioned. ---------- Added file: http://bugs.python.org/file31542/18592_test_searchdialog2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 06:40:17 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 04:40:17 +0000 Subject: [issue18835] Add aligned memory variants to the suite of PyMem functions/macros In-Reply-To: <1377484371.18.0.399621580043.issue18835@psf.upfronthosting.co.za> Message-ID: <1378010417.88.0.912571579472.issue18835@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Attaching a patch for what I would like to do with the alignment functions and macros. ---------- keywords: +patch Added file: http://bugs.python.org/file31543/align.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 06:41:53 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 01 Sep 2013 04:41:53 +0000 Subject: [issue11798] Test cases not garbage collected after run In-Reply-To: <1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> Message-ID: <1378010513.51.0.595609194517.issue11798@psf.upfronthosting.co.za> Tim Peters added the comment: All the buildbots are failing due to changeset 868ad6fa8e68 - I'm going to back it out. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 06:45:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 Sep 2013 04:45:00 +0000 Subject: [issue11798] Test cases not garbage collected after run In-Reply-To: <1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> Message-ID: <3cSMKl4l3gz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 7035b5d8fc0f by Tim Peters in branch 'default': Back out 868ad6fa8e68 - it left all the buildbots failing. http://hg.python.org/cpython/rev/7035b5d8fc0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 06:58:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 Sep 2013 04:58:56 +0000 Subject: [issue11798] Test cases not garbage collected after run In-Reply-To: <1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> Message-ID: <3cSMdq5lGdzPrk@mail.python.org> Roundup Robot added the comment: New changeset 39781c3737f8 by Andrew Svetlov in branch 'default': Issue #11798: fix tests for regrtest -R : http://hg.python.org/cpython/rev/39781c3737f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:02:31 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 05:02:31 +0000 Subject: [issue18896] Remove namedtuple 255 arguments restriction In-Reply-To: <1377972310.66.0.567176219008.issue18896@psf.upfronthosting.co.za> Message-ID: <1378011751.32.0.500077706901.issue18896@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would like to see the limitation removed. IIRC, Guido has said the same. That said, the limitation isn't due to anything in the namedtuple code. Instead, it is due to a CPython bytecode implementation detail that limits all function/method definitions to no more than 255 arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:13:31 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 01 Sep 2013 05:13:31 +0000 Subject: [issue11798] Test cases not garbage collected after run In-Reply-To: <1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> Message-ID: <1378012411.15.0.381353618737.issue11798@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Now 'regrtest.py -j4 -R : ' passes. Do we need to add parameter for disabling tests cleanup to TestSuite, TestLoader and TestProgrm constructors? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:14:53 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 05:14:53 +0000 Subject: [issue18898] Apply the setobject optimizations to dictionaries Message-ID: <1378012493.62.0.577402281969.issue18898@psf.upfronthosting.co.za> New submission from Raymond Hettinger: Once http://bugs.python.org/issue18835 is resolved, I would like to see the various set optimizations applied to dictionaries as well: * Move the key before the hash in the dict struct (the key is accessed more frequently in the code and being in the first struct position allows it to be looked-up without a struct offset). * Don't INCREF and DECREF dummy objects. Only one reference needs to be held. See http://bugs.python.org/issue18797 * Reduce the cost of hash collisions by inspecting nearby dict entries for matches prior to moving on to other probes elsewhere in memory. See http://bugs.python.org/issue18771 * Make the previous improvement more effective by using aligned memory allocations for the dict tables. See http://bugs.python.org/issue18835 Collectively, these optimizations can substantially improve dictionary performance. ---------- components: Interpreter Core messages: 196706 nosy: haypo, pitrou, rhettinger, tim.peters priority: low severity: normal status: open title: Apply the setobject optimizations to dictionaries type: performance versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:20:42 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 01 Sep 2013 05:20:42 +0000 Subject: [issue18882] Add threading.main_thread() function In-Reply-To: <1377858406.03.0.871625066732.issue18882@psf.upfronthosting.co.za> Message-ID: <1378012842.08.0.366626921397.issue18882@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Uploaded new patch. > - the doc addition needs a "versionadded" tag Fixed. > - "The main thread is the thread that the OS creates to run application.": I would rephrase this "In normal conditions, the main thread is the thread from which the Python interpreter was started". Fixed. > - in the tests: > + self.assertEqual(data, "Thread-1\nTrue\nTrue\n") > > Hmm, how do you know it will be called "Thread-1"? > I would give a specific name to the Thread, so as to make the test deterministic. In this test main thread after forking is always first thread created by python. That's why it always is called 'Thread-1'. > + self.assertEqual(rc, 0) > > You don't need this, it is already ensured by assert_python_ok(). Fixed. > - in threading.py, why doesn't _exitfunc() reuse the _main_thread global variable, instead of taking it as a parameter? Fixed. ---------- Added file: http://bugs.python.org/file31544/issue18882-4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:36:19 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 05:36:19 +0000 Subject: [issue18826] reversed() requires a sequence - Could work on any iterator? In-Reply-To: <1377371302.25.0.787358043575.issue18826@psf.upfronthosting.co.za> Message-ID: <1378013779.63.0.0569211770556.issue18826@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, Guido rejected this idea a long time ago. We do have the __reversed__ hook so you can add reverse iteration to your own classes where it makes sense. Doing it in the general case is more problematic. Some data sources such as generators can't be run backwards so they would have to be run to exhaustion and saved in memory to support reversed iteration. If a user wants this behavior, it is trivial to achieve it by running reversed(list(it)). The user is in for unhappiness though if the underlying iterator is infinite or huge ;-) ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:38:28 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 05:38:28 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378013908.09.0.209567580788.issue18844@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 for the overall idea. I'll take a detailed look at the patch when I get a chance. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:39:38 2013 From: report at bugs.python.org (Eric Snow) Date: Sun, 01 Sep 2013 05:39:38 +0000 Subject: [issue18898] Apply the setobject optimizations to dictionaries In-Reply-To: <1378012493.62.0.577402281969.issue18898@psf.upfronthosting.co.za> Message-ID: <1378013978.95.0.644565457663.issue18898@psf.upfronthosting.co.za> Eric Snow added the comment: +1 This is worth trying. ---------- nosy: +Mark.Shannon, eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:43:42 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 05:43:42 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378014222.58.0.103201321318.issue18844@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The sticking point is going to be that we don't want to recompute the cumulative weights for every call to weighted_choice. So there should probably be two functions: cw = make_cumulate_weights(weight_list) x = choice(choice_list, cw) This is similar to what was done with string.maketrans() and str.translate(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:50:01 2013 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Sun, 01 Sep 2013 05:50:01 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378014601.69.0.815913693015.issue18844@psf.upfronthosting.co.za> Changes by Westley Mart?nez : ---------- nosy: +anikom15 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 08:23:52 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 06:23:52 +0000 Subject: [issue18821] Add .lastitem attribute to takewhile instances In-Reply-To: <1377260394.63.0.429867593592.issue18821@psf.upfronthosting.co.za> Message-ID: <1378016632.94.0.122274155572.issue18821@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 08:30:04 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 06:30:04 +0000 Subject: [issue18752] Make chain.from_iterable an alias for a new chain_iterable. In-Reply-To: <1376600759.44.0.81483548171.issue18752@psf.upfronthosting.co.za> Message-ID: <1378017004.31.0.033917997867.issue18752@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 08:41:01 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 06:41:01 +0000 Subject: [issue18313] In itertools recipes repeatfunc() defines a non-keyword argument as keyword In-Reply-To: <1372309261.95.0.7034101172.issue18313@psf.upfronthosting.co.za> Message-ID: <1378017661.11.0.849139587691.issue18313@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 08:46:52 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 06:46:52 +0000 Subject: [issue18726] json functions have too many positional parameters In-Reply-To: <1376392694.75.0.457946059126.issue18726@psf.upfronthosting.co.za> Message-ID: <1378018012.89.0.0306353775512.issue18726@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 Once the positional arguments are in the wild, you can't take them away without breaking a lot of code. This code was available as a third-party module prior to inclusion in Python and had many happy users. If the positional arguments had been a sticking point, it would have been known long ago. The time to express these concerns is when a module is being added. Afterwards, the API churn just isn't worth it. We don't want to create more obstacles to upgrading or converting from Python 2. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 09:28:06 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 01 Sep 2013 07:28:06 +0000 Subject: [issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py In-Reply-To: <1377946586.23.0.205823706154.issue18893@psf.upfronthosting.co.za> Message-ID: <1378020486.14.0.371555618034.issue18893@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 09:30:38 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 01 Sep 2013 07:30:38 +0000 Subject: [issue18835] Add aligned memory variants to the suite of PyMem functions/macros In-Reply-To: <1377484371.18.0.399621580043.issue18835@psf.upfronthosting.co.za> Message-ID: <1378020638.92.0.121235505145.issue18835@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > Please don't FUD this one to death. Aligned memory access is > sometimes important and we currently have no straight-forward > way to achieve it. I guess that a simple way to cut the discussion short would be to have a first implementation, and run some benchmarks to measure the benefits. I can certainly see the benefit of cacheline-aligned data structures in multithreaded code (to avoid false sharing/cacheline bouncing): I'm really curious to see how much this would benefit in a single-threaded workload. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 09:37:02 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Sep 2013 07:37:02 +0000 Subject: [issue12304] expose signalfd(2) in the signal module In-Reply-To: <1377975532.11.0.266254760256.issue12304@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Why do you not provide a structure to decode the bytes? I thought relying on ctypes in the stdlib was not advised... We should expose it. The ctypes was just a poof of concept. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 10:22:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 Sep 2013 08:22:51 +0000 Subject: [issue18571] Implementation of the PEP 446: non-inheritable file descriptors In-Reply-To: <1374940021.73.0.887568879163.issue18571@psf.upfronthosting.co.za> Message-ID: <3cSS966CHKzRjV@mail.python.org> Roundup Robot added the comment: New changeset c27527dce71e by Victor Stinner in branch 'default': Issue #18571: Merge duplicate test code http://hg.python.org/cpython/rev/c27527dce71e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 10:43:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2013 08:43:40 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378025020.92.0.734177884165.issue18844@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > A more efficient approach for many use-cases would do the precomputation once, returning some kind of 'distribution' object from which samples can be generated. I like the idea about adding a family of distribution generators. They should check input parameters and make a precomputation and then generate infinite sequence of specially distributed random numbers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 10:44:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2013 08:44:49 +0000 Subject: [issue18726] json functions have too many positional parameters In-Reply-To: <1376392694.75.0.457946059126.issue18726@psf.upfronthosting.co.za> Message-ID: <1378025089.16.0.406266596731.issue18726@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > We don't want to create more obstacles to upgrading or converting from Python 2. But these obstacles already exists. The 10th parameter of dump() is "encoding" in Python 2 and simplejson, and "default" in Python 3. The 12th parameter of dump() is "use_decimal" simplejson, and "sort_keys" in Python 2. The 2nd parameter of load() is "encoding" in Python 2 and simplejson, and "cls" in Python 3. Due to the fact that most arguments are boolean or accepts None some shifting of positional arguments can left unnoticed long time and causes subtle bugs when upgrading from Python 2 to Python 3 or switching between stdlib json module and simplejson. Proposed change doesn't break any code at first stage, it just adds deprecation warning about using dangerous non-portable feature. We can defer forbidding positional parameters until Python 2 will gone and simplejson will be changed to keyword-only parameters too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 11:45:54 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 01 Sep 2013 09:45:54 +0000 Subject: [issue18553] os.isatty() is not Unix only In-Reply-To: <1374752779.81.0.230915084667.issue18553@psf.upfronthosting.co.za> Message-ID: <1378028754.23.0.965745148045.issue18553@psf.upfronthosting.co.za> anatoly techtonik added the comment: None that I know of. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 14:39:11 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 01 Sep 2013 12:39:11 +0000 Subject: [issue18750] '' % [1] doesn't fail In-Reply-To: <1376586656.31.0.488715338617.issue18750@psf.upfronthosting.co.za> Message-ID: <1378039151.45.0.993754256163.issue18750@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Ok. Close as won't fix. Please reopen if needed. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 14:49:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 01 Sep 2013 12:49:58 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1378039798.4.0.304270087215.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: New patch (version 2): - an hash table entry can now contain the data directly instead of a pointer to the data - _tracemalloc._get_stats() copies the hash table to not have to lock the hash table too long, which will be especially useful for TRACE_RAW_MALLOC - Add get_object_trace() function which returns a namedtuple - get_process_memory() returns a namedtuple - DisplayGarbage class has been removed: the PEP 442 has been implemented, it is no more interesting to trace uncollectable objects because they became very rare. If you still want to do that, get_object_trace() is available TODO: - TRACE_RAW_MALLOC define is still disabled because it introduces a deadlock when PyMem_RawMalloc() is called indirectly by Py_NewInterpreter() - minor pending FIXME in the code - review the high level API: add an helper to build a diff between two snapshots and drop colors (not portable)? test_capi deadlock with TRACE_RAW_MALLOC: test_subinterps (test.test_capi.SubinterpreterTest) ... ^C Program received signal SIGINT, Interrupt. 0xb7fdd424 in __kernel_vsyscall () (gdb) where ... #2 0x081abc1c in PyCOND_TIMEDWAIT (cond=0x83470e0, mut=0x8347110, us=5000) at Python/condvar.h:103 #3 0x081ac55c in take_gil (tstate=0x8349c78) at Python/ceval_gil.h:224 #4 0x081ad0a9 in PyEval_RestoreThread (tstate=0x8349c78) at Python/ceval.c:443 #5 0x081f08e3 in PyGILState_Ensure () at Python/pystate.c:786 #6 0x0808df1b in trace_get_filename (trace=0x84c26b8, gil_held=0) at ./Modules/_tracemalloc.c:555 #7 0x0808e314 in trace_log_alloc (ptr=0x84c9f18, size=52, gil_held=0) at ./Modules/_tracemalloc.c:698 #8 0x0808e449 in trace_malloc (ctx=0x8342890, size=52, gil_held=0) at ./Modules/_tracemalloc.c:744 #9 0x0808e5b8 in trace_raw_malloc (ctx=0x8342890, size=52) at ./Modules/_tracemalloc.c:811 #10 0x0805d32a in PyMem_RawMalloc (size=52) at Objects/obmalloc.c:256 #11 0x081eeb79 in PyInterpreterState_New () at Python/pystate.c:63 #12 0x08060c8b in Py_NewInterpreter () at Python/pythonrun.c:700 #13 0xb74d4b90 in run_in_subinterp () #14 0x080e9e7a in PyCFunction_Call () ... ---------- Added file: http://bugs.python.org/file31545/tracemalloc-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 14:56:26 2013 From: report at bugs.python.org (Armin Rigo) Date: Sun, 01 Sep 2013 12:56:26 +0000 Subject: [issue18885] handle EINTR in the stdlib In-Reply-To: <1377874955.28.0.258891288899.issue18885@psf.upfronthosting.co.za> Message-ID: <1378040186.49.0.400539522566.issue18885@psf.upfronthosting.co.za> Changes by Armin Rigo : ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 15:13:05 2013 From: report at bugs.python.org (koobs) Date: Sun, 01 Sep 2013 13:13:05 +0000 Subject: [issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2 In-Reply-To: <1245269274.21.0.966496864817.issue6299@psf.upfronthosting.co.za> Message-ID: <1378041185.53.0.971598533695.issue6299@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 16:37:04 2013 From: report at bugs.python.org (Madison May) Date: Sun, 01 Sep 2013 14:37:04 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378046224.47.0.370545684575.issue18844@psf.upfronthosting.co.za> Madison May added the comment: [Raymond Hettinger] > The sticking point is going to be that we don't want to recompute the > cumulative weights for every call to weighted_choice. > So there should probably be two functions: > cw = make_cumulate_weights(weight_list) > x = choice(choice_list, cw) That's pretty much how I broke things up when I decided to test out optimization with lru_cache. That version of the patch is now attached. [Serhiy Storchaka] > I like the idea about adding a family of distribution generators. > They should check input parameters and make a precomputation and then > generate infinite sequence of specially distributed random numbers. Would these distribution generators be implemented internally (see attached patch) or publicly exposed? ---------- Added file: http://bugs.python.org/file31546/weighted_choice_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 16:45:49 2013 From: report at bugs.python.org (Madison May) Date: Sun, 01 Sep 2013 14:45:49 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378046749.88.0.786766733508.issue18844@psf.upfronthosting.co.za> Changes by Madison May : Removed file: http://bugs.python.org/file31546/weighted_choice_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 16:47:16 2013 From: report at bugs.python.org (Madison May) Date: Sun, 01 Sep 2013 14:47:16 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378046836.21.0.861872554146.issue18844@psf.upfronthosting.co.za> Changes by Madison May : Added file: http://bugs.python.org/file31547/weighted_choice_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 19:12:18 2013 From: report at bugs.python.org (Meador Inge) Date: Sun, 01 Sep 2013 17:12:18 +0000 Subject: [issue16826] Don't check for PYTHONCASEOK if interpreter started with -E In-Reply-To: <1356964491.55.0.198222992625.issue16826@psf.upfronthosting.co.za> Message-ID: <1378055538.01.0.63727431623.issue16826@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- assignee: -> meador.inge stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 19:15:43 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 01 Sep 2013 17:15:43 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <1378055743.1.0.609382309527.issue18889@psf.upfronthosting.co.za> Tim Peters added the comment: Suggest caution here. test_sax fails the same way for me too (Windows Vista), under both the released 3.3.2 and a Python built from the current hg default branch. However, these files (test.xml and test.xml.out) have not changed since the Python 2.7 line - the \r\n line endings have _always_ been there, and test_sax works fine under (e.g.) Python 2.7.5 on Windows. So it's not that the files have changed, it must be that Python is behaving differently. Unfortunately, I don't know anything about what test_sax is trying to do. I do see that under 2.7, test_sax does xml_test_out = open(TEST_XMLFILE_OUT).read() but 3.3 does with open(TEST_XMLFILE_OUT, 'rb') as f: xml_test_out = f.read() That is, 2.7 opens the file for reading in text mode, but 3.3 opens it in binary mode. That makes a big difference for text files under Windows. It's also disturbing that the Windows buildbots don't fail. There is no change in "environment" that should affect the bytes seen when a file is read - and the buildbots "should be" seeing, byte for byte, the same files developers and users see. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 19:34:52 2013 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 01 Sep 2013 17:34:52 +0000 Subject: [issue18899] make pystone.py Py3 compatible in benchmark suite Message-ID: <1378056891.98.0.165106942337.issue18899@psf.upfronthosting.co.za> New submission from Stefan Behnel: diff --git a/performance/pystone.py b/performance/pystone.py --- a/performance/pystone.py +++ b/performance/pystone.py @@ -59,9 +59,9 @@ def main(loops=LOOPS): benchtime, stones = pystones(loops) - print "Pystone(%s) time for %d passes = %g" % \ - (__version__, loops, benchtime) - print "This machine benchmarks at %g pystones/second" % stones + print("Pystone(%s) time for %d passes = %g" % + (__version__, loops, benchtime)) + print("This machine benchmarks at %g pystones/second" % stones) def pystones(loops=LOOPS): @@ -72,7 +72,7 @@ Char1Glob = '\0' Char2Glob = '\0' Array1Glob = [0]*51 -Array2Glob = map(lambda x: x[:], [Array1Glob]*51) +Array2Glob = list(map(lambda x: x[:], [Array1Glob]*51)) PtrGlb = None PtrGlbNext = None ---------- components: Benchmarks messages: 196723 nosy: scoder priority: normal severity: normal status: open title: make pystone.py Py3 compatible in benchmark suite type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 19:43:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Sep 2013 17:43:20 +0000 Subject: [issue18899] make pystone.py Py3 compatible in benchmark suite In-Reply-To: <1378056891.98.0.165106942337.issue18899@psf.upfronthosting.co.za> Message-ID: <1378057400.13.0.95147652986.issue18899@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Oh, pystone... I didn't know we had included that particular horror in the benchmark suite :-) ---------- nosy: +brett.cannon, pitrou stage: -> patch review versions: +3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 19:48:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Sep 2013 17:48:36 +0000 Subject: [issue18553] os.isatty() is not Unix only In-Reply-To: <1374752779.81.0.230915084667.issue18553@psf.upfronthosting.co.za> Message-ID: <1378057716.36.0.0989504113104.issue18553@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Are there tests for this? Not sure what you mean: there are several tests using isatty() in test suite. Regardless, there is no #ifdef around the isatty() definition in posixmodule.c, so I can only assume it exists on all platforms. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 20:04:21 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 01 Sep 2013 18:04:21 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <1378058661.05.0.254563335495.issue18889@psf.upfronthosting.co.za> Tim Peters added the comment: Seeing as Python 3 _does_ open these files in binary mode, I fiddled my local .hgeol to mark the test files as BIN (then deleted the test data directory and did an "hg revert" on the directory). Then test_sax passes. I don't know whether that's the proper fix, but it works ;-) ---------- Added file: http://bugs.python.org/file31548/eol-patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 20:49:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2013 18:49:29 +0000 Subject: [issue18900] Add the random.distrib module Message-ID: <1378061368.61.0.991913209917.issue18900@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In some functions in the random module checking input arguments and precomputation takes a considerable portion of time. Here is a sample implementation of new random.distrib module which provides alternative faster interface to generating of random distributed values. It contains generators which generates values with same distributions as functions with same name in the random module. Benchmark results: random distrib random() 0.061 0.055 1.12 randrange(0, 100, 5) 1.494 0.620 2.41 randint(1, 100) 1.283 0.551 2.33 uniform(-10.0, 10.0) 0.332 0.121 2.73 triangular(0.0, 10.0, 6.0) 0.661 0.317 2.09 gauss(5.0, 2.0) 0.707 0.280 2.53 normalvariate(5.0, 2.0) 0.867 0.553 1.57 lognormvariate(5.0, 2.0) 1.078 0.640 1.68 expovariate(0.1,) 0.508 0.293 1.73 vonmisesvariate(1.0, 1.0) 1.201 0.671 1.79 gammavariate(0.35, 1.45) 1.117 0.508 2.20 betavariate(2.71828, 3.14159) 2.868 1.776 1.61 paretovariate(5.0,) 0.493 0.238 2.07 weibullvariate(1.0, 3.0) 0.670 0.402 1.67 choice([0, 1, 2, 3, 4, 5, 6... 0.887 0.594 1.49 Distrib functions are 1.5-2.8 times faster than random functions. Weighted choice() function (see issue18844) can be even dozens times faster (depends on size of the input). In additional some random generators (i.e. gauss()) looks simpler when implemented as generators. distrib.gauss() is twice faster than distrib.normalvariate() (both generates numbers with same distribution) and I think some other generators can be implemented more efficient in generator style. ---------- components: Library (Lib) files: distrib.py messages: 196727 nosy: mark.dickinson, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Add the random.distrib module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31549/distrib.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 20:51:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2013 18:51:05 +0000 Subject: [issue18900] Add the random.distrib module In-Reply-To: <1378061368.61.0.991913209917.issue18900@psf.upfronthosting.co.za> Message-ID: <1378061465.76.0.46631268803.issue18900@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file31550/distrib_bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 21:16:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2013 19:16:37 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378062997.36.0.538625707694.issue18844@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Would these distribution generators be implemented internally (see attached patch) or publicly exposed? See issue18900. Even if this proposition will be rejected I think we should publicly expose weighted choice_generator(). A generator or a builder which returns function are only ways how efficiently implement this feature. Use lru_cache isn't good because several choice generators can be used in a program and because it left large data in a cache long time after it was used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 21:20:23 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 01 Sep 2013 19:20:23 +0000 Subject: [issue18901] sunau.getparams should return a namedtuple Message-ID: <1378063223.81.0.0712073256156.issue18901@psf.upfronthosting.co.za> New submission from Claudiu.Popa: This is similar to what was done for issue17818 and issue17487 and will gain for all the three audio libraries, aifc, wave and sunau a similar API. Patch and tests attached. ---------- components: Library (Lib) files: sunau.patch keywords: patch messages: 196729 nosy: Claudiu.Popa priority: normal severity: normal status: open title: sunau.getparams should return a namedtuple versions: Python 3.4 Added file: http://bugs.python.org/file31551/sunau.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 21:28:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2013 19:28:37 +0000 Subject: [issue18105] ElementTree writes invalid files when UTF-16 encoding is specified In-Reply-To: <1369983256.71.0.912927883191.issue18105@psf.upfronthosting.co.za> Message-ID: <1378063717.16.0.522061256553.issue18105@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 21:44:51 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 01 Sep 2013 19:44:51 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <1378064691.28.0.712947233782.issue18889@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Two things have happened with Python: we switched bytes from 'text or binary' to 'binary (or text)' in 3.0. We switched from svn to hg in 3.2. When did test_sax start failing? I have no idea. Until recently, there were much worse problems with the test suite on desktop windows; it sometimes quit before getting to 'sax'. Email and its tests (which had the same eol issue) were heavily revised in 3.3; I do not know if the test that failed in 3.3 failed earlier or not. Another failing email test was added in 3.4. David, Antoine: Tim questions/challenges the solution pushed in #12037. ---------- nosy: +pitrou, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 21:47:51 2013 From: report at bugs.python.org (Madison May) Date: Sun, 01 Sep 2013 19:47:51 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378064871.27.0.734456572423.issue18844@psf.upfronthosting.co.za> Madison May added the comment: > Use lru_cache isn't good because several choice generators can be used in a program and because it left large data in a cache long time after it was used. Yeah, I just did a quick search of the stdlib and only found one instance of lru_cache in use -- another sign that lru_cache is a bad choice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 21:58:26 2013 From: report at bugs.python.org (Madison May) Date: Sun, 01 Sep 2013 19:58:26 +0000 Subject: [issue18900] Add the random.distrib module In-Reply-To: <1378061368.61.0.991913209917.issue18900@psf.upfronthosting.co.za> Message-ID: <1378065506.6.0.202046518314.issue18900@psf.upfronthosting.co.za> Madison May added the comment: I like the core idea of a family of random generators, but it feels like a new module that's nearly identical to random introduces a lot of repeated code. Perhaps adding an additional optional arg ('generator=False', for example) to these functions in the random module would be a bit simpler. ---------- nosy: +madison.may _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 22:04:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Sep 2013 20:04:42 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <1378065882.22.0.903689437573.issue18889@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Marking the files as "binary" (really "don't touch") in .hgeol sounds reasonable to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 22:16:51 2013 From: report at bugs.python.org (Jon Foster) Date: Sun, 01 Sep 2013 20:16:51 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: <1378066611.77.0.654627411847.issue16531@psf.upfronthosting.co.za> Changes by Jon Foster : ---------- nosy: +jongfoster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 22:26:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2013 20:26:50 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <1378067210.58.0.672124691419.issue18889@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Nit 2: why? The test passes as is. Currently test.xml and test.xml.out contain only ascii characters. But this can be changed in future. Actually I had added non-ascii characters to other test data and this had exposed some bugs in test suite. > When did test_sax start failing? I have no idea. I guess it becomes after my commit in issue1470548 a half year ago. All proposed fixes are good enough. Feel free to commit what you prefers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 22:33:03 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 01 Sep 2013 20:33:03 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <1378067583.03.0.617252322799.issue18889@psf.upfronthosting.co.za> Tim Peters added the comment: test_email still passed on Windows under 3.2.5 (but test_sax failed). test_email and test_sax both fail under 3.3.2. I'll just push the change to .hgeol - minimally invasive, fixes the immediate problem, and it appears these "really are" binary files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 22:47:03 2013 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 01 Sep 2013 20:47:03 +0000 Subject: [issue18105] ElementTree writes invalid files when UTF-16 encoding is specified In-Reply-To: <1369983256.71.0.912927883191.issue18105@psf.upfronthosting.co.za> Message-ID: <1378068423.68.0.798635355226.issue18105@psf.upfronthosting.co.za> Stefan Behnel added the comment: I can well imagine that the serialiser is broken for this in Py2.x, given that the API accepts byte strings and stores them as such. The fix might be as simple as decoding byte strings in the serialiser before writing them out. Involves a pretty high performance regression, though (and ET's serialiser is known to be rather slow anyway). Not sure if the current behaviour should be changed in 2.x. In any case, it's a duplicate of the other ticket, which was *not* fixed for 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 22:53:17 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 01 Sep 2013 20:53:17 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <1378068797.65.0.878552915788.issue18889@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Having the files be the same on all systems seems the right solution. Changing .hgeol should do that, at least for the repository. Let's hope the Windows .msi installer leave line endings alone. I should install the a,b,c releases just to run the test suite with them. Side note: just above the quoted context in .hgeol is Lib/email/test/data/msg_26.txt = BIN which does not exist now. I suspect it should be removed as the obsolete old version of Lib/test/test_email/data/msg_26.txt = BIN which is in the quoted context. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 23:00:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Sep 2013 21:00:28 +0000 Subject: [issue18900] Add the random.distrib module In-Reply-To: <1378061368.61.0.991913209917.issue18900@psf.upfronthosting.co.za> Message-ID: <1378069228.6.0.316861859442.issue18900@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 23:02:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 Sep 2013 21:02:15 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <3cSn1M26SJzQkJ@mail.python.org> Roundup Robot added the comment: New changeset 8efcf3c823f9 by Tim Peters in branch '3.3': Fix issue 18889: test_sax: multiple failures on Windows desktop. http://hg.python.org/cpython/rev/8efcf3c823f9 New changeset 25211a22228b by Tim Peters in branch 'default': Merge fix from 3.3 into default. http://hg.python.org/cpython/rev/25211a22228b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 23:03:11 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 01 Sep 2013 21:03:11 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <1378069391.34.0.506399777283.issue18889@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 23:06:53 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 01 Sep 2013 21:06:53 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <1378069613.25.0.657149747788.issue18889@psf.upfronthosting.co.za> Tim Peters added the comment: Terry, yes, the installer won't change line endings. I think - we'll find out for sure next time a release is cut - LOL ;-) Agreed that Lib/email/test/data/msg_26.txt is probably obsolete. Fix it, if you like! It's helpful to get rid of obsolete cruft. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 23:10:53 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Sun, 01 Sep 2013 21:10:53 +0000 Subject: [issue13107] Text width in optparse.py can become negative In-Reply-To: <1317812903.38.0.572106699519.issue13107@psf.upfronthosting.co.za> Message-ID: <1378069853.77.0.597127130619.issue13107@psf.upfronthosting.co.za> Elazar Gershuni added the comment: I think in such case it is reasonable to fail silently, since the information will not be readable anyway. Is a patch like the attached acceptable? (Sorry, I am new here) results: >>> import os, argparse; p = argparse.ArgumentParser(prog='PROG') >>> os.environ['COLUMNS'] = '0' >>> print(p.format_help()) usage: PROG [-h] optional arguments: -h, --help >>> ---------- keywords: +patch nosy: +elazar Added file: http://bugs.python.org/file31552/fixargparse.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 23:17:48 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 21:17:48 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378070268.2.0.353615818635.issue18844@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I like the idea about adding a family of distribution generators Let's stay focused on the OP's feature request for a weighted version of choice(). For the most part, it's not a good idea to "just add" a family of anything to the standard library. We wait for user requests and use cases to guide the design and error on the side of less, rather than more. This helps avoid bloat. Also, it would be a good idea to start something like this as a third-party to module to let it iterate and mature before deciding whether there was sufficient user uptake to warrant inclusion in the standard library. For the current request, we should also do some research on existing solutions in other languages. This isn't new territory. What do R, SciPy, Fortran, Matlab or other statistical packages already do? Their experiences can be used to inform our design. Alan Kay's big criticism of Python developers is that they have a strong propensity invent from scratch rather than taking advantage of the mountain of work done by the developers who came before them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 00:01:49 2013 From: report at bugs.python.org (Michael Foord) Date: Sun, 01 Sep 2013 22:01:49 +0000 Subject: [issue11798] Test cases not garbage collected after run In-Reply-To: <1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> Message-ID: <1378072909.11.0.879016555693.issue11798@psf.upfronthosting.co.za> Michael Foord added the comment: I'd rather not propagate more options all the way through, especially as this is some thing that should be decided by the test framework and is unlikely to be something you want to turn on and off per test run (which is what command line options are for). Frameworks that want to disable this behaviour should use a TestSuite that overrides _removeAtIndex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 00:15:30 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 01 Sep 2013 22:15:30 +0000 Subject: [issue18889] test_sax: multiple failures on Windows desktop In-Reply-To: <1377912811.58.0.0769335003135.issue18889@psf.upfronthosting.co.za> Message-ID: <1378073730.52.0.174471576548.issue18889@psf.upfronthosting.co.za> R. David Murray added the comment: For test_email, the fix was correct because the *test* didn't care about what line ending the source file had. I can't speak for sax. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 00:24:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2013 22:24:41 +0000 Subject: [issue18900] Add the random.distrib module In-Reply-To: <1378061368.61.0.991913209917.issue18900@psf.upfronthosting.co.za> Message-ID: <1378074281.69.0.93294526141.issue18900@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Of course if this idea will be accepted we can turn current functions in the random module into wrappers around generators from the distrib module. E.g.: def triangular(self, *args, **kwargs): return next(triangular(*args, random=self, **kwargs)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 00:28:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2013 22:28:41 +0000 Subject: [issue18901] sunau.getparams should return a namedtuple In-Reply-To: <1378063223.81.0.0712073256156.issue18901@psf.upfronthosting.co.za> Message-ID: <1378074521.79.0.262651350495.issue18901@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +r.david.murray stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 00:33:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2013 22:33:45 +0000 Subject: [issue18105] ElementTree writes invalid files when UTF-16 encoding is specified In-Reply-To: <1369983256.71.0.912927883191.issue18105@psf.upfronthosting.co.za> Message-ID: <1378074825.21.0.669153714566.issue18105@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Due to the fact that such bug was not fixed even in 3.2 where it was more ease I doubt that it worth to fix in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 00:35:18 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 01 Sep 2013 22:35:18 +0000 Subject: [issue9709] test_distutils warning: initfunc exported twice on Windows In-Reply-To: <1283101838.76.0.73949668593.issue9709@psf.upfronthosting.co.za> Message-ID: <1378074918.09.0.433811495942.issue9709@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This warning still appears on buildbots running with warnings turned on. ---------- nosy: +terry.reedy versions: +Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 00:46:47 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2013 22:46:47 +0000 Subject: [issue18726] json functions have too many positional parameters In-Reply-To: <1376392694.75.0.457946059126.issue18726@psf.upfronthosting.co.za> Message-ID: <1378075607.76.0.797232009781.issue18726@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Serhiy, please resist the urge to engage in API churn. We've had zero user requests to abandon the current API. I'm not a fan of the current positional arguments, but changing it isn't really worth it (creating disruption with nearly zero benefit, no new functionality and possibly slowing down the calls in module where people seem to really care about speed). Bob, would you please weigh-in on this one. You have the best appreciation for the needs of the established user base. ---------- assignee: rhettinger -> bob.ippolito priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 00:50:35 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 01 Sep 2013 22:50:35 +0000 Subject: [issue12420] distutils tests fail if PATH is not defined In-Reply-To: <1309177997.74.0.17903211546.issue12420@psf.upfronthosting.co.za> Message-ID: <1378075835.26.0.838947780944.issue12420@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I just ran into this issue (same I believe) running the test suite with installed, versus repository, python on win7, but get a different traceback. Traceback (most recent call last): ...\lib\distutils\tests\test_build_ext.py" line 156, in test_optional_extension # or line 316, in test_get_outputs cmd.run) # should raise an error ...\lib\unittest\case.py", line 570, in assertRaises return context.handle('assertRaises', callableObj, args, kwargs) ...\lib\unittest\case.py", line 135, in handle callable_obj(*args, **kwargs) ...\lib\distutils\command\build_ext.py", line 354, in run self.build_extensions() ...\lib\distutils\command\build_ext.py", line 463, in build_extensions self.build_extension(ext) ...\lib\distutils\command\build_ext.py", line 518, in build_extension depends=ext.depends) ...\lib\distutils\msvc9compiler.py", line 460, in compile self.initialize() ...\lib\distutils\msvc9compiler.py", line 371, in initialize vc_env = query_vcvarsall(VERSION, plat_spec) ...\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall raise ValueError(str(list(result.keys()))) ValueError: ['path'] I agree with ?ric that the test should be skipped if it cannot go on. Wrapping self.assertRaises((UnknownFileError, CompileError), cmd.run) # should raise an error and cmd.run() with try:...except ValueError: would fix this issue on Windows. So would skipping if sys.platform == 'win32' and '+' not in sys.version (repository builds have a '+' and the test currently work for them). However, neither solution would work on *nix, which seems to have a completely different failure path to the same end result. Are distutils and test_distutils maintained at all? msvc9compiler.py (2005) says it also works with vc10 (2008, used for 2.7) but makes no mention of vc11 (2010, used for 3.3,3.4). Nick, what do you think we should do with this? I think that when python is installed and working as well as we expect, the test suite should pass, so any failures indicate a problem with the particular installation. I think this is especially important on Windows, with newbies who do not know distutils from, say, itertools. ---------- nosy: +ncoghlan, terry.reedy versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:06:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 Sep 2013 23:06:59 +0000 Subject: [issue18870] eval() uses latin-1 to decode str In-Reply-To: <1377713902.12.0.966249722349.issue18870@psf.upfronthosting.co.za> Message-ID: <3cSqnH19Jqz7Ljf@mail.python.org> Roundup Robot added the comment: New changeset 869cbcabb934 by Benjamin Peterson in branch '2.7': document that various functions that parse from source will interpret things as latin-1 (closes #18870) http://hg.python.org/cpython/rev/869cbcabb934 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:08:54 2013 From: report at bugs.python.org (Madison May) Date: Sun, 01 Sep 2013 23:08:54 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378076934.77.0.274572144087.issue18844@psf.upfronthosting.co.za> Madison May added the comment: > What do R, SciPy, Fortran, Matlab or other statistical packages already do? Numpy avoids recalculating the cumulative distribution by introducing a 'size' argument to numpy.random.choice(). The cumulative distribution is calculated once, then 'size' random choices are generated and returned. Their overall implementation is quite similar to the method suggested in the python docs. >>> choices, weights = zip(*weighted_choices) >>> cumdist = list(itertools.accumulate(weights)) >>> x = random.random() * cumdist[-1] >>> choices[bisect.bisect(cumdist, x)] The addition of a 'size' argument to random.choice() has already been discussed (and rejected) in Issue18414, but this was on the grounds that the standard idiom for generating a list of random choices ([random.choice(seq) for i in range(k)]) is obvious and efficient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:10:55 2013 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 01 Sep 2013 23:10:55 +0000 Subject: [issue18726] json functions have too many positional parameters In-Reply-To: <1376392694.75.0.457946059126.issue18726@psf.upfronthosting.co.za> Message-ID: <1378077055.75.0.229497923438.issue18726@psf.upfronthosting.co.za> Bob Ippolito added the comment: I tend to agree with Raymond here. While I also don't like the positional arguments, I don't think the benefit of API churn them is high enough to remove them. Other than this issue, I have not seen any requests for this change. I have seen problems because there are positional arguments, but only when people are subclassing these classes. Allowing for subclasses was never a good idea, and is actively discouraged in current simplejson documentation. The dumps default/loads object_hook functionality is sufficient and doesn't have the fragile base class problem. This functionality is is fully compatible with all versions of the library that are in use, back to v1.8 in March 2008, including Python 2.6's json library which IIRC is based on v1.9. ---------- assignee: bob.ippolito -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:20:41 2013 From: report at bugs.python.org (Madison May) Date: Sun, 01 Sep 2013 23:20:41 +0000 Subject: [issue18900] Add the random.distrib module In-Reply-To: <1378061368.61.0.991913209917.issue18900@psf.upfronthosting.co.za> Message-ID: <1378077641.81.0.107078633482.issue18900@psf.upfronthosting.co.za> Madison May added the comment: > ...we can turn current functions in the random module into wrappers > around generators from the distrib module. Makes sense. In light of Raymond's comments on code bloat in issue18844, perhaps this module could be added to PyPi to see whether or not there's interest in this kind of functionality? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:39:22 2013 From: report at bugs.python.org (Jakub Stasiak) Date: Sun, 01 Sep 2013 23:39:22 +0000 Subject: [issue18795] pstats - allow stats sorting by cumulative time per call and total time per call In-Reply-To: <1377042491.98.0.765142916486.issue18795@psf.upfronthosting.co.za> Message-ID: <1378078762.31.0.414825238045.issue18795@psf.upfronthosting.co.za> Jakub Stasiak added the comment: I'd change cumulativepercall and totalpercall to cumpercall and percall (and/or intpercall) but that's a detail, this patch works for me. Data structure affected by this patch is produced and consumed internally by the sort method so it looks like nothing changes from the point of view of client code. ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:41:05 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 01 Sep 2013 23:41:05 +0000 Subject: [issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period In-Reply-To: <1376427240.14.0.584954211651.issue18730@psf.upfronthosting.co.za> Message-ID: <1378078865.56.0.0500020932009.issue18730@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- Removed message: http://bugs.python.org/msg196681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:45:20 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 01 Sep 2013 23:45:20 +0000 Subject: [issue18105] ElementTree writes invalid files when UTF-16 encoding is specified In-Reply-To: <1369983256.71.0.912927883191.issue18105@psf.upfronthosting.co.za> Message-ID: <1378079120.13.0.902197310837.issue18105@psf.upfronthosting.co.za> Eli Bendersky added the comment: What Serhiy said. ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:48:52 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 01 Sep 2013 23:48:52 +0000 Subject: [issue18745] Test enum in test_json is ignorant of infinity value In-Reply-To: <1376553540.47.0.197538167938.issue18745@psf.upfronthosting.co.za> Message-ID: <1378079332.42.0.910924003488.issue18745@psf.upfronthosting.co.za> Eli Bendersky added the comment: lgtm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:50:25 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 01 Sep 2013 23:50:25 +0000 Subject: [issue18850] xml.etree.ElementTree accepts control chars. In-Reply-To: <1377597051.46.0.147871481267.issue18850@psf.upfronthosting.co.za> Message-ID: <1378079425.83.0.475793840049.issue18850@psf.upfronthosting.co.za> Eli Bendersky added the comment: Can this be transformed into a new issue that succinctly summarizes what the new requested feature is, and why it's useful? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:51:19 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 01 Sep 2013 23:51:19 +0000 Subject: [issue18693] help() not helpful with enum In-Reply-To: <1376013592.17.0.550012846255.issue18693@psf.upfronthosting.co.za> Message-ID: <1378079479.97.0.381770024869.issue18693@psf.upfronthosting.co.za> Eli Bendersky added the comment: Do we have enough evidence to open a new bug vs. help() ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 02:03:41 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 00:03:41 +0000 Subject: [issue18902] Make ET event handling more modular to allow custom targets for the non-blocking parser Message-ID: <1378080221.59.0.577633252217.issue18902@psf.upfronthosting.co.za> New submission from Eli Bendersky: As issue #17741 shows in detail, there's a number of implementation problems in the current ET that make a fully non-blocking parser more difficult to implement than it should be. The main problem is that XMLParser._setevents relies on internal implementation details of the default TreeBuilder to do some of its tasks. This has to be decoupled from implementation details completely. An XMLParser already has a non-blocking input side (feed/close) and a callback "push" API to the target. The API has to be fully expanded to include start-ns/end-ns and any other events that are required to allow custom tree builders as targets. This would make it possible to layer XMLPullParser on top of the stock XMLParser coupled with a special target that collects "events" from the callback calls. ---------- components: Library (Lib) messages: 196758 nosy: eli.bendersky priority: normal severity: normal stage: needs patch status: open title: Make ET event handling more modular to allow custom targets for the non-blocking parser type: behavior versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 02:05:25 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 00:05:25 +0000 Subject: [issue17741] event-driven XML parser In-Reply-To: <1366058982.04.0.43047381217.issue17741@psf.upfronthosting.co.za> Message-ID: <1378080325.77.0.263192697631.issue17741@psf.upfronthosting.co.za> Eli Bendersky added the comment: I'm closing this issue as fixed because the feature was implemented. As discussed, opened a new issue (#18902) to discuss re-designing some parts of the current code that would allow a nicer implementation of this feature. Anyone interested in the subject - feel free to subscribe yourself there. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 02:29:05 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 02 Sep 2013 00:29:05 +0000 Subject: [issue18693] help() not helpful with enum In-Reply-To: <1378079479.97.0.381770024869.issue18693@psf.upfronthosting.co.za> Message-ID: <5223DBD1.6030503@stoneleaf.us> Ethan Furman added the comment: I've done some more investigation today but I can't tell if the issue is solely in help or if it's some wierd interaction between help and _EnumMeta. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 02:31:23 2013 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Mon, 02 Sep 2013 00:31:23 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378081883.53.0.574671494759.issue18844@psf.upfronthosting.co.za> Westley Mart?nez added the comment: Honestly, I think adding weights to any of the random functions are trivial enough to implement as is. Just because something becomes a common task does not mean it ought to be added to the stdlib. Anyway, from a user point of view, I think it'd be useful to be able to send a sequence to a function that'll weight the sequence for use by random. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 02:39:55 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 00:39:55 +0000 Subject: [issue18693] help() not helpful with enum In-Reply-To: <5223DBD1.6030503@stoneleaf.us> Message-ID: Eli Bendersky added the comment: On Sun, Sep 1, 2013 at 5:29 PM, Ethan Furman wrote: > > Ethan Furman added the comment: > > I've done some more investigation today but I can't tell if the issue is > solely in help or if it's some wierd > interaction between help and _EnumMeta. > So you can't reproduce it with other classes that have a custom __dir__ ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 03:04:02 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 02 Sep 2013 01:04:02 +0000 Subject: [issue18693] help() not helpful with enum In-Reply-To: Message-ID: <5223E403.3050008@stoneleaf.us> Ethan Furman added the comment: Nope, not yet. And even a simple dummy metaclass with a custom __dir__ worked fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 03:22:26 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 02 Sep 2013 01:22:26 +0000 Subject: [issue18693] help() not helpful with enum In-Reply-To: <5223E403.3050008@stoneleaf.us> Message-ID: <5223E853.5070401@stoneleaf.us> Ethan Furman added the comment: What I know for sure: 1) if something is added to dir() that does not live in __dict__, help() breaks. 2) if a certain something or some things are removed from dir(), help() breaks. I'm not yet certain which somethings apply here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 03:33:35 2013 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Mon, 02 Sep 2013 01:33:35 +0000 Subject: [issue18903] IDLE file-completion is case-sensitive in Windows Message-ID: <1378085615.28.0.091077723559.issue18903@psf.upfronthosting.co.za> New submission from Westley Mart?nez: Hi, I'm not sure if this would be considered a bug or a feature request, but IDLE's file-completion is case-sensitive in Windows (e.g. if I have a file named ABBA and I type in 'abb' + tab, ABBA won't pop up. Since Windows files systems are not case-sensitive, it might make sense for the file-completion to disregard case as well. I'm not sure if this behaviour is preferred, however, so I'll leave that up for discussion. I tested the behaviour on 3.3 and 3.4; I assume it's the same for other versions as well. ---------- components: IDLE, Windows messages: 196765 nosy: anikom15 priority: normal severity: normal status: open title: IDLE file-completion is case-sensitive in Windows type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 03:41:01 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 02 Sep 2013 01:41:01 +0000 Subject: [issue18902] Make ET event handling more modular to allow custom targets for the non-blocking parser In-Reply-To: <1378080221.59.0.577633252217.issue18902@psf.upfronthosting.co.za> Message-ID: <1378086061.92.0.631052597997.issue18902@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 04:43:45 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 02 Sep 2013 02:43:45 +0000 Subject: [issue11798] Test cases not garbage collected after run In-Reply-To: <1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> Message-ID: <1378089824.99.0.159184868115.issue11798@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Ok. Let's close issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 05:00:51 2013 From: report at bugs.python.org (Madison May) Date: Mon, 02 Sep 2013 03:00:51 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1378090851.87.0.850160515374.issue18844@psf.upfronthosting.co.za> Madison May added the comment: Just ran across a great blog post on the topic of weighted random generation from Eli Bendersky for anyone interested: http://eli.thegreenplace.net/2010/01/22/weighted-random-generation-in-python/ ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 05:39:34 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 02 Sep 2013 03:39:34 +0000 Subject: [issue18904] Unnecessary test in file descriptor inheritance test Message-ID: <1378093174.83.0.0549924253558.issue18904@psf.upfronthosting.co.za> New submission from Vajrasky Kok: In Lib/test/test_os.py in class FDInheritanceTests, we have an unnecessary test, which is test_set_inheritable. What test_set_inheritable tests is already being covered by test_get_inheritable. Also, I think test_get_inheritable should be renamed to test_set_inheritable. Please, see the patch to see what I mean. ---------- components: Tests files: remove_unnecessary_test_fd_inheritable.patch keywords: patch messages: 196768 nosy: haypo, vajrasky priority: normal severity: normal status: open title: Unnecessary test in file descriptor inheritance test versions: Python 3.4 Added file: http://bugs.python.org/file31553/remove_unnecessary_test_fd_inheritable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 05:51:59 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 02 Sep 2013 03:51:59 +0000 Subject: [issue18745] Test enum in test_json is ignorant of infinity value In-Reply-To: <1376553540.47.0.197538167938.issue18745@psf.upfronthosting.co.za> Message-ID: <1378093919.77.0.0429356719749.issue18745@psf.upfronthosting.co.za> Vajrasky Kok added the comment: To test the infinity, negative infinity, and NaN (Not a Number), you named the test as test_weird_floats. So implicitely, you admitted that they are floats but just weird. Yet, you named the sample data test class as NotNum. Implicitely, you were saying they are not numbers. This is contradictory. In my personal opinion, I disagree slightly with the naming because infinity and negative infinity are numbers. Why not name it WeirdNum (or SpecialNum) to make it more mathematically correct and consistent with the test naming? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 05:52:38 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 02 Sep 2013 03:52:38 +0000 Subject: [issue18902] Make ET event handling more modular to allow custom targets for the non-blocking parser In-Reply-To: <1378080221.59.0.577633252217.issue18902@psf.upfronthosting.co.za> Message-ID: <1378093958.12.0.617457708693.issue18902@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 05:57:52 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 02 Sep 2013 03:57:52 +0000 Subject: [issue18745] Test enum in test_json is ignorant of infinity value In-Reply-To: <1378093919.77.0.0429356719749.issue18745@psf.upfronthosting.co.za> Message-ID: <52240CC2.7080907@stoneleaf.us> Ethan Furman added the comment: >From my layman's perspective they are all not numbers -- you can't add 5 to any of them and get a number back that is 5 more than you started with. By I have no problem with your proposed name -- I'll make the change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:51:51 2013 From: report at bugs.python.org (paul j3) Date: Mon, 02 Sep 2013 04:51:51 +0000 Subject: [issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts In-Reply-To: <1295737320.83.0.942830837874.issue10984@psf.upfronthosting.co.za> Message-ID: <1378097511.44.0.143934936566.issue10984@psf.upfronthosting.co.za> paul j3 added the comment: A possible further tweak is, in take_action(), test for conflicts before adding the action to 'seen_non_default_actions' if argument_values is not action.default: #seen_non_default_actions.add(action) for conflict_action in action_conflicts.get(action, []): if conflict_action in seen_non_default_actions: ... seen_non_default_actions.add(action) This does not cause problems with any existing tests, but makes it possible to add an action twice to a group. Why do that? To prevent an action from occurring more than once. For some actions like 'count' and 'append' repeated use is expected, but for others it isn't expected, and may sometimes be a nuisance (the last occurrence is the one that sticks). An example use would be: parser = argparse.ArgumentParser(prog="PROG", formatter_class=argparse.MultiGroupHelpFormatter) action = parser.add_argument('--arg', help='use this argument only once') group1 = parser.add_mutually_exclusive_group(action, action) args = parser.parse_args() calling this with: python3 test_once.py --arg test --arg next would produce this error message: usage: PROG [-h] [--arg ARG | --arg ARG] PROG: error: argument --arg: not allowed with argument --arg The usage and error message aren't as clear as they might be if this feature was added 'from scratch'. But for a minor change like this, that may be an acceptable price. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:05:04 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 02 Sep 2013 06:05:04 +0000 Subject: [issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py In-Reply-To: <1377946586.23.0.205823706154.issue18893@psf.upfronthosting.co.za> Message-ID: <1378101904.08.0.594263358251.issue18893@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Your analysis looks correct to me, that is "raise e" is supposed to raise the exception caught by the first try block. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:43:15 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 02 Sep 2013 06:43:15 +0000 Subject: [issue18904] Unnecessary test in file descriptor inheritance test In-Reply-To: <1378093174.83.0.0549924253558.issue18904@psf.upfronthosting.co.za> Message-ID: <1378104195.45.0.531361179435.issue18904@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 10:15:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 02 Sep 2013 08:15:23 +0000 Subject: [issue18745] Test enum in test_json is ignorant of infinity value In-Reply-To: <1376553540.47.0.197538167938.issue18745@psf.upfronthosting.co.za> Message-ID: <3cT3y21mMhzNH3@mail.python.org> Roundup Robot added the comment: New changeset 50e583f20d78 by Ethan Furman in branch 'default': Close #18745: Improve enum tests in test_json for infinities and NaN. http://hg.python.org/cpython/rev/50e583f20d78 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 10:24:24 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 02 Sep 2013 08:24:24 +0000 Subject: [issue9709] test_distutils warning: initfunc exported twice on Windows In-Reply-To: <1283101838.76.0.73949668593.issue9709@psf.upfronthosting.co.za> Message-ID: <1378110264.53.0.800408145829.issue9709@psf.upfronthosting.co.za> Stefan Krah added the comment: Is the distutils freeze still in place? If not, I'll commit initfunc2.patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 10:59:39 2013 From: report at bugs.python.org (Berker Peksag) Date: Mon, 02 Sep 2013 08:59:39 +0000 Subject: [issue18828] urljoin behaves differently with custom and standard schemas In-Reply-To: <1377435120.2.0.153064775964.issue18828@psf.upfronthosting.co.za> Message-ID: <1378112379.28.0.42114264148.issue18828@psf.upfronthosting.co.za> Berker Peksag added the comment: How about adding a codecs.register like public API for 3.4+? import urllib.parse urllib.parse.schemes.register('redis', 'rtmp') or: urllib.parse.urljoin('redis://localhost:6379/0', '/1', scheme='redis') or just: urllib.parse.schemes.extend(['redis', 'rtmp']) ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:47:16 2013 From: report at bugs.python.org (=?utf-8?q?Mat=C4=9Bj_Stuchl=C3=ADk?=) Date: Mon, 02 Sep 2013 09:47:16 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <1378115236.01.0.742362989416.issue18709@psf.upfronthosting.co.za> Mat?j Stuchl?k added the comment: Doing 'valgrind --suppressions=valgrind-python.supp ./python Lib/tests/regrtest.py test_ssl.py' I'm getting ==11944== LEAK SUMMARY: ==11944== definitely lost: 32 bytes in 1 blocks ==11944== indirectly lost: 392 bytes in 16 blocks ==11944== possibly lost: 27,008 bytes in 58 blocks ==11944== still reachable: 4,267,092 bytes in 4,124 blocks ==11944== suppressed: 32 bytes in 1 blocks and as far as I can tell the leak is introduced by this patch, I can't seem to figure out what could be causing it though. ---------- nosy: +sYnfo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:26:14 2013 From: report at bugs.python.org (koobs) Date: Mon, 02 Sep 2013 10:26:14 +0000 Subject: [issue15018] Incomplete Python LDFLAGS and CPPFLAGS used for extension modules on posix In-Reply-To: <1338987103.32.0.200789346526.issue15018@psf.upfronthosting.co.za> Message-ID: <1378117574.83.0.380840277473.issue15018@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:51:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 02 Sep 2013 10:51:30 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <1378119090.24.0.712236634974.issue18709@psf.upfronthosting.co.za> Christian Heimes added the comment: I can't reproduce the memory leak. valgrind's output doesn't show suspicious memory leaks. ./configure --with-pydebug --config-cache valgrind --suppressions=Misc/valgrind-python.supp ./python Lib/test/test_ssl.py Python 3.4 tip -------------- ==26085== HEAP SUMMARY: ==26085== in use at exit: 1,286,703 bytes in 3,778 blocks ==26085== total heap usage: 210,241 allocs, 206,463 frees, 62,923,839 bytes allocated ==26085== ==26085== LEAK SUMMARY: ==26085== definitely lost: 0 bytes in 0 blocks ==26085== indirectly lost: 0 bytes in 0 blocks ==26085== possibly lost: 1,148,038 bytes in 555 blocks ==26085== still reachable: 138,665 bytes in 3,223 blocks ==26085== suppressed: 0 bytes in 0 blocks Python 3.4.0a1 (without patch) ------------------------------ ==32513== HEAP SUMMARY: ==32513== in use at exit: 1,708,298 bytes in 4,120 blocks ==32513== total heap usage: 237,965 allocs, 233,845 frees, 94,637,130 bytes allocated ==32513== ==32513== LEAK SUMMARY: ==32513== definitely lost: 0 bytes in 0 blocks ==32513== indirectly lost: 0 bytes in 0 blocks ==32513== possibly lost: 1,568,077 bytes in 893 blocks ==32513== still reachable: 140,221 bytes in 3,227 blocks ==32513== suppressed: 0 bytes in 0 blocks ==32513== Rerun with --leak-check=full to see details of leaked memory Python 2.7 tip -------------- ==3184== HEAP SUMMARY: ==3184== in use at exit: 6,411,895 bytes in 4,757 blocks ==3184== total heap usage: 16,245 allocs, 11,488 frees, 32,948,412 bytes allocated ==3184== ==3184== LEAK SUMMARY: ==3184== definitely lost: 0 bytes in 0 blocks ==3184== indirectly lost: 0 bytes in 0 blocks ==3184== possibly lost: 1,823,596 bytes in 1,505 blocks ==3184== still reachable: 4,588,299 bytes in 3,252 blocks ==3184== suppressed: 0 bytes in 0 blocks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:12:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 11:12:08 +0000 Subject: [issue18900] Add the random.distrib module In-Reply-To: <1378061368.61.0.991913209917.issue18900@psf.upfronthosting.co.za> Message-ID: <1378120328.36.0.643457007354.issue18900@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > In light of Raymond's comments on code bloat in issue18844, perhaps this module could be added to PyPi to see whether or not there's interest in this kind of functionality? Agree. At first look there are no module which provides such features on PyPI. On the second hand NumpPy provides efficient C-implemented functions which are 2-10 times faster than proposed pure Python iterators. Due to this fact I withdraw my proposition. Anyone who need a performance in random generation with specific distribution can use NumPy. ---------- resolution: -> rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:38:34 2013 From: report at bugs.python.org (=?utf-8?q?Mat=C4=9Bj_Stuchl=C3=ADk?=) Date: Mon, 02 Sep 2013 11:38:34 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <1378121914.32.0.936574305817.issue18709@psf.upfronthosting.co.za> Mat?j Stuchl?k added the comment: Oh, I only checked the particular commit that fixed this issue in 2.6 (50803d881a92). I am not getting any leaks in 2.6 tip either, so I guess it was fixed somewhere along the way. Sorry for the confusion! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:55:06 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 02 Sep 2013 11:55:06 +0000 Subject: [issue18550] internal_setblocking() doesn't check return value of fcntl() In-Reply-To: <1374694779.19.0.0902694218162.issue18550@psf.upfronthosting.co.za> Message-ID: <1378122906.03.0.74819483434.issue18550@psf.upfronthosting.co.za> Ronald Oussoren added the comment: oops. This should be the right patch. ---------- Added file: http://bugs.python.org/file31554/issue-18550.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 14:34:51 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 02 Sep 2013 12:34:51 +0000 Subject: [issue18693] help() not helpful with enum In-Reply-To: <1376013592.17.0.550012846255.issue18693@psf.upfronthosting.co.za> Message-ID: <1378125291.92.0.697638281354.issue18693@psf.upfronthosting.co.za> Ronald Oussoren added the comment: That help() is confused by __dir__ is documented in #16938. AFAIK help is fairly fragile in its expectations of the attributes present on classes and the correspondence between dir(cls) and list(cls.__dict__), and that is something that could be fixed in pydoc and/or inspect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 16:45:06 2013 From: report at bugs.python.org (Sigmund Augdal) Date: Mon, 02 Sep 2013 14:45:06 +0000 Subject: [issue15310] urllib: Support for multiple WWW-Authenticate headers and/or multiple challenges per header In-Reply-To: <1341873649.53.0.673715238265.issue15310@psf.upfronthosting.co.za> Message-ID: <1378133106.18.0.63798160071.issue15310@psf.upfronthosting.co.za> Sigmund Augdal added the comment: I'm also affected by this. Could someone please apply the patch or provide some reason why it could not be applied? ---------- nosy: +Sigmund.Augdal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 16:46:00 2013 From: report at bugs.python.org (Sigmund Augdal) Date: Mon, 02 Sep 2013 14:46:00 +0000 Subject: [issue13323] urllib2 does not correctly handle multiple www-authenticate headers in an HTTP response In-Reply-To: <1320249966.17.0.892468926199.issue13323@psf.upfronthosting.co.za> Message-ID: <1378133160.54.0.043166474804.issue13323@psf.upfronthosting.co.za> Sigmund Augdal added the comment: Can someone please apply this patch or provide a reason why it should not be applied? ---------- nosy: +Sigmund.Augdal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:31:51 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 02 Sep 2013 15:31:51 +0000 Subject: [issue13323] urllib2 does not correctly handle multiple www-authenticate headers in an HTTP response In-Reply-To: <1320249966.17.0.892468926199.issue13323@psf.upfronthosting.co.za> Message-ID: <1378135911.3.0.247946587641.issue13323@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Sigmund: Sorry for the delay. I shall act on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:34:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 15:34:08 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1378136048.08.0.601314131306.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which combines both Kang-Hao's patches, synchronized with tip, fixed and optimized. Unfortunately even optimized this patch slowdown encoding/decoding some data. Here are some benchmark results (benchmarking tools are here: https://bitbucket.org/storchaka/cpython-stuff/src/default/bench). 3.3 3.4 3.4 unpatched patched 969 (+12%) 978 (+11%) 1087 encode utf-16le 'A'*10000 2453 (-62%) 2356 (-61%) 923 encode utf-16le '\u0100'*10000 222 (+12%) 224 (+11%) 249 encode utf-16le '\U00010000'+'\u0100'*9999 784 (+6%) 791 (+5%) 831 encode utf-16be 'A'*10000 750 (-4%) 752 (-4%) 719 encode utf-16be '\u0100'*10000 233 (+2%) 235 (+1%) 238 encode utf-16be '\U00010000'+'\u0100'*9999 531 (-7%) 545 (-9%) 494 encode utf-32le 'A'*10000 383 (-38%) 385 (-38%) 239 encode utf-32le '\u0100'*10000 324 (-24%) 325 (-25%) 245 encode utf-32le '\U00010000'+'\u0100'*9999 544 (-10%) 545 (-10%) 492 encode utf-32be 'A'*10000 384 (-38%) 384 (-38%) 239 encode utf-32be '\u0100'*10000 325 (-25%) 325 (-25%) 245 encode utf-32be '\U00010000'+'\u0100'*9999 682 (+5%) 679 (+5%) 715 decode utf-16le 'A'*10000 607 (+1%) 610 (+1%) 614 decode utf-16le '\u0100'*10000 550 (+1%) 554 (+0%) 556 decode utf-16le '\U00010000'+'\u0100'*9999 609 (+0%) 600 (+2%) 610 decode utf-16be 'A'*10000 464 (+1%) 466 (+1%) 470 decode utf-16be '\u0100'*10000 432 (+1%) 431 (+1%) 435 decode utf-16be '\U00010000'+'\u0100'*9999 103 (+272%) 374 (+2%) 383 decode utf-32le 'A'*10000 91 (+264%) 390 (-15%) 331 decode utf-32le '\u0100'*10000 90 (+257%) 393 (-18%) 321 decode utf-32le '\U00010000'+'\u0100'*9999 103 (+269%) 393 (-3%) 380 decode utf-32be 'A'*10000 91 (+263%) 406 (-19%) 330 decode utf-32be '\u0100'*10000 90 (+257%) 393 (-18%) 321 decode utf-32be '\U00010000'+'\u0100'*9999 Performance of utf-16 decoding is not changed. utf-16 encoder is 2.5 times slowed for UCS2 data (it was just memcpy) but still 3+ times faster than 2.7 and 3.2 (issue15026). Due to additional optimization it now even slightly faster for some other data. There is a patch for speed up UTF-32 encoding (issue15027), it should help to compensate it's performance degradation. UTF-32 decoder already 3-4 times faster than in 3.3 (issue14625). I don't see performance objection against this patch. ---------- Added file: http://bugs.python.org/file31555/utf_16_32_surrogates_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:41:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 15:41:48 +0000 Subject: [issue18818] Empty PYTHONIOENCODING is not the same as nonexistent In-Reply-To: <1377240348.58.0.0824436318174.issue18818@psf.upfronthosting.co.za> Message-ID: <1378136508.52.0.977856056658.issue18818@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:43:32 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 02 Sep 2013 15:43:32 +0000 Subject: [issue9709] test_distutils warning: initfunc exported twice on Windows In-Reply-To: <1283101838.76.0.73949668593.issue9709@psf.upfronthosting.co.za> Message-ID: <1378136612.73.0.442880256104.issue9709@psf.upfronthosting.co.za> ?ric Araujo added the comment: The feature freeze was lifted at PyCon 2013. This patch can be committed in the default branch. Could you add a test? ---------- assignee: tarek -> eric.araujo versions: -3rd party, Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:44:22 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 02 Sep 2013 15:44:22 +0000 Subject: [issue9709] test_distutils warning: initfunc exported twice on Windows In-Reply-To: <1283101838.76.0.73949668593.issue9709@psf.upfronthosting.co.za> Message-ID: <1378136662.02.0.754581918009.issue9709@psf.upfronthosting.co.za> ?ric Araujo added the comment: Ignore my comment about a test, you already replied to that :) Please commit. ---------- assignee: eric.araujo -> skrah stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:45:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 15:45:31 +0000 Subject: [issue8821] Range check on unicode repr In-Reply-To: <1274847113.25.0.171149609237.issue8821@psf.upfronthosting.co.za> Message-ID: <1378136731.84.0.330082769788.issue8821@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> works for me stage: -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:53:23 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 02 Sep 2013 15:53:23 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1378136048.08.0.601314131306.issue12892@psf.upfronthosting.co.za> Message-ID: <5224B471.3080809@egenix.com> Marc-Andre Lemburg added the comment: You should be able to squeeze out some extra cycles by avoiding the bit calculations using a simple range check for ch >= 0xd800: +# if STRINGLIB_MAX_CHAR >= 0xd800 + if (((ch1 ^ 0xd800) & + (ch1 ^ 0xd800) & + (ch1 ^ 0xd800) & + (ch1 ^ 0xd800) & 0xf800) == 0) + break; +# endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 18:49:20 2013 From: report at bugs.python.org (Wieland Hoffmann) Date: Mon, 02 Sep 2013 16:49:20 +0000 Subject: [issue18905] pydoc -p 0 says the server is available at localhost:0 Message-ID: <1378140560.28.0.729434187467.issue18905@psf.upfronthosting.co.za> New submission from Wieland Hoffmann: In Python 3 one can use `pydoc -p 0` to start a pydoc HTTP server on an arbitrary unused port. This works (somewhat) in Python 2 as well, except that pydoc doesn't tell you which port it's listening on. Applying the attached patch makes pydoc print the correct port. ---------- components: Library (Lib) files: pydoc-port.patch keywords: patch messages: 196789 nosy: Wieland.Hoffmann priority: normal severity: normal status: open title: pydoc -p 0 says the server is available at localhost:0 type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file31556/pydoc-port.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 18:56:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 16:56:35 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1378140995.91.0.779939407113.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I were blind. Thank you Marc-Andre. Here is corrected patch. Unfortunately it 1.4-1.5 times slower on UTF-16 encoding UCS2 strings than previous wrong patch. ---------- Added file: http://bugs.python.org/file31557/utf_16_32_surrogates_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 18:57:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 16:57:15 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1378141035.68.0.0830213175293.issue12892@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31555/utf_16_32_surrogates_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 19:12:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 17:12:09 +0000 Subject: [issue18726] json functions have too many positional parameters In-Reply-To: <1376392694.75.0.457946059126.issue18726@psf.upfronthosting.co.za> Message-ID: <1378141929.96.0.0950220523813.issue18726@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But what you will do with discrepancies between Python 2, Python 3 and simplejson? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 19:15:19 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 02 Sep 2013 17:15:19 +0000 Subject: [issue18726] json functions have too many positional parameters In-Reply-To: <1376392694.75.0.457946059126.issue18726@psf.upfronthosting.co.za> Message-ID: <1378142119.82.0.250597419281.issue18726@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I have not seen any requests for this change. That's probably because either people have not realized that their code might be buggy, or because they have not realized that keyword-only args might be a solution to this problem (or maybe they did but didn't bother suggesting it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 19:17:17 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 17:17:17 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest Message-ID: <1378142237.02.0.163660197957.issue18906@psf.upfronthosting.co.za> New submission from Eli Bendersky: There were numerous discussions and issues in the past about the cross-test dependencies that sometimes exist because some tests need to muck with import caches (both on the Python and C level). Some examples: http://mail.python.org/pipermail/python-dev/2013-January/123409.html http://mail.python.org/pipermail/python-dev/2013-August/127766.html Issue #15651 is an example of a hack that has to stay in the code to allow tests to pass. Other things are also difficult - such as simulating situations where some optional modules don't exist (like pyexpat). ---- I suggest to add a capability to regrtest that will allow certain tests to request always being run inside a subprocess. Most of the infrastructure is already in place, since this is what regrtest uses to run with -jN today. An alternative would be to add some test.support utility to help with this, but then test execution would not be uniform between -j1 and -jN and also some things would be difficult to track, such as -R executions (currently all -R runs of a single test have to be within a single process for the refcount tracking to work). ---------- assignee: eli.bendersky components: Tests messages: 196793 nosy: eli.bendersky, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: Create a way to always run tests in subprocesses within regrtest versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 19:21:19 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 02 Sep 2013 17:21:19 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: <1378142237.02.0.163660197957.issue18906@psf.upfronthosting.co.za> Message-ID: <1378142479.47.0.792238802021.issue18906@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 19:39:09 2013 From: report at bugs.python.org (Madison May) Date: Mon, 02 Sep 2013 17:39:09 +0000 Subject: [issue18828] urljoin behaves differently with custom and standard schemas In-Reply-To: <1377435120.2.0.153064775964.issue18828@psf.upfronthosting.co.za> Message-ID: <1378143549.26.0.450902911774.issue18828@psf.upfronthosting.co.za> Madison May added the comment: If nothing else, we should document the work around for this issue. >>> import urllib.parse >>> urllib.parse.uses_relative.append('redis') >>> urllib.parse.uses_netloc.append('redis') >>> urllib.parse.urljoin('redis://localhost:6379/0', '/1') 'redis://localhost:6379/1' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 19:39:47 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 02 Sep 2013 17:39:47 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1378143587.37.0.631680907393.issue16938@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +eli.bendersky, ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 19:49:32 2013 From: report at bugs.python.org (Madison May) Date: Mon, 02 Sep 2013 17:49:32 +0000 Subject: [issue18828] urljoin behaves differently with custom and standard schemas In-Reply-To: <1377435120.2.0.153064775964.issue18828@psf.upfronthosting.co.za> Message-ID: <1378144172.84.0.0880179764335.issue18828@psf.upfronthosting.co.za> Madison May added the comment: >How about adding a codecs.register like public API for 3.4+? A codecs style register function seems like an excellent solution to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 19:51:00 2013 From: report at bugs.python.org (Dmi Baranov) Date: Mon, 02 Sep 2013 17:51:00 +0000 Subject: [issue18553] os.isatty() is not Unix only In-Reply-To: <1374752779.81.0.230915084667.issue18553@psf.upfronthosting.co.za> Message-ID: <1378144260.23.0.0245098955445.issue18553@psf.upfronthosting.co.za> Dmi Baranov added the comment: isatty is a part of of POSIX sub-system at Windows > 5.x (AKA 2000) [1] (file handling equivalents [2]). I think, we need to remove availability note here. [1] http://msdn.microsoft.com/en-us/library/f4s0ddew.aspx [2] http://msdn.microsoft.com/en-us/library/kdfaxaay.aspx ---------- nosy: +dmi.baranov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 19:54:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 17:54:40 +0000 Subject: [issue18850] xml.etree.ElementTree accepts control chars. In-Reply-To: <1377597051.46.0.147871481267.issue18850@psf.upfronthosting.co.za> Message-ID: <1378144480.97.0.675453251339.issue18850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Isn't this a duplicate of issue5166? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 20:03:19 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 02 Sep 2013 18:03:19 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1378140995.91.0.779939407113.issue12892@psf.upfronthosting.co.za> Message-ID: <5224D2E5.2020204@egenix.com> Marc-Andre Lemburg added the comment: On 02.09.2013 18:56, Serhiy Storchaka wrote: > > Oh, I were blind. Thank you Marc-Andre. Here is corrected patch. Unfortunately it 1.4-1.5 times slower on UTF-16 encoding UCS2 strings than previous wrong patch. I think it would be faster to do this in two steps: 1. check the ranges of the input 2. do a memcpy() if there are no lone surrogates Part 1 can be further optimized by adding a simple range check (ch >= 0xd800). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 20:11:06 2013 From: report at bugs.python.org (Bob Ippolito) Date: Mon, 02 Sep 2013 18:11:06 +0000 Subject: [issue18726] json functions have too many positional parameters In-Reply-To: <1376392694.75.0.457946059126.issue18726@psf.upfronthosting.co.za> Message-ID: <1378145466.38.0.724538672895.issue18726@psf.upfronthosting.co.za> Bob Ippolito added the comment: Other than when subclassing (which is actively discouraged), I haven't seen anyone try and use positional args for these APIs. I simply don't think this is an issue in practice. If you go far enough back in simplejson history, these module-global functions were actually keyword-only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 20:18:51 2013 From: report at bugs.python.org (John Nagle) Date: Mon, 02 Sep 2013 18:18:51 +0000 Subject: [issue18907] urllib2.open FTP open times out at 20 secs despite timeout parameter Message-ID: <1378145931.18.0.826598432393.issue18907@psf.upfronthosting.co.za> New submission from John Nagle: urllib2.open for an FTP url does not obey the timeout parameter. Attached test program times out on FTP open after 21 seconds, even though the specified timeout is 60 seconds. Timing is consistent; times have ranged from 21.03 to 21.05 seconds. Python documentation (http://docs.python.org/2/library/urllib2.html) says "The optional timeout parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, the global default timeout setting will be used). This actually only works for HTTP, HTTPS and FTP connections." The documentation for Python 3 reads the same. Open of ftp://ftp.sec.gov/edgar/daily-index failed after 21.05 seconds: This was on Windows 7, but the same result is observed on Linux. (The FTP server at the U.S. Securities and Exchange Commission is now imposing a 20-second connection delay during busy periods. This is causing our Python code that retrieves new SEC filings to fail. It may be necessary to run the program at different times of the day to reproduce the problem.) ---------- components: Library (Lib) files: edgartimeouttest.py messages: 196800 nosy: nagle priority: normal severity: normal status: open title: urllib2.open FTP open times out at 20 secs despite timeout parameter versions: Python 2.7 Added file: http://bugs.python.org/file31558/edgartimeouttest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 20:26:41 2013 From: report at bugs.python.org (John Nagle) Date: Mon, 02 Sep 2013 18:26:41 +0000 Subject: [issue18907] urllib2.open FTP open times out at 20 secs despite timeout parameter In-Reply-To: <1378145931.18.0.826598432393.issue18907@psf.upfronthosting.co.za> Message-ID: <1378146401.9.0.0509787330634.issue18907@psf.upfronthosting.co.za> John Nagle added the comment: Reproduced problem in Python 3.3 (Win32). Error message there is: Open of ftp://ftp.sec.gov/edgar/daily-index failed after 21.08 seconds: So this is broken in both Python 2.7 and Python 3.3. ---------- versions: +Python 3.3 Added file: http://bugs.python.org/file31559/edgartimeouttest3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 20:33:01 2013 From: report at bugs.python.org (Dmi Baranov) Date: Mon, 02 Sep 2013 18:33:01 +0000 Subject: [issue13107] Text width in optparse.py can become negative In-Reply-To: <1317812903.38.0.572106699519.issue13107@psf.upfronthosting.co.za> Message-ID: <1378146781.72.0.937434516261.issue13107@psf.upfronthosting.co.za> Dmi Baranov added the comment: I think "ugly look is better than silence" here. Elazar, can you touch a optparse too (with some tests - test.support.EnvironmentVarGuard context manager will be helpful here)? ---------- nosy: +dmi.baranov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 22:31:05 2013 From: report at bugs.python.org (Zsolt Cserna) Date: Mon, 02 Sep 2013 20:31:05 +0000 Subject: [issue18808] Thread.join returns before PyThreadState is destroyed In-Reply-To: <1377179797.68.0.40345735309.issue18808@psf.upfronthosting.co.za> Message-ID: <1378153865.05.0.336542655763.issue18808@psf.upfronthosting.co.za> Changes by Zsolt Cserna : ---------- nosy: +csernazs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 22:38:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 20:38:41 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1378154321.62.0.0750635374754.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No, it isn't faster. I tested this variant, it is 1.5x slower. And simple range checking actually is slower. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 22:47:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 20:47:41 +0000 Subject: [issue13107] Text width in optparse.py can become negative In-Reply-To: <1317812903.38.0.572106699519.issue13107@psf.upfronthosting.co.za> Message-ID: <1378154861.45.0.961179622286.issue13107@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I think "ugly look is better than silence" here. Agree. We have two possibilities: 1. Decrease an indentation. There is a lot of blank spaces below option's names. 2. Set some minimal width (10 or 20 characters) and let lines wrap out. For better look we should use both methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 22:49:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2013 20:49:33 +0000 Subject: [issue18726] json functions have too many positional parameters In-Reply-To: <1376392694.75.0.457946059126.issue18726@psf.upfronthosting.co.za> Message-ID: <1378154973.63.0.579126270403.issue18726@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If no one uses positional arguments then converting parameters to keyword-only will not break any code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 22:57:11 2013 From: report at bugs.python.org (Bob Ippolito) Date: Mon, 02 Sep 2013 20:57:11 +0000 Subject: [issue18726] json functions have too many positional parameters In-Reply-To: <1376392694.75.0.457946059126.issue18726@psf.upfronthosting.co.za> Message-ID: <1378155431.19.0.638151761288.issue18726@psf.upfronthosting.co.za> Bob Ippolito added the comment: My evidence is only anecdotal. I haven't actively searched for code that uses json/simplejson to try and find cases that are using positional arguments. One way to test this assumption would be to release a version of simplejson that deprecates using positional arguments and see if anyone notices. If you feel strongly about it, submit a pull request, and I'll review it (although my availability is spotty for the next two months due to travel). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:01:44 2013 From: report at bugs.python.org (Madison May) Date: Mon, 02 Sep 2013 21:01:44 +0000 Subject: [issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py In-Reply-To: <1377946586.23.0.205823706154.issue18893@psf.upfronthosting.co.za> Message-ID: <1378155704.41.0.758824664051.issue18893@psf.upfronthosting.co.za> Madison May added the comment: Seems like a simple fix -- patch attached. ---------- keywords: +patch nosy: +madison.may Added file: http://bugs.python.org/file31560/issue18893.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:19:25 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 21:19:25 +0000 Subject: [issue18850] xml.etree.ElementTree accepts control chars. In-Reply-To: <1377597051.46.0.147871481267.issue18850@psf.upfronthosting.co.za> Message-ID: <1378156765.31.0.49357344714.issue18850@psf.upfronthosting.co.za> Eli Bendersky added the comment: As Serhiy points out, this is a duplicate of #5166 ---------- superseder: -> ElementTree and minidom don't prevent creation of not well-formed XML _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:19:38 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 21:19:38 +0000 Subject: [issue18850] xml.etree.ElementTree accepts control chars. In-Reply-To: <1377597051.46.0.147871481267.issue18850@psf.upfronthosting.co.za> Message-ID: <1378156778.88.0.719694777876.issue18850@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:19:54 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 21:19:54 +0000 Subject: [issue5166] ElementTree and minidom don't prevent creation of not well-formed XML In-Reply-To: <1233918825.25.0.360851750395.issue5166@psf.upfronthosting.co.za> Message-ID: <1378156794.01.0.131949178889.issue5166@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:30:21 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 02 Sep 2013 21:30:21 +0000 Subject: [issue18907] urllib2.open FTP open times out at 20 secs despite timeout parameter In-Reply-To: <1378145931.18.0.826598432393.issue18907@psf.upfronthosting.co.za> Message-ID: <1378157421.04.0.569194222707.issue18907@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Actually, I think urllib (actually ftplib) handles the timeout correctly. Here's the result on my Linux box (replacing the server with localhost, with a firewall rule to drop packets to ftp port): $ ./python ~/edgartimeouttest3.py Open of ftp://localhost/daily-index failed after 60.09 seconds: And indeed, here's what strace shows: $ strace -ttT ./python ~/edgartimeouttest3.py 23:15:46.953116 connect(3, {sa_family=AF_INET, sin_port=htons(21), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) <0.000066> 23:15:46.953257 poll([{fd=3, events=POLLOUT}], 1, 60000) = 0 (Timeout) <60.011497> See, we - correctly - pass 60s to poll()/select(). Now, I think I know what's going on in your case. It's likely that your TCP/IP stack settings have shorter timeouts than mine, so the kernel reports a timeout on the socket *before the timeout expires*: If I reduce the SYN retries limit (on Linux): # sysctl net.ipv4.tcp_syn_retries=1 net.ipv4.tcp_syn_retries = 1 I now get: $ ./python ~/edgartimeouttest3.py Open of ftp://localhost/daily-index failed after 3.03 seconds: 3s timeout, and yet, we still pass 60 seconds to poll(): 23:19:43.756823 connect(3, {sa_family=AF_INET, sin_port=htons(21), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) <0.000099> 23:19:43.757034 poll([{fd=3, events=POLLOUT}], 1, 60000) = 1 ([{fd=3, revents=POLLOUT|POLLERR|POLLHUP}]) <3.003306> In short, the kernel reports a timeout on the socket because it reached the maximum number of retries for SYN packets. And actually, you can check that the timeouts are correctly processed by passing a smaller value: if it's smaller than the TCP/IP retries limit, you'll get exactly the expected timeout. So I think it's not a Python bug, but rather an issue with your TCP/IP stack settings. On Linux, can you try to increase the following sysctls: #?sysctl net.ipv4.tcp_syn_retries=7 # net.ipv4.tcp_retries1=7 And see if this solves your problem? (BTW, are you "the" John Nagle?) ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:43:01 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 21:43:01 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: <1378142237.02.0.163660197957.issue18906@psf.upfronthosting.co.za> Message-ID: <1378158181.84.0.493033868957.issue18906@psf.upfronthosting.co.za> Eli Bendersky added the comment: A question that comes up is how should a module signal to regrtest that it needs to be run in a subprocess? The most natural approach is to have a special attribute set in the module's global dict (for example: __REGRTEST_SUBPROCESS__ = True); however, there's a slight problem with this approach - regrtest has to import the module to see this attribute, and the module may do some work in its top-level code (commonly, imports) that already needs to be done within a subprocess. One solution is to use a different approach, such as a separate file alongside the test file (i.e. test_foo.regrtest_subprocess alongside test_foo.py). This is quite ugly but "safe". A different solution is to require modules that want to be executed in a subprocess to not do any top-level work; modules can already define a custom test_main function that regrtest discovers - we can require for this feature to work that modules do all their work through this function, rather than in the global scope. ---------- stage: needs patch -> type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:48:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 02 Sep 2013 21:48:27 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: <1378158181.84.0.493033868957.issue18906@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: An easier hack is likely just a new "always run in subprocess" container with submodule names in regrtest.py. It's not elegant, but it will work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:50:36 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 02 Sep 2013 21:50:36 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: Message-ID: Nick Coghlan added the comment: Although the "well, don't do that then" alternative also sounds reasonable, and better localises the information about how the test should run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:52:53 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 21:52:53 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: Message-ID: Eli Bendersky added the comment: > An easier hack is likely just a new "always run in subprocess" container > with submodule names in regrtest.py. It's not elegant, but it will work. > True, that's also an option. I had it in mind in the beginning, but it's too hacky for my tastes :-) Not doing state-changing stuff in the global scope is a good practice anyway, so the restriction should be too horrible. Do we have some sort of conventions of outside-discoverable module attributes (like the __REGRTEST_SUBPROCESS__ proposed above)? I.e. in terms of naming, type, expected values? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:54:31 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 21:54:31 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: <1378142237.02.0.163660197957.issue18906@psf.upfronthosting.co.za> Message-ID: <1378158871.11.0.451186875459.issue18906@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- Removed message: http://bugs.python.org/msg196813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:54:46 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 21:54:46 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: <1378142237.02.0.163660197957.issue18906@psf.upfronthosting.co.za> Message-ID: <1378158886.96.0.213132040174.issue18906@psf.upfronthosting.co.za> Eli Bendersky added the comment: > An easier hack is likely just a new "always run in subprocess" container > with submodule names in regrtest.py. It's not elegant, but it will work. > True, that's also an option. I had it in mind in the beginning, but it's too hacky for my tastes :-) Not doing state-changing stuff in the global scope is a good practice anyway, so the restriction should not be too horrible. Do we have some sort of conventions of outside-discoverable module attributes (like the __REGRTEST_SUBPROCESS__ proposed above)? I.e. in terms of naming, type, expected values? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:57:12 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 02 Sep 2013 21:57:12 +0000 Subject: [issue17930] Search not needed in combinations_with_replacement In-Reply-To: <1367962723.84.0.508821715816.issue17930@psf.upfronthosting.co.za> Message-ID: <1378159032.0.0.738097917435.issue17930@psf.upfronthosting.co.za> Tim Peters added the comment: I'm closing this. While it makes a big difference for a cwr coded in Python, it turn out to be minor in C. The extra complications (more state to remember and update across next() invocations) isn't worth the minor speedup in C. ---------- resolution: -> rejected stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:40:00 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Mon, 02 Sep 2013 22:40:00 +0000 Subject: [issue18908] Enum docs: sections leak out Message-ID: <1378161600.59.0.237500625913.issue18908@psf.upfronthosting.co.za> New submission from Elazar Gershuni: Inner sections "leak" out from enum to the general datatypes index: http://docs.python.org/3.4/library/datatypes.html (sections 8.14 - 8.17) ---------- assignee: docs at python components: Documentation messages: 196816 nosy: docs at python, elazar priority: normal severity: normal status: open title: Enum docs: sections leak out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:40:42 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Mon, 02 Sep 2013 22:40:42 +0000 Subject: [issue18908] Enum docs: sections leak out In-Reply-To: <1378161600.59.0.237500625913.issue18908@psf.upfronthosting.co.za> Message-ID: <1378161642.89.0.516548991134.issue18908@psf.upfronthosting.co.za> Elazar Gershuni added the comment: here's a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file31561/enumcontain.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:47:26 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 22:47:26 +0000 Subject: [issue18908] Enum docs: sections leak out In-Reply-To: <1378161600.59.0.237500625913.issue18908@psf.upfronthosting.co.za> Message-ID: <1378162046.89.0.987087409947.issue18908@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky, ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:47:41 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 02 Sep 2013 22:47:41 +0000 Subject: [issue18908] Enum docs: sections leak out In-Reply-To: <1378161600.59.0.237500625913.issue18908@psf.upfronthosting.co.za> Message-ID: <1378162061.11.0.176148996733.issue18908@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:53:42 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Mon, 02 Sep 2013 22:53:42 +0000 Subject: [issue18908] Enum docs: sections leak out In-Reply-To: <1378161600.59.0.237500625913.issue18908@psf.upfronthosting.co.za> Message-ID: <1378162422.6.0.770384453554.issue18908@psf.upfronthosting.co.za> Changes by Elazar Gershuni : Added file: http://bugs.python.org/file31562/enumindent.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:47:48 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Mon, 02 Sep 2013 23:47:48 +0000 Subject: [issue18908] Enum docs: sections leak out In-Reply-To: <1378161600.59.0.237500625913.issue18908@psf.upfronthosting.co.za> Message-ID: <1378165668.3.0.848720298603.issue18908@psf.upfronthosting.co.za> Changes by Elazar Gershuni : Added file: http://bugs.python.org/file31563/enumplusminor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:53:10 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Mon, 02 Sep 2013 23:53:10 +0000 Subject: [issue18908] Enum docs: sections leak out In-Reply-To: <1378161600.59.0.237500625913.issue18908@psf.upfronthosting.co.za> Message-ID: <1378165990.96.0.118710686226.issue18908@psf.upfronthosting.co.za> Changes by Elazar Gershuni : Removed file: http://bugs.python.org/file31563/enumplusminor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:53:44 2013 From: report at bugs.python.org (Elazar Gershuni) Date: Mon, 02 Sep 2013 23:53:44 +0000 Subject: [issue18908] Enum docs: sections leak out In-Reply-To: <1378161600.59.0.237500625913.issue18908@psf.upfronthosting.co.za> Message-ID: <1378166024.06.0.222911477571.issue18908@psf.upfronthosting.co.za> Changes by Elazar Gershuni : Added file: http://bugs.python.org/file31564/enumplusminor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:01:44 2013 From: report at bugs.python.org (Jakub Stasiak) Date: Tue, 03 Sep 2013 01:01:44 +0000 Subject: [issue17862] itertools.chunks(iterable, size, fill=None) In-Reply-To: <1367165590.04.0.46648726654.issue17862@psf.upfronthosting.co.za> Message-ID: <1378170104.41.0.724576141353.issue17862@psf.upfronthosting.co.za> Jakub Stasiak added the comment: I'm just gonna leave my implementation of chunk function (not sure about the name yet) here, it's basically what itertools.chunks from the previous patch is but it works for arbitrary iterables + few tests and documentation. The last chunk is currently truncated if there are not enough elements to fill it completely. ---------- nosy: +jstasiak Added file: http://bugs.python.org/file31565/itertools.chunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:25:03 2013 From: report at bugs.python.org (Christoph Gohlke) Date: Tue, 03 Sep 2013 01:25:03 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp Message-ID: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> New submission from Christoph Gohlke: Using 64 bit CPython 2.6.6, 2.7.5, 3.2.5 or 3.3.2, numpy 1.7.1 and matplotlib 1.3.0 on Windows 8 64 bit, the following script segfaults most of the times: ``` # allocate ~4GB fragmented data import numpy a = [numpy.zeros(2**i, 'uint8') for i in range(1, 31)] b = [numpy.zeros(131072, 'float64') for i in range(2048)] # plot using TkAgg import matplotlib matplotlib.use('TkAgg') from matplotlib import pyplot pyplot.plot() pyplot.show() ``` ``` Fatal Python error: Segmentation fault Current thread 0x00036c5c: File "X:\Python33\lib\site-packages\matplotlib\backends\tkagg.py", line 17 in blit File "X:\Python33\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 349 in draw File "X:\Python33\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 276 in resize File "X:\Python33\lib\tkinter\__init__.py", line 1475 in __call__ File "X:\Python33\lib\tkinter\__init__.py", line 965 in update File "X:\Python33\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 574 in show File "X:\Python33\lib\site-packages\matplotlib\backend_bases.py", line 87 in __call__ File "X:\Python33\lib\site-packages\matplotlib\pyplot.py", line 145 in show File "tk_crash_win-amd64.py", line 14 in ``` The pointer returned by Python's _tkinter.tkapp.interpaddr() is often wrong because the 64 bit pointer is cast to 32 bit long and returned as PyInt. Instead, the pointer should be cast to Py_ssize_t and returned as PyLong on win-amd64. The following patches for win-amd64-py2.7.5 and win-amd64-py3.3.2 fix the issue: ``` --- a/Modules/_tkinter.c Sun Sep 01 19:06:35 2013 -0400 +++ b/Modules/_tkinter.c Mon Sep 02 17:44:53 2013 -0700 @@ -2814,7 +2814,7 @@ if (!PyArg_ParseTuple(args, ":interpaddr")) return NULL; - return PyInt_FromLong((long)Tkapp_Interp(self)); + return PyInt_FromSsize_t((Py_ssize_t)Tkapp_Interp(self)); } ``` ``` --- a/Modules/_tkinter.c Sun Sep 01 19:03:41 2013 -0400 +++ b/Modules/_tkinter.c Mon Sep 02 17:44:02 2013 -0700 @@ -2688,7 +2688,7 @@ if (!PyArg_ParseTuple(args, ":interpaddr")) return NULL; - return PyLong_FromLong((long)Tkapp_Interp(self)); + return PyLong_FromSsize_t((Py_ssize_t)Tkapp_Interp(self)); } ``` Updated _tkinter.pyd files are available at . ---------- messages: 196819 nosy: cgohlke priority: normal severity: normal status: open title: Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp type: crash versions: Python 2.6, Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:28:13 2013 From: report at bugs.python.org (Christoph Gohlke) Date: Tue, 03 Sep 2013 01:28:13 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <1378171693.34.0.461003235021.issue18909@psf.upfronthosting.co.za> Changes by Christoph Gohlke : Added file: http://bugs.python.org/file31566/tkapp_interpaddr_crash_win-amd64.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:28:29 2013 From: report at bugs.python.org (Christoph Gohlke) Date: Tue, 03 Sep 2013 01:28:29 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <1378171709.75.0.773856421248.issue18909@psf.upfronthosting.co.za> Changes by Christoph Gohlke : ---------- keywords: +patch Added file: http://bugs.python.org/file31567/fix_tkapp_interpaddr-win-amd64-py2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:28:49 2013 From: report at bugs.python.org (Christoph Gohlke) Date: Tue, 03 Sep 2013 01:28:49 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <1378171729.11.0.941787735876.issue18909@psf.upfronthosting.co.za> Changes by Christoph Gohlke : Added file: http://bugs.python.org/file31568/fix_tkapp_interpaddr-win-amd64-py3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:56:46 2013 From: report at bugs.python.org (Phil Webster) Date: Tue, 03 Sep 2013 01:56:46 +0000 Subject: [issue18910] IDLE: Unit test for textView.py Message-ID: <1378173406.38.0.908315708817.issue18910@psf.upfronthosting.co.za> New submission from Phil Webster: Started writing the tests for textView.py. ---------- components: IDLE files: test_textview.patch keywords: patch messages: 196820 nosy: JayKrish, Todd.Rovito, philwebster, terry.reedy priority: normal severity: normal status: open title: IDLE: Unit test for textView.py type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31569/test_textview.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 05:30:23 2013 From: report at bugs.python.org (Mikhail Traskin) Date: Tue, 03 Sep 2013 03:30: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: <1378179023.14.0.519254687534.issue18219@psf.upfronthosting.co.za> Mikhail Traskin added the comment: Peter, thank you for letting me know that views work with list, I was not aware of this. This is indeed the best solution and it also keeps the DictWriter interface unchanged. Terry, attached patch contains the DictWriter change and a test case in test_csv.py. ---------- Added file: http://bugs.python.org/file31570/csvdictwriter.v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 05:53:40 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 03 Sep 2013 03:53:40 +0000 Subject: [issue18553] os.isatty() is not Unix only In-Reply-To: <1374752779.81.0.230915084667.issue18553@psf.upfronthosting.co.za> Message-ID: <1378180420.44.0.544394139286.issue18553@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 05:59:24 2013 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 03 Sep 2013 03:59:24 +0000 Subject: [issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix In-Reply-To: <1368799493.86.0.504478450601.issue17997@psf.upfronthosting.co.za> Message-ID: <1378180764.48.0.487437798903.issue17997@psf.upfronthosting.co.za> Toshio Kuratomi added the comment: So, is this a security issue? I've been wondering if I should apply the attached patch to the backports-ssl_match_hostname module on pypi. I was hoping there'd be some information here as to whether this will be going into the stdlib in the future. Thus far, ssl_match_hostname has just been a backport of the match_hostname function but if this is a security problem, I could press for us to diverge from the python3 stdlib. It would be easier to make the case if this is seen as a critical problem that will need to be fixed even if the current patch might not be the eventual fix. ---------- nosy: +a.badger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 07:36:59 2013 From: report at bugs.python.org (Brian Vanderburg) Date: Tue, 03 Sep 2013 05:36:59 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml Message-ID: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> New submission from Brian Vanderburg: When I have unicode data to save, it seems that it does not save correctly, giving an encode error. I know this exists on 2.7 and from checking the code in xml/dom/minidom.py it looks like it does in 3.2 as well. The method call that seem to be problematic is doc.writexml(open(filename, "wb"), "", " ", "utf-8") Currently I found this to work: doc.writexml(codecs.open(filename, "w", "utf-8"), "", " ", "utf-8") It seems like this should be handled by the writexml method since it already has the specified encoding. ---------- components: XML messages: 196824 nosy: brianvanderburg2 priority: normal severity: normal status: open title: minidom does not encode correctly when calling Document.writexml type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 09:37:53 2013 From: report at bugs.python.org (Stephen J. Turnbull) Date: Tue, 03 Sep 2013 07:37:53 +0000 Subject: [issue18891] Master patch for content manager addtion to email package. In-Reply-To: <1377918603.72.0.362957249668.issue18891@psf.upfronthosting.co.za> Message-ID: <1378193873.32.0.512757291377.issue18891@psf.upfronthosting.co.za> Stephen J. Turnbull added the comment: I'm thinking this may be overengineering, but I may as well post it and find out for sure. :-) Is it worth encapsulating MIME types? They're "really" pairs as far as mail handling applications are concerned, but they have a string representation. So MacPorts 16:29$ python3.3 Python 3.3.2 (default, May 21 2013, 11:48:51) >>> from collections import namedtuple >>> class MIMEType(namedtuple('MIMETYPE', 'type subtype')): ... def __str__(self): ... return "{0}/{1}".format(self.type, self.subtype) ... >>> mt = MIMEType('text', 'plain') >>> str(mt) 'text/plain' >>> t, s = mt >>> print('type =', t, 'subtype =', s) type = text subtype = plain >>> Obviously there needs to be a constructor that handles the 'type/sub' represention. ---------- nosy: +sjt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:08:26 2013 From: report at bugs.python.org (Jeroen Van Goey) Date: Tue, 03 Sep 2013 08:08:26 +0000 Subject: [issue18912] Intendation issue in example code in itertools.count documentation Message-ID: <1378195706.84.0.122771342837.issue18912@psf.upfronthosting.co.za> New submission from Jeroen Van Goey: The sample code in the itertools.count documentation should be indented by 4 spaces. For 2.7.4: lines 3429 till 3432 in http://hg.python.org/releasing/2.7.4/file/026ee0057e2d/Modules/itertoolsmodule.c#l3429 For 3.4.0a1: lines 3981 till 3984 in http://hg.python.org/releasing/py3.4.0a1/file/edc668a667ad/Modules/itertoolsmodule.c#l3981 Also, the example code uses the arguments 'firstval' and 'step' whereas the documentation of the function itself uses the arguments 'start' and 'step'. Maybe better be consistent and use as first argument 'start' in both cases? ---------- assignee: docs at python components: Documentation hgrepos: 207 messages: 196826 nosy: docs at python, jeroen-vangoey priority: normal severity: normal status: open title: Intendation issue in example code in itertools.count documentation type: enhancement versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:08:49 2013 From: report at bugs.python.org (Jeroen Van Goey) Date: Tue, 03 Sep 2013 08:08:49 +0000 Subject: [issue18912] Intendation issue in example code in itertools.count documentation In-Reply-To: <1378195706.84.0.122771342837.issue18912@psf.upfronthosting.co.za> Message-ID: <1378195729.06.0.628336464664.issue18912@psf.upfronthosting.co.za> Changes by Jeroen Van Goey : ---------- hgrepos: -207 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:31:54 2013 From: report at bugs.python.org (Jeroen Van Goey) Date: Tue, 03 Sep 2013 08:31:54 +0000 Subject: [issue18912] Intendation issue in example code in itertools.count documentation In-Reply-To: <1378195706.84.0.122771342837.issue18912@psf.upfronthosting.co.za> Message-ID: <1378197114.27.0.934653540395.issue18912@psf.upfronthosting.co.za> Jeroen Van Goey added the comment: Patch for Python 2.7.4 attached ---------- keywords: +patch Added file: http://bugs.python.org/file31571/2.7itertoolsmodule.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:32:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Sep 2013 08:32:12 +0000 Subject: [issue18835] Add aligned memory variants to the suite of PyMem functions/macros In-Reply-To: <1377995771.98.0.681989822972.issue18835@psf.upfronthosting.co.za> Message-ID: <2036852373.33037416.1378197125681.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > We don't have to align EVERY data structure. But I do have immediate > beneficial use cases for set tables and for data blocks in deque > objects. Can you explain what the use cases are, and post some benchmarking code? Also, what would be the strategy? Would you align every set/deque, or only the bigger ones? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:32:30 2013 From: report at bugs.python.org (Jeroen Van Goey) Date: Tue, 03 Sep 2013 08:32:30 +0000 Subject: [issue18912] Intendation issue in example code in itertools.count documentation In-Reply-To: <1378195706.84.0.122771342837.issue18912@psf.upfronthosting.co.za> Message-ID: <1378197150.21.0.398833796019.issue18912@psf.upfronthosting.co.za> Jeroen Van Goey added the comment: Patch for Python 3.4.0a1 attached ---------- Added file: http://bugs.python.org/file31572/3.4itertoolsmodule.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:52:50 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Tue, 03 Sep 2013 08:52:50 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378198370.02.0.0343227394282.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Removed file: http://bugs.python.org/file31518/fix_for_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:55:25 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Tue, 03 Sep 2013 08:55:25 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378198525.16.0.908428658553.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31573/temp_dir_exists_retry_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 11:21:13 2013 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 03 Sep 2013 09:21:13 +0000 Subject: [issue18902] Make ET event handling more modular to allow custom targets for the non-blocking parser In-Reply-To: <1378080221.59.0.577633252217.issue18902@psf.upfronthosting.co.za> Message-ID: <1378200073.67.0.663559356339.issue18902@psf.upfronthosting.co.za> Stefan Behnel added the comment: > This would make it possible to layer XMLPullParser on top of the stock XMLParser coupled with a special target that collects "events" from the callback calls. Given that we have an XMLPullParser now, I think we should not clutter the API with more classes that do not add anything more than making other classes redundant. So, -1 on adding a special target that collects events. Anyone who wants to use that feature can just use the XMLPullParser. In the Python implementation of that parser, custom targets can already be allowed right now. Only the C implementation prevents it currently (AFAICT) as it has its own built-in TreeBuilder target. Therefore, +1 for the general cleanup to properly allow arbitrary targets as backend. Also, +1 for allowing start-ns and end-ns event callbacks on parser targets, although that's a different feature entirely. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 11:22:31 2013 From: report at bugs.python.org (Jan-Wijbrand Kolman) Date: Tue, 03 Sep 2013 09:22:31 +0000 Subject: [issue18851] subprocess's Popen closes stdout/stderr filedescriptors used in another thread when Popen errors In-Reply-To: <1377605215.82.0.119537279776.issue18851@psf.upfronthosting.co.za> Message-ID: <1378200151.97.0.265618534676.issue18851@psf.upfronthosting.co.za> Jan-Wijbrand Kolman added the comment: Thanks you for the swift followup! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 11:23:09 2013 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 03 Sep 2013 09:23:09 +0000 Subject: [issue18902] Make ElementTree event handling more modular to allow custom targets for the non-blocking parser In-Reply-To: <1378080221.59.0.577633252217.issue18902@psf.upfronthosting.co.za> Message-ID: <1378200189.09.0.773322829905.issue18902@psf.upfronthosting.co.za> Stefan Behnel added the comment: (fixing subject to properly hit bug filters) ---------- title: Make ET event handling more modular to allow custom targets for the non-blocking parser -> Make ElementTree event handling more modular to allow custom targets for the non-blocking parser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 11:27:23 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Tue, 03 Sep 2013 09:27:23 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378200443.96.0.813433573331.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31574/temp_dir_exists_retry_33_34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 11:32:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 09:32:01 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: <1378142237.02.0.163660197957.issue18906@psf.upfronthosting.co.za> Message-ID: <1378200721.76.0.432578428028.issue18906@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The most natural approach is to have a special attribute set in the module's global dict (for example: __REGRTEST_SUBPROCESS__ = True); however, there's a slight problem with this approach - regrtest has to import the module to see this attribute, and the module may do some work in its top-level code (commonly, imports) that already needs to be done within a subprocess. The main regrtest process can run auxilary child process which imports all test modules and says main process which of them have __REGRTEST_SUBPROCESS__=True. It will be even better if the main process runs child process for testing all tests so when any test crashes it is possible to report this and respawn child process to continue testing other tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 11:40:10 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Sep 2013 09:40:10 +0000 Subject: [issue18835] Add aligned memory variants to the suite of PyMem functions/macros In-Reply-To: <1377484371.18.0.399621580043.issue18835@psf.upfronthosting.co.za> Message-ID: <1378201210.34.0.596240804666.issue18835@psf.upfronthosting.co.za> STINNER Victor added the comment: Linux provides the following functions: int posix_memalign(void **memptr, size_t alignment, size_t size); void *valloc(size_t size); # obsolete void *memalign(size_t boundary, size_t size); # obsolete Windows provides the following functions: void* _aligned_malloc(size_t size, size_t alignment); void _aligned_free(void *memblock); _aligned_malloc() has a warning: "Using free is illegal." Do all platform provide at least a function to allocate aligned memory? Windows, Mac OS X, FreeBSD, old operating systems, etc.? If no, how should we handle these operating systems? Refuse to start Python? Disable some optimizations? How should we check in the source code (ex: setobject.c) than aligned allocations are not supported? An #ifdef? *** Because of the Windows API, wee need at least two functions: void* PyMem_MallocAligned(size_t size, size_t alignment); void PyMem_FreeAligned(void *ptr); The GIL must be held when callling these functions. Windows provides also a "realloc" function: void* _aligned_realloc(void *memblock, size_t size, size_t alignment); If the OS does not provide a realloc function, we can reimplement it (malloc, memcpy, free). void* PyMem_ReallocAligned(void *ptr, size_t size, size_t alignment); *** For the PEP 445: the new API is different than the PyMemAllocator structure because malloc and realloc functions have an extra "alignment" parameter. We can drop the parameter if the allocator has always the size alignment, but each object may require a different aligment? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 12:02:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 10:02:55 +0000 Subject: [issue17862] itertools.chunks(iterable, size, fill=None) In-Reply-To: <1367165590.04.0.46648726654.issue17862@psf.upfronthosting.co.za> Message-ID: <1378202575.19.0.461559678753.issue17862@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We should distinguish between at least two different functions. One generates slices of input sequence (it is especially useful for strings and bytes objects), and other groups items from arbitrary iterator into tuples. They have different applications. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 12:24:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 10:24:14 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml In-Reply-To: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> Message-ID: <1378203854.9.0.509881025674.issue18911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On Python 3 you should not only open file in text mode with specified encoding, but also specify the "xmlcharrefreplace" error handler. doc.writexml(open(filename, "w", encoding="utf-8", errors="xmlcharrefreplace"), "", " ", "utf-8") I can suggest only one solution -- explicitly document this behavior. Perhaps we also should add a special module level function for writing DOM tree to binary file. Low-level writexml() should not be used directly. ---------- nosy: +eli.bendersky, scoder, serhiy.storchaka versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 12:51:10 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 03 Sep 2013 10:51:10 +0000 Subject: [issue18912] Intendation issue in example code in itertools.count documentation In-Reply-To: <1378195706.84.0.122771342837.issue18912@psf.upfronthosting.co.za> Message-ID: <1378205470.5.0.876010009681.issue18912@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 13:46:41 2013 From: report at bugs.python.org (=?utf-8?q?Mat=C4=9Bj_Stuchl=C3=ADk?=) Date: Tue, 03 Sep 2013 11:46:41 +0000 Subject: [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 Message-ID: <1378208801.81.0.941164435803.issue18913@psf.upfronthosting.co.za> New submission from Mat?j Stuchl?k: Doing 'valgrind --suppressions=Misc/valgrind-python.supp ./python Lib/tests/test_ssl.py' I'm getting: ==322== LEAK SUMMARY: ==322== definitely lost: 32 bytes in 1 blocks ==322== indirectly lost: 392 bytes in 16 blocks ==322== possibly lost: 1,617,191 bytes in 1,052 blocks ==322== still reachable: 4,068,239 bytes in 3,201 blocks ==322== suppressed: 0 bytes in 0 blocks I managed to reduce that to a shorter reproducer: """ import os import ssl NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir, "nullbytecert.pem") p = ssl._ssl._test_decode_cert(NULLBYTECERT) """ where NULLBYTECERT is the cert introduced in issue18709. Python 2.7 does not leak like this, and the PySSL_test_decode_certificate function looks the same there as in Python 2.6, so I assume it's something else that does the actual leaking. ---------- components: Extension Modules messages: 196837 nosy: sYnfo priority: normal severity: normal status: open title: ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 type: resource usage versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:32:04 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 03 Sep 2013 13:32:04 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378215124.09.0.174952667897.issue18849@psf.upfronthosting.co.za> Eli Bendersky added the comment: The fix looks good to me, in general. Could you create a test that goes along? My only (minor) doubt is whether this should be generalized, in two dimensions: 1. PermissionError is mapped from both EACCES and EPERM. So to make the 2.7 patch equivalent with 3.x, EPERM should also be checked. That said, Windows documents it doesn't really use EPERM (http://msdn.microsoft.com/en-us/library/5814770t.aspx). 2. Should this be restricted to Windows? Could there be other platforms that exhibit the same behavior? On the other hand, say on Linux, EACCES should not happen in a temp dir and so it's good to re-raise it. For (2) I don't think doing anything is necessary at this point - the added test may help because it can fail for some strange platform at some point and then the solution should be obvious. As for (1), adding EPERM into the condition probably can't hurt and it will make Python 2.7 behave more consistently with 3.x in case of some undocumented Windows behavior. ---------- nosy: +eli.bendersky stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:34:02 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Sep 2013 13:34:02 +0000 Subject: [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 In-Reply-To: <1378208801.81.0.941164435803.issue18913@psf.upfronthosting.co.za> Message-ID: <1378215242.02.0.131373790918.issue18913@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: To ensure it's a real memory leak: do the figures increase when the code is called in a loop? I would not consider a single-time malloc (stored in some static variable) to be a leak. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:35:51 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 03 Sep 2013 13:35:51 +0000 Subject: [issue18912] Intendation issue in example code in itertools.count documentation In-Reply-To: <1378195706.84.0.122771342837.issue18912@psf.upfronthosting.co.za> Message-ID: <1378215351.38.0.199554593774.issue18912@psf.upfronthosting.co.za> Eli Bendersky added the comment: LGTM, thanks ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:39:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 Sep 2013 13:39:27 +0000 Subject: [issue18912] Intendation issue in example code in itertools.count documentation In-Reply-To: <1378195706.84.0.122771342837.issue18912@psf.upfronthosting.co.za> Message-ID: <3cTq5V1P41z7Ljb@mail.python.org> Roundup Robot added the comment: New changeset 8e174ee0575a by Eli Bendersky in branch '3.3': Issue #18912: Fix indentation in docstring http://hg.python.org/cpython/rev/8e174ee0575a New changeset 31ef590a0d2f by Eli Bendersky in branch 'default': Issue #18912: Fix indentation in docstring http://hg.python.org/cpython/rev/31ef590a0d2f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:41:48 2013 From: report at bugs.python.org (=?utf-8?q?Mat=C4=9Bj_Stuchl=C3=ADk?=) Date: Tue, 03 Sep 2013 13:41:48 +0000 Subject: [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 In-Reply-To: <1378208801.81.0.941164435803.issue18913@psf.upfronthosting.co.za> Message-ID: <1378215708.02.0.443344690263.issue18913@psf.upfronthosting.co.za> Mat?j Stuchl?k added the comment: That's a good idea: NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir, "nullbytecert.pem") for i in xrange(100): p = ssl._ssl._test_decode_cert(NULLBYTECERT) gives ==1647== LEAK SUMMARY: ==1647== definitely lost: 3,200 bytes in 100 blocks ==1647== indirectly lost: 39,200 bytes in 1,600 blocks ==1647== possibly lost: 591,285 bytes in 545 blocks ==1647== still reachable: 1,955,652 bytes in 3,136 blocks ==1647== suppressed: 0 bytes in 0 blocks so yes, they do increase. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:42:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 Sep 2013 13:42:30 +0000 Subject: [issue18912] Intendation issue in example code in itertools.count documentation In-Reply-To: <1378195706.84.0.122771342837.issue18912@psf.upfronthosting.co.za> Message-ID: <3cTq911DQ2z7Lkh@mail.python.org> Roundup Robot added the comment: New changeset a559cda6a498 by Eli Bendersky in branch '2.7': Close #18912: Fix indentation in docstring http://hg.python.org/cpython/rev/a559cda6a498 ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:47:17 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 03 Sep 2013 13:47:17 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: <1378200721.76.0.432578428028.issue18906@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: On Tue, Sep 3, 2013 at 2:32 AM, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > > The most natural approach is to have a special attribute set in the > module's global dict (for example: __REGRTEST_SUBPROCESS__ = True); > however, there's a slight problem with this approach - regrtest has to > import the module to see this attribute, and the module may do some work in > its top-level code (commonly, imports) that already needs to be done within > a subprocess. > > The main regrtest process can run auxilary child process which imports all > test modules and says main process which of them have > __REGRTEST_SUBPROCESS__=True. > > It will be even better if the main process runs child process for testing > all tests so when any test crashes it is possible to report this and > respawn child process to continue testing other tests. > Well, if we go *that* way, my initial proposal would be to just always run every test in a subprocess. Kind of what happens today with -jN, just also for -j1. Since most people, and I assume bots, run -jN anyway, they already see each test executed in a subprocess. Some folks didn't feel good about it because the stress testing "all in one process" provides is apparently desired. Your proposal complicates the flow significantly, IMHO. I'd just run each test in its own subprocess and be done with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:59:27 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 03 Sep 2013 13:59:27 +0000 Subject: [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 In-Reply-To: <1378208801.81.0.941164435803.issue18913@psf.upfronthosting.co.za> Message-ID: <1378216767.77.0.871525650263.issue18913@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Could you possibly check this in Python 2.7, 3.2 and 3.3?. Python 2.6 is open ONLY for security fixes, if any. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 16:03:14 2013 From: report at bugs.python.org (=?utf-8?q?Mat=C4=9Bj_Stuchl=C3=ADk?=) Date: Tue, 03 Sep 2013 14:03:14 +0000 Subject: [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 In-Reply-To: <1378208801.81.0.941164435803.issue18913@psf.upfronthosting.co.za> Message-ID: <1378216994.58.0.629583994686.issue18913@psf.upfronthosting.co.za> Mat?j Stuchl?k added the comment: Ah, that is unfortunate. I did check it for 2.7 and 3.4, neither of those leak, I can check it for the rest tomorrow, but I imagine it'll be the same story. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 16:04:30 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 03 Sep 2013 14:04:30 +0000 Subject: [issue18891] Master patch for content manager addtion to email package. In-Reply-To: <1377918603.72.0.362957249668.issue18891@psf.upfronthosting.co.za> Message-ID: <1378217070.93.0.157793457052.issue18891@psf.upfronthosting.co.za> R. David Murray added the comment: It's an interesting thought. It bothered me to be handling them as pure strings when writing the code. It just felt wrong somehow :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 16:47:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 14:47:34 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> Message-ID: <1378219654.4.0.0187322327808.issue5202@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is corrected patch (it uses relative seek()) with a lot of tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 17:10:48 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Sep 2013 15:10:48 +0000 Subject: [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 In-Reply-To: <1378208801.81.0.941164435803.issue18913@psf.upfronthosting.co.za> Message-ID: <1378221048.96.0.8308683552.issue18913@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: http://hg.python.org/cpython/rev/c4bbda2d4c49 looks relevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 17:48:32 2013 From: report at bugs.python.org (=?utf-8?q?Mat=C4=9Bj_Stuchl=C3=ADk?=) Date: Tue, 03 Sep 2013 15:48:32 +0000 Subject: [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 In-Reply-To: <1378208801.81.0.941164435803.issue18913@psf.upfronthosting.co.za> Message-ID: <1378223312.17.0.360571444133.issue18913@psf.upfronthosting.co.za> Mat?j Stuchl?k added the comment: Potentially interesting part of the valgrind output: ==21685== 42,400 (3,200 direct, 39,200 indirect) bytes in 100 blocks are definitely lost in loss record 909 of 914 ==21685== at 0x4A0887C: malloc (vg_replace_malloc.c:270) ==21685== by 0x331B06315F: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.1e) ==21685== by 0x331B0CD4EE: sk_new (in /usr/lib64/libcrypto.so.1.0.1e) ==21685== by 0x331B0F2E42: ??? (in /usr/lib64/libcrypto.so.1.0.1e) ==21685== by 0x331B0F2F7B: ??? (in /usr/lib64/libcrypto.so.1.0.1e) ==21685== by 0x331B0F2884: ASN1_item_ex_d2i (in /usr/lib64/libcrypto.so.1.0.1e) ==21685== by 0x331B0F3103: ASN1_item_d2i (in /usr/lib64/libcrypto.so.1.0.1e) ==21685== by 0xB431892: _decode_certificate (_ssl.c:710) ==21685== by 0xB431E57: PySSL_test_decode_certificate (_ssl.c:1025) ==21685== by 0x49D187: PyEval_EvalFrameEx (ceval.c:3750) ==21685== by 0x497A01: PyEval_EvalCodeEx (ceval.c:3000) ==21685== by 0x497B41: PyEval_EvalCode (ceval.c:541) _ssl.c:710 snippet: (...) p = ext->value->data; if (method->it) > names = (GENERAL_NAMES*) (ASN1_item_d2i(NULL, &p, ext->value->length, ASN1_ITEM_ptr(method->it))); else names = (GENERAL_NAMES*) (method->d2i(NULL, &p, ext->value->length)); (...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 18:07:27 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Sep 2013 16:07:27 +0000 Subject: [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 In-Reply-To: <1378208801.81.0.941164435803.issue18913@psf.upfronthosting.co.za> Message-ID: <1378224447.37.0.423282003054.issue18913@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Ah, http://hg.python.org/cpython/rev/80d491aaeed2/ as well then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 18:20:17 2013 From: report at bugs.python.org (=?utf-8?q?Mat=C4=9Bj_Stuchl=C3=ADk?=) Date: Tue, 03 Sep 2013 16:20:17 +0000 Subject: [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6 In-Reply-To: <1378208801.81.0.941164435803.issue18913@psf.upfronthosting.co.za> Message-ID: <1378225217.78.0.117420327529.issue18913@psf.upfronthosting.co.za> Mat?j Stuchl?k added the comment: That seems to be it, no more leaking! Good job! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 18:35:01 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 03 Sep 2013 16:35:01 +0000 Subject: [issue16662] load_tests not invoked in package/__init__.py In-Reply-To: <1355217291.85.0.41912767842.issue16662@psf.upfronthosting.co.za> Message-ID: <1378226101.76.0.102614036697.issue16662@psf.upfronthosting.co.za> Zachary Ware added the comment: I took a stab at the doc changes, attached here and including Barry's patch. ---------- components: +Library (Lib) type: -> enhancement versions: +Python 3.4 Added file: http://bugs.python.org/file31575/16662_with_doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 18:56:45 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 03 Sep 2013 16:56:45 +0000 Subject: [issue18906] Create a way to always run tests in subprocesses within regrtest In-Reply-To: <1378142237.02.0.163660197957.issue18906@psf.upfronthosting.co.za> Message-ID: <1378227405.14.0.0404100039834.issue18906@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 19:00:12 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 03 Sep 2013 17:00:12 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <1378227612.74.0.439934154546.issue18709@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- title: SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) -> SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 19:30:20 2013 From: report at bugs.python.org (Brian Mingus) Date: Tue, 03 Sep 2013 17:30:20 +0000 Subject: [issue18914] Python docs link to terrible outsi Message-ID: <1378229420.77.0.30621022035.issue18914@psf.upfronthosting.co.za> New submission from Brian Mingus: The python documentation links to an outside website for info and examples on http basic auth. This documentation is terrible and confusing. The link should be removed, and user's should be advised to use the Requests library. # this example is from http://www.voidspace.org.uk/python/articles/authentication.shtml # which is linked to by the official python docs http://docs.python.org/2/howto/urllib2.html import urllib2 theurl = 'http://www.someserver.com/toplevelurl/somepage.htm' username = 'johnny' password = 'XXXXXX' # a great password passman = urllib2.HTTPPasswordMgrWithDefaultRealm() # this creates a password manager passman.add_password(None, theurl, username, password) # because we have put None at the start it will always # use this username/password combination for urls # for which `theurl` is a super-url authhandler = urllib2.HTTPBasicAuthHandler(passman) # create the AuthHandler opener = urllib2.build_opener(authhandler) urllib2.install_opener(opener) # All calls to urllib2.urlopen will now use our handler # Make sure not to include the protocol in with the URL, or # HTTPPasswordMgrWithDefaultRealm will be very confused. # You must (of course) use it when fetching the page though. pagehandle = urllib2.urlopen(theurl) # authentication is now handled automatically for us ---------- assignee: docs at python components: Documentation messages: 196854 nosy: docs at python, mingus priority: normal severity: normal status: open title: Python docs link to terrible outsi versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:16:41 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 03 Sep 2013 18:16:41 +0000 Subject: [issue18914] Confusing documentation in the urllib2 HOWTO In-Reply-To: <1378229420.77.0.30621022035.issue18914@psf.upfronthosting.co.za> Message-ID: <1378232201.14.0.913769312868.issue18914@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +michael.foord title: Python docs link to terrible outsi -> Confusing documentation in the urllib2 HOWTO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:25:52 2013 From: report at bugs.python.org (Ethan Furman) Date: Tue, 03 Sep 2013 18:25:52 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1378232752.76.0.0503584599837.issue16938@psf.upfronthosting.co.za> Ethan Furman added the comment: I wonder if it would be better to have inspect.classify_class_attrs be improved instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:32:28 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 03 Sep 2013 18:32:28 +0000 Subject: [issue18747] Re-seed OpenSSL's PRNG after fork In-Reply-To: <1376570101.71.0.249202475923.issue18747@psf.upfronthosting.co.za> Message-ID: <1378233148.38.0.56718013089.issue18747@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: blocker for 2.6.9 ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:32:45 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 03 Sep 2013 18:32:45 +0000 Subject: [issue16043] xmlrpc: gzip_decode has unlimited read() In-Reply-To: <1348570326.9.0.587983624118.issue16043@psf.upfronthosting.co.za> Message-ID: <1378233165.01.0.987062091312.issue16043@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: blocker for 2.6.9 ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:33:16 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 03 Sep 2013 18:33:16 +0000 Subject: [issue16042] smtplib: unlimited readline() from connection In-Reply-To: <1348569609.82.0.499861906556.issue16042@psf.upfronthosting.co.za> Message-ID: <1378233196.28.0.0895096749971.issue16042@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: blocker for 2.6.9 ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:34:02 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 03 Sep 2013 18:34:02 +0000 Subject: [issue16040] nntplib: unlimited readline() from connection In-Reply-To: <1348569525.38.0.219080768405.issue16040@psf.upfronthosting.co.za> Message-ID: <1378233242.0.0.165835656692.issue16040@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: blocker for 2.6.9 ---------- nosy: +barry priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:34:33 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 03 Sep 2013 18:34:33 +0000 Subject: [issue16039] imaplib: unlimited readline() from connection In-Reply-To: <1348569370.53.0.568109495954.issue16039@psf.upfronthosting.co.za> Message-ID: <1378233273.07.0.328700985689.issue16039@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: blocker for 2.6.9 ---------- nosy: +barry priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:34:57 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 03 Sep 2013 18:34:57 +0000 Subject: [issue16038] ftplib: unlimited readline() from connection In-Reply-To: <1348569175.14.0.867789583045.issue16038@psf.upfronthosting.co.za> Message-ID: <1378233297.91.0.428868890554.issue16038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: blocker for 2.6.9 ---------- nosy: +barry priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:35:18 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 03 Sep 2013 18:35:18 +0000 Subject: [issue16037] httplib: header parsing is not delimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1378233318.84.0.848069902213.issue16037@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: blocker for 2.6.9 ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:54:17 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 03 Sep 2013 18:54:17 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1378234457.06.0.824803120844.issue16201@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Here's an updated patch with new tests. It passes the regression test, and yields noticable performance improvements for IPv6: before: $ ./python -m timeit -s "import socket; s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM); DATA = b'hello'" "s.sendto(DATA, ('127.0.0.1', 4242)) " 10000 loops, best of 3: 28 usec per loop $ ./python -m timeit -s "import socket; s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM); DATA = b'hello'" "s.sendto(DATA, ('::1', 4242)) " 10000 loops, best of 3: 59.1 usec per loop after: $ ./python -m timeit -s "import socket; s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM); DATA = b'hello'" "s.sendto(DATA, ('127.0.0.1', 4242)) " 10000 loops, best of 3: 24.8 usec per loop $ ./python -m timeit -s "import socket; s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM); DATA = b'hello'" "s.sendto(DATA, ('::1', 4242)) " 10000 loops, best of 3: 26.7 usec per loop Note that the tests aren't as good as I'd like them to, because apparently some systems (e.g. Solaris) have broken gethostbyaddr()... But it's cleaner, more robust and more efficient. ---------- Added file: http://bugs.python.org/file31576/parse_inet-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:59:56 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 03 Sep 2013 18:59:56 +0000 Subject: [issue18891] Master patch for content manager addtion to email package. In-Reply-To: <1378193873.32.0.512757291377.issue18891@psf.upfronthosting.co.za> Message-ID: <20130903145953.7229303f@anarchist> Barry A. Warsaw added the comment: On Sep 03, 2013, at 07:37 AM, Stephen J. Turnbull wrote: >I'm thinking this may be overengineering, but I may as well post it and find >out for sure. :-) Is it worth encapsulating MIME types? They're "really" >pairs as far as mail handling applications are concerned, but they have a >string representation. Neat idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 21:00:37 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 03 Sep 2013 19:00:37 +0000 Subject: [issue18914] Confusing documentation in the urllib2 HOWTO In-Reply-To: <1378229420.77.0.30621022035.issue18914@psf.upfronthosting.co.za> Message-ID: <1378234837.7.0.878643370531.issue18914@psf.upfronthosting.co.za> R. David Murray added the comment: Suggesting using a 3rd party library in order to explain how to use the python standard library to do something isn't going to work. Would you like to propose an alternate article or an improvement to the howto, using only stdlib facilities? (Note that the external web page linked to is that of an active Python core contributor.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 21:02:28 2013 From: report at bugs.python.org (Brian Mingus) Date: Tue, 03 Sep 2013 19:02:28 +0000 Subject: [issue18914] Confusing documentation in the urllib2 HOWTO In-Reply-To: <1378229420.77.0.30621022035.issue18914@psf.upfronthosting.co.za> Message-ID: <1378234948.5.0.446808276805.issue18914@psf.upfronthosting.co.za> Brian Mingus added the comment: The documentation is confusing. Consider this comment: # All calls to urllib2.urlopen will now use our handler # Make sure not to include the protocol in with the URL, or # HTTPPasswordMgrWithDefaultRealm will be very confused. # You must (of course) use it when fetching the page though. In the actual code he provides, he uses the protocol. Furthermore, before showing a simple way to use the libary, he shows a godawfully complex way. Either the documentation should made beautiful and comprehensible, or it should not be linked to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 21:12:02 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 03 Sep 2013 19:12:02 +0000 Subject: [issue18914] Confusing documentation in the urllib2 HOWTO In-Reply-To: <1378229420.77.0.30621022035.issue18914@psf.upfronthosting.co.za> Message-ID: <1378235522.75.0.660769489432.issue18914@psf.upfronthosting.co.za> R. David Murray added the comment: The article is *explaining* basic auth, thus the pedegogy of the presentation, and why it is a "see also" and not part of the docs proper. I'll admit I don't understand the first part of that comment, since the second part says you do have to put the protocol in the URL, which is what the example does. As I said, would you care to propose a replacement? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 21:14:09 2013 From: report at bugs.python.org (Brian Mingus) Date: Tue, 03 Sep 2013 19:14:09 +0000 Subject: [issue18914] Confusing documentation in the urllib2 HOWTO In-Reply-To: <1378229420.77.0.30621022035.issue18914@psf.upfronthosting.co.za> Message-ID: <1378235649.21.0.151055603693.issue18914@psf.upfronthosting.co.za> Brian Mingus added the comment: Yes - this link was a waste of my time. It would have been better if it had not been there. I propose to replace it with nothing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:29:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 20:29:19 +0000 Subject: [issue17487] wave.Wave_read.getparams should be more user friendly In-Reply-To: <1363726749.83.0.981836859976.issue17487@psf.upfronthosting.co.za> Message-ID: <1378240159.18.0.269917688154.issue17487@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: committed/rejected -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:29:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 20:29:39 +0000 Subject: [issue18901] sunau.getparams should return a namedtuple In-Reply-To: <1378063223.81.0.0712073256156.issue18901@psf.upfronthosting.co.za> Message-ID: <1378240179.95.0.0319192656724.issue18901@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:30:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 20:30:01 +0000 Subject: [issue18878] Add support of the 'with' statement to sunau.open. In-Reply-To: <1377805738.91.0.260228450439.issue18878@psf.upfronthosting.co.za> Message-ID: <1378240201.59.0.38594751195.issue18878@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:31:09 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 03 Sep 2013 20:31:09 +0000 Subject: [issue18914] Confusing documentation in the urllib2 HOWTO In-Reply-To: <1378229420.77.0.30621022035.issue18914@psf.upfronthosting.co.za> Message-ID: <1378240269.17.0.894554641257.issue18914@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:37:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 20:37:55 +0000 Subject: [issue8934] aifc should use str instead of bytes (wave, sunau compatibility) In-Reply-To: <1275936965.71.0.27334704307.issue8934@psf.upfronthosting.co.za> Message-ID: <1378240675.56.0.623769996993.issue8934@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I afraid we can't just change comptype to string. We can allow setcomptype() accept strings and convert them to bytes, but we can't change the type of getcomptype()'s result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:47:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 20:47:49 +0000 Subject: [issue8311] wave module sets data subchunk size incorrectly when writing wav file In-Reply-To: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> Message-ID: <1378241269.55.0.291269877398.issue8311@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:49:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 20:49:15 +0000 Subject: [issue11126] Wave.py does not always write proper length in header In-Reply-To: <1296864048.5.0.627671615909.issue11126@psf.upfronthosting.co.za> Message-ID: <1378241355.64.0.642367135069.issue11126@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> invalid stage: -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:56:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 20:56:34 +0000 Subject: [issue18878] Add support of the 'with' statement to sunau.open. In-Reply-To: <1377805738.91.0.260228450439.issue18878@psf.upfronthosting.co.za> Message-ID: <1378241794.56.0.832043763752.issue18878@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 23:43:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 Sep 2013 21:43:37 +0000 Subject: [issue17487] wave.Wave_read.getparams should be more user friendly In-Reply-To: <1363726749.83.0.981836859976.issue17487@psf.upfronthosting.co.za> Message-ID: <3cV1r92Pz1z7Ljb@mail.python.org> Roundup Robot added the comment: New changeset a14ec46de0a4 by Serhiy Storchaka in branch 'default': Issue #17487: The result of the wave getparams method now is pickleable again. http://hg.python.org/cpython/rev/a14ec46de0a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 23:43:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 Sep 2013 21:43:38 +0000 Subject: [issue18901] sunau.getparams should return a namedtuple In-Reply-To: <1378063223.81.0.0712073256156.issue18901@psf.upfronthosting.co.za> Message-ID: <3cV1rB0fB5z7Ljb@mail.python.org> Roundup Robot added the comment: New changeset 99d26f32aed3 by Serhiy Storchaka in branch 'default': Issue #18901: The sunau getparams method now returns a namedtuple rather than http://hg.python.org/cpython/rev/99d26f32aed3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 00:04:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 22:04:36 +0000 Subject: [issue18901] sunau.getparams should return a namedtuple In-Reply-To: <1378063223.81.0.0712073256156.issue18901@psf.upfronthosting.co.za> Message-ID: <1378245876.94.0.62583101368.issue18901@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Claudiu for your contribution. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 00:06:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 22:06:15 +0000 Subject: [issue17487] wave.Wave_read.getparams should be more user friendly In-Reply-To: <1363726749.83.0.981836859976.issue17487@psf.upfronthosting.co.za> Message-ID: <1378245975.17.0.741074834822.issue17487@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Claudiu. I have changed _Wave_params to _wave_params for consistency with issue17818 and issue18901. ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 00:08:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 22:08:03 +0000 Subject: [issue18878] Add support of the 'with' statement to sunau.open. In-Reply-To: <1377805738.91.0.260228450439.issue18878@psf.upfronthosting.co.za> Message-ID: <1378246083.87.0.785637048613.issue18878@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file31577/sunau_context_manager.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 00:08:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 22:08:39 +0000 Subject: [issue18878] Add support of the 'with' statement to sunau.open. In-Reply-To: <1377805738.91.0.260228450439.issue18878@psf.upfronthosting.co.za> Message-ID: <1378246119.17.0.0124605191101.issue18878@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31512/sunau_context_manager.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 00:09:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 22:09:45 +0000 Subject: [issue18878] Add support of the 'with' statement to sunau.open. In-Reply-To: <1377805738.91.0.260228450439.issue18878@psf.upfronthosting.co.za> Message-ID: <1378246185.89.0.445158672926.issue18878@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I will commit it tomorrow if there are no objections. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 00:37:30 2013 From: report at bugs.python.org (Michael Foord) Date: Tue, 03 Sep 2013 22:37:30 +0000 Subject: [issue18914] Confusing documentation in the urllib2 HOWTO In-Reply-To: <1378229420.77.0.30621022035.issue18914@psf.upfronthosting.co.za> Message-ID: <1378247850.85.0.0369825293616.issue18914@psf.upfronthosting.co.za> Michael Foord added the comment: As David explained, the linked article *explains* basic auth as well as showing how to use the standard library support. I think the article is still of some value, it has certainly been useful to many people. ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 00:49:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 Sep 2013 22:49:38 +0000 Subject: [issue16826] Don't check for PYTHONCASEOK if interpreter started with -E In-Reply-To: <1356964491.55.0.198222992625.issue16826@psf.upfronthosting.co.za> Message-ID: <3cV3JL04qNz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset 934e650abc4d by Meador Inge in branch '3.3': Issue #16826: Don't check for PYTHONCASEOK when using -E. http://hg.python.org/cpython/rev/934e650abc4d New changeset ba850a78cbbc by Meador Inge in branch 'default': Issue #16826: Don't check for PYTHONCASEOK when using -E. http://hg.python.org/cpython/rev/ba850a78cbbc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 00:49:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2013 22:49:58 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <1378248598.82.0.392041619422.issue18909@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is PyLong_FromVoidPtr() for such cases. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 00:50:30 2013 From: report at bugs.python.org (Meador Inge) Date: Tue, 03 Sep 2013 22:50:30 +0000 Subject: [issue16826] Don't check for PYTHONCASEOK if interpreter started with -E In-Reply-To: <1356964491.55.0.198222992625.issue16826@psf.upfronthosting.co.za> Message-ID: <1378248630.66.0.695616908369.issue16826@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 01:15:19 2013 From: report at bugs.python.org (mpb) Date: Tue, 03 Sep 2013 23:15:19 +0000 Subject: [issue18915] ssl.wrap_socket, pass in certfile and keyfile as PEM strings Message-ID: <1378250119.17.0.25988823326.issue18915@psf.upfronthosting.co.za> New submission from mpb: It would be nice to be able to pass ssl.wrap_socket the key and certificate as PEM encoded strings, rather than as paths to files. Similarly for SSLContext.load_cert_chain. ---------- components: Library (Lib) messages: 196878 nosy: mpb priority: normal severity: normal status: open title: ssl.wrap_socket, pass in certfile and keyfile as PEM strings type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 01:15:32 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Sep 2013 23:15:32 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1378250132.41.0.963708223817.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, another TODO: drop the (optional) dependency to psutil. Implement get_process_memory() in C (in the _tracemalloc module). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 01:45:12 2013 From: report at bugs.python.org (Meador Inge) Date: Tue, 03 Sep 2013 23:45:12 +0000 Subject: [issue16826] Don't check for PYTHONCASEOK if interpreter started with -E In-Reply-To: <1356964491.55.0.198222992625.issue16826@psf.upfronthosting.co.za> Message-ID: <1378251912.05.0.105461717254.issue16826@psf.upfronthosting.co.za> Meador Inge added the comment: My last commit caused some buildbot failures (http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.3/builds/1069). I am investigating. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 02:39:05 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 04 Sep 2013 00:39:05 +0000 Subject: [issue18916] Various out-of-date Lock text in 3.2+ Message-ID: <1378255145.39.0.17069692986.issue18916@psf.upfronthosting.co.za> New submission from Tim Peters: Here under 3.3.2: """ >>> from threading import Lock >>> help(Lock) Help on built-in function allocate_lock in module _thread: allocate_lock(...) allocate_lock() -> lock object (allocate() is an obsolete synonym) Create a new lock object. See help(LockType) for information about locks. """ But there is no relevant LockType anymore. The type is now: """ >>> type(Lock()) """ The docs should probably say "help(type(Lock())" instead of "help(LockType)" now. So let's try that: """ >>> help(type(Lock())) Help on class lock in module _thread: class lock(builtins.object) | A lock object is a synchronization primitive. To create a lock, | call the PyThread_allocate_lock() function. """ That's a problem: PyThread_allocate_lock() is a C function, not available (under that name) to Python code. A Python user should probably stick to threading.Lock(). Skipping most other output: """ ... | acquire(...) | acquire([wait]) -> bool | (acquire_lock() is an obsolete synonym) | | Lock the lock. Without argument, this blocks if the lock is already | locked (even by the same thread), waiting for another thread to release | the lock, and return True once the lock is acquired. | With an argument, this will only block if the argument is true, | and the return value reflects whether the lock is acquired. | The blocking operation is interruptible. ... """ That's not the right signature for acquire anymore. Should be acquire(blocking=True, timeout=-1) which is what the threading module docs say. That is, the docs are up-to-date, but the help strings in the code aren't. Since 3.2 is the first version introducing the timeout option, that's the earliest version I selected on this report. I'm going to leave this for someone who wants an easy patch exercise - you're welcome ;-) ---------- components: Interpreter Core keywords: easy messages: 196881 nosy: tim.peters priority: low severity: normal stage: needs patch status: open title: Various out-of-date Lock text in 3.2+ type: behavior versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 02:49:05 2013 From: report at bugs.python.org (Alan Cristhian) Date: Wed, 04 Sep 2013 00:49:05 +0000 Subject: [issue18898] Apply the setobject optimizations to dictionaries In-Reply-To: <1378012493.62.0.577402281969.issue18898@psf.upfronthosting.co.za> Message-ID: <1378255745.48.0.726403123196.issue18898@psf.upfronthosting.co.za> Changes by Alan Cristhian : ---------- nosy: +Alan.Cristhian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 02:54:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Sep 2013 00:54:58 +0000 Subject: [issue16826] Don't check for PYTHONCASEOK if interpreter started with -E In-Reply-To: <1356964491.55.0.198222992625.issue16826@psf.upfronthosting.co.za> Message-ID: <3cV64x3t0Jz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 7801ef4a4ce3 by Meador Inge in branch '3.3': Issue #16826: Revert fix while Windows issues are being worked out. http://hg.python.org/cpython/rev/7801ef4a4ce3 New changeset a1282b67b4cf by Meador Inge in branch 'default': Issue #16826: Revert fix while Windows issues are being worked out. http://hg.python.org/cpython/rev/a1282b67b4cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 03:46:40 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 04 Sep 2013 01:46:40 +0000 Subject: [issue18916] Various out-of-date Lock text in 3.2+ In-Reply-To: <1378255145.39.0.17069692986.issue18916@psf.upfronthosting.co.za> Message-ID: <1378259200.46.0.422304992019.issue18916@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks. I suspect someone will indeed latch on to this soon enough. We use the 'versions' to track what version we are going to fix the bug in. So I've removed 3.2, since that only gets security fixes, and 3.5, since that doesn't exist yet. (If we don't fix this for 3.4, we will change the versions next time we visit the issue.) ---------- nosy: +r.david.murray versions: -Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 04:29:09 2013 From: report at bugs.python.org (Manuke) Date: Wed, 04 Sep 2013 02:29:09 +0000 Subject: [issue15875] tarfile may not make @LongLink for non-ascii character In-Reply-To: <1346981062.61.0.534239636824.issue15875@psf.upfronthosting.co.za> Message-ID: <1378261749.44.0.597346752025.issue15875@psf.upfronthosting.co.za> Changes by Manuke : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 05:00:22 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 04 Sep 2013 03:00:22 +0000 Subject: [issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed In-Reply-To: <1312654346.88.0.619161172388.issue12704@psf.upfronthosting.co.za> Message-ID: <1378263622.12.0.515186604639.issue12704@psf.upfronthosting.co.za> Nikolaus Rath added the comment: *ping* ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 05:54:24 2013 From: report at bugs.python.org (Christoph Gohlke) Date: Wed, 04 Sep 2013 03:54:24 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <1378266864.33.0.630334944711.issue18909@psf.upfronthosting.co.za> Christoph Gohlke added the comment: Is PyLong_FromVoidPtr compatible to PyInt_FromLong on 32 bit Python 2.7? It looks like PyLong_FromVoidPtr returns a PyLong when the address is > 2**31, while PyInt_FromLong returns a PyInt? Not sure it matters. PyLong_FromVoidPtr is certainly cleaner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 05:59:43 2013 From: report at bugs.python.org (Nick) Date: Wed, 04 Sep 2013 03:59:43 +0000 Subject: [issue18917] python won't display greek characters in apache under windows Message-ID: <1378267183.66.0.904044097978.issue18917@psf.upfronthosting.co.za> New submission from Nick: I've set up apache on Windows 7 and I'm running python with cgi. I have a script that contains this: #!C:\Python34\python.exe print ("Content-Type: text/html; charset=utf-8\n") print ("??????") Pretty simple, right? When I'm opening the page to my browser in stead of "??????" I get weird ??? symbols (when the browser is set on UTF-8) If I set my browser to ISO-8859-7 I will get the normal greek letters. "sys.stdout.encoding" will display "cp1253" instead of "utf-8" as it probably should. scripts with only english characters will work totally fine. the problems seems to be on non-english characters. it displays them as ISO-8859-7. this doesn't seem to be an apache or windows issue as PHP and Lua will run just fine and all the scripts will display greek characters in my browser. the problem occurs only with python. ---------- messages: 196886 nosy: nickl1 priority: normal severity: normal status: open title: python won't display greek characters in apache under windows type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 06:01:23 2013 From: report at bugs.python.org (Nick) Date: Wed, 04 Sep 2013 04:01:23 +0000 Subject: [issue18917] python won't display greek characters in apache under windows In-Reply-To: <1378267183.66.0.904044097978.issue18917@psf.upfronthosting.co.za> Message-ID: <1378267283.0.0.904103225714.issue18917@psf.upfronthosting.co.za> Changes by Nick : ---------- components: +Unicode, Windows nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 06:01:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Sep 2013 04:01:25 +0000 Subject: [issue18882] Add threading.main_thread() function In-Reply-To: <1377858406.03.0.871625066732.issue18882@psf.upfronthosting.co.za> Message-ID: <3cVBD46ldsz7LkW@mail.python.org> Roundup Robot added the comment: New changeset 96e55a1a0de7 by Andrew Svetlov in branch 'default': Issue #18882: Add threading.main_thread() function. http://hg.python.org/cpython/rev/96e55a1a0de7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 06:08:19 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 04 Sep 2013 04:08:19 +0000 Subject: [issue18882] Add threading.main_thread() function In-Reply-To: <1377858406.03.0.871625066732.issue18882@psf.upfronthosting.co.za> Message-ID: <1378267699.65.0.317827629596.issue18882@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 06:40:20 2013 From: report at bugs.python.org (bussau) Date: Wed, 04 Sep 2013 04:40:20 +0000 Subject: [issue18918] help('FILES') finds no documentation Message-ID: <1378269620.52.0.763555902483.issue18918@psf.upfronthosting.co.za> New submission from bussau: Calling for help() about the topic 'FILES' returns no documentation found for 'FILES' ------------------------------ Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> help('topics') Here is a list of available topics. Enter any topic name to get more help. ASSERTION DEBUGGING LITERALS SEQUENCEMETHODS2 ASSIGNMENT DELETION LOOPING SEQUENCES ATTRIBUTEMETHODS DICTIONARIES MAPPINGMETHODS SHIFTING ATTRIBUTES DICTIONARYLITERALS MAPPINGS SLICINGS AUGMENTEDASSIGNMENT DYNAMICFEATURES METHODS SPECIALATTRIBUTES BACKQUOTES ELLIPSIS MODULES SPECIALIDENTIFIERS BASICMETHODS EXCEPTIONS NAMESPACES SPECIALMETHODS BINARY EXECUTION NONE STRINGMETHODS BITWISE EXPRESSIONS NUMBERMETHODS STRINGS BOOLEAN FILES NUMBERS SUBSCRIPTS CALLABLEMETHODS FLOAT OBJECTS TRACEBACKS CALLS FORMATTING OPERATORS TRUTHVALUE CLASSES FRAMEOBJECTS PACKAGES TUPLELITERALS CODEOBJECTS FRAMES POWER TUPLES COERCIONS FUNCTIONS PRECEDENCE TYPEOBJECTS COMPARISON IDENTIFIERS PRINTING TYPES COMPLEX IMPORTING PRIVATENAMES UNARY CONDITIONAL INTEGER RETURNING UNICODE CONTEXTMANAGERS LISTLITERALS SCOPING CONVERSIONS LISTS SEQUENCEMETHODS1 >>> help('FILES') no documentation found for 'FILES' -------------------------------------------------------- best regards stephan ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 196888 nosy: docs at python, st.sempert at gmail.com priority: normal severity: normal status: open title: help('FILES') finds no documentation type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 07:45:41 2013 From: report at bugs.python.org (Daniel Farina) Date: Wed, 04 Sep 2013 05:45:41 +0000 Subject: [issue14903] dictobject infinite loop while importing socket In-Reply-To: <1337890784.99.0.00556765207687.issue14903@psf.upfronthosting.co.za> Message-ID: <1378273541.68.0.042758024362.issue14903@psf.upfronthosting.co.za> Daniel Farina added the comment: I've confirmed this in a non-gevent program (actually a very trivial one, I can include the source if anyone asks), in 'initposix'. This is on a quiet system, so OOM is not a very likely explanation. Perhaps signal handling? #0 0x000000000054662d in ?? () #1 0x000000000054d12e in ?? () #2 0x00000000005209e9 in PyDict_SetItem () #3 0x00000000004430cd in ?? () #4 0x0000000000456fcc in initposix () #5 0x0000000000456d2b in ?? () #6 0x000000000055fd03 in ?? () #7 0x00000000005600cb in ?? () #8 0x00000000004a0893 in ?? () #9 0x0000000000560964 in ?? () #10 0x0000000000553eab in ?? () #11 0x00000000004bf2a6 in PyObject_Call () #12 0x00000000004bf5a6 in PyEval_CallObjectWithKeywords () #13 0x000000000046870b in PyEval_EvalFrameEx () #14 0x000000000057bd02 in PyEval_EvalCodeEx () #15 0x000000000057cda8 in PyImport_ExecCodeModuleEx () #16 0x000000000055f6d1 in ?? () #17 0x00000000005600cb in ?? () #18 0x00000000004a0893 in ?? () #19 0x0000000000560964 in ?? () #20 0x0000000000553eab in ?? () #21 0x00000000004bf2a6 in PyObject_Call () #22 0x00000000004bf5a6 in PyEval_CallObjectWithKeywords () #23 0x000000000046870b in PyEval_EvalFrameEx () #24 0x000000000057bd02 in PyEval_EvalCodeEx () #25 0x000000000057cda8 in PyImport_ExecCodeModuleEx () #26 0x000000000055f6d1 in ?? () #27 0x00000000005600cb in ?? () #28 0x00000000004a0893 in ?? () #29 0x0000000000560964 in ?? () #30 0x0000000000553eab in ?? () #31 0x00000000004bf2a6 in PyObject_Call () #32 0x00000000004943c5 in PyObject_CallFunction () #33 0x000000000054dfbe in PyImport_Import () #34 0x000000000050df4d in ?? () #35 0x0000000000511ae2 in ?? () #36 0x0000000000512764 in Py_Main () #37 0x00007f88142bc76d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #38 0x000000000041ba51 in _start () ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 07:49:15 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 04 Sep 2013 05:49:15 +0000 Subject: [issue18918] help('FILES') finds no documentation In-Reply-To: <1378269620.52.0.763555902483.issue18918@psf.upfronthosting.co.za> Message-ID: <1378273755.45.0.188603960504.issue18918@psf.upfronthosting.co.za> Ramchandra Apte added the comment: I am able to reproduce on Python 3.3 as well. ---------- components: -Interpreter Core nosy: +Ramchandra Apte versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 07:49:54 2013 From: report at bugs.python.org (Alex Gaynor) Date: Wed, 04 Sep 2013 05:49:54 +0000 Subject: [issue14903] dictobject infinite loop while importing socket In-Reply-To: <1337890784.99.0.00556765207687.issue14903@psf.upfronthosting.co.za> Message-ID: <1378273794.01.0.742042665619.issue14903@psf.upfronthosting.co.za> Alex Gaynor added the comment: If you could supply the source that'd be great. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 08:12:05 2013 From: report at bugs.python.org (Daniel Farina) Date: Wed, 04 Sep 2013 06:12:05 +0000 Subject: [issue14903] dictobject infinite loop while importing socket In-Reply-To: <1337890784.99.0.00556765207687.issue14903@psf.upfronthosting.co.za> Message-ID: <1378275125.45.0.717032008066.issue14903@psf.upfronthosting.co.za> Daniel Farina added the comment: Attached. The program's function is to take a base64 encoded string and arguments as input and then to materialize this program on disk and run it with its arguments. Notably, this one contains no socket interaction at all, unlike the other examples, which narrows the cause quite a bit. It is run via 'ssh'. Like the other case, it's during module dictionary set-up. ---------- Added file: http://bugs.python.org/file31578/offender.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 08:17:07 2013 From: report at bugs.python.org (Daniel Farina) Date: Wed, 04 Sep 2013 06:17:07 +0000 Subject: [issue14903] dictobject infinite loop in module set-up In-Reply-To: <1337890784.99.0.00556765207687.issue14903@psf.upfronthosting.co.za> Message-ID: <1378275427.01.0.399674453658.issue14903@psf.upfronthosting.co.za> Daniel Farina added the comment: altered title now that it's been seen in init_posix. ---------- title: dictobject infinite loop while importing socket -> dictobject infinite loop in module set-up _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 08:26:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Sep 2013 06:26:23 +0000 Subject: [issue18882] Add threading.main_thread() function In-Reply-To: <1377858406.03.0.871625066732.issue18882@psf.upfronthosting.co.za> Message-ID: <1378275983.81.0.895685169003.issue18882@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think you saw my review, but could you add a docstring to the main_thread() function? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 08:37:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Sep 2013 06:37:12 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <1378276632.89.0.385862354094.issue18909@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: normal -> high stage: -> patch review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 09:31:41 2013 From: report at bugs.python.org (Berker Peksag) Date: Wed, 04 Sep 2013 07:31:41 +0000 Subject: [issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed In-Reply-To: <1312654346.88.0.619161172388.issue12704@psf.upfronthosting.co.za> Message-ID: <1378279901.02.0.908389076719.issue12704@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +pje versions: -Python 2.6, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 09:36:02 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 04 Sep 2013 07:36:02 +0000 Subject: [issue18882] Add threading.main_thread() function In-Reply-To: <1377858406.03.0.871625066732.issue18882@psf.upfronthosting.co.za> Message-ID: <1378280162.39.0.492305255033.issue18882@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I did not received review email, sorry. Docstring is added. BTW 'threading' module has almost no docstrings, that's why I've added only docs at first. Do you think docstrings should be added to all public functions? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 10:24:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Sep 2013 08:24:44 +0000 Subject: [issue18882] Add threading.main_thread() function In-Reply-To: <1378280162.39.0.492305255033.issue18882@psf.upfronthosting.co.za> Message-ID: <1113509780.35752935.1378283078905.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > BTW 'threading' module has almost no docstrings, that's why I've > added only docs at first. > Do you think docstrings should be added to all public functions? Well, probably, although that's another issue :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 10:58:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Sep 2013 08:58:04 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1378285084.96.0.497387748547.issue16201@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Perhaps you could add tests for the broadcast special cases? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 10:58:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Sep 2013 08:58:14 +0000 Subject: [issue16201] socket.gethostbyname incorrectly parses ip In-Reply-To: <1349983863.01.0.255097510924.issue16201@psf.upfronthosting.co.za> Message-ID: <1378285094.12.0.461570699206.issue16201@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: -Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 11:30:48 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Wed, 04 Sep 2013 09:30:48 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378287048.77.0.960814478482.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31579/temp_dir_exists_retry_test_33_34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 11:31:08 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Wed, 04 Sep 2013 09:31:08 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378287068.51.0.676970748814.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31580/temp_dir_exists_retry_test_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:19:58 2013 From: report at bugs.python.org (Jyrki Pulliainen) Date: Wed, 04 Sep 2013 10:19:58 +0000 Subject: [issue16037] httplib: header parsing is not delimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1378289998.42.0.455954252753.issue16037@psf.upfronthosting.co.za> Jyrki Pulliainen added the comment: Reworded TooMuch to TooMany and made a patch for 2.6 too (2.7 didn't apply cleanly there) ---------- Added file: http://bugs.python.org/file31581/issue16037_py26.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:20:03 2013 From: report at bugs.python.org (Jyrki Pulliainen) Date: Wed, 04 Sep 2013 10:20:03 +0000 Subject: [issue16037] httplib: header parsing is not delimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1378290003.44.0.219469785438.issue16037@psf.upfronthosting.co.za> Changes by Jyrki Pulliainen : Added file: http://bugs.python.org/file31582/issue16037_py27_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:20:07 2013 From: report at bugs.python.org (Jyrki Pulliainen) Date: Wed, 04 Sep 2013 10:20:07 +0000 Subject: [issue16037] httplib: header parsing is not delimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1378290007.3.0.180276021551.issue16037@psf.upfronthosting.co.za> Changes by Jyrki Pulliainen : Added file: http://bugs.python.org/file31583/issue16037_py32_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:59:54 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Wed, 04 Sep 2013 10:59:54 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378292394.09.0.985622765948.issue18849@psf.upfronthosting.co.za> Vlad Shcherbina added the comment: 1. I agree that consistency between 2.7 and 3.* have some value, but maybe it's better to take less permissive approach in 3.* instead and only retry when exception is PermissionError _and_ errno is EACCES? 2. Currently it's being reraised unless platform.name == 'nt'. Also, I added a test, so if there are problems on other platforms, they will surface (I myself only tried it on linux and windows 7 though). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 13:11:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2013 11:11:51 +0000 Subject: [issue18919] Unify audio modules tests Message-ID: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Three audio modules, aifc, sunau and wave, have similar interfaces and poor tests. The proposed patch introduces new file Lib/test/audiotests.py with common audio tests. New testing exposes some bugs and discrepancy between different audio modules. For example aifc uses bytes for compression type and name, while sunau and wave use strings (issue8934). aifc closes underlied file object on close(), while sunau and wave don't. wave rounds a framerate, while aifc and sunau truncate it. Different modules have different behaviors when process framedata with length which is not divisible by frame size. ---------- assignee: serhiy.storchaka components: Tests files: audiotests.patch keywords: patch messages: 196900 nosy: Claudiu.Popa, r.david.murray, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Unify audio modules tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31584/audiotests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 13:16:31 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Wed, 04 Sep 2013 11:16:31 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1378293391.76.0.937535634617.issue18919@psf.upfronthosting.co.za> Claudiu.Popa added the comment: I love this idea! I was thinking while working on sunau/aifc/wave patches that we can do more than this, unify the entire audio modules, getting rid of Aifc_write/read and Wave_write/read was in fact my first desire. One way that I thought about was to provide an abc and each module would implement that interface. That way we could create new modules for audio operations for other formats as well. If this sounds like a good idea, I could try to provide a patch for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 13:30:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Sep 2013 11:30:36 +0000 Subject: [issue18901] sunau.getparams should return a namedtuple In-Reply-To: <1378063223.81.0.0712073256156.issue18901@psf.upfronthosting.co.za> Message-ID: <3cVNBM3fr0z7Llj@mail.python.org> Roundup Robot added the comment: New changeset 61ca4732399b by Serhiy Storchaka in branch 'default': Issues #18901, #18919: Fix a typo in the _sunau_params name. http://hg.python.org/cpython/rev/61ca4732399b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 13:30:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Sep 2013 11:30:36 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <3cVNBN1nv1z7LmF@mail.python.org> Roundup Robot added the comment: New changeset 61ca4732399b by Serhiy Storchaka in branch 'default': Issues #18901, #18919: Fix a typo in the _sunau_params name. http://hg.python.org/cpython/rev/61ca4732399b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 13:32:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2013 11:32:06 +0000 Subject: [issue18919] Unify audio modules tests In-Reply-To: <1378293110.61.0.780572869606.issue18919@psf.upfronthosting.co.za> Message-ID: <1378294326.07.0.560128543211.issue18919@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add support of the 'with' statement to sunau.open. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 14:13:18 2013 From: report at bugs.python.org (Nick) Date: Wed, 04 Sep 2013 12:13:18 +0000 Subject: [issue18917] python won't display greek characters in apache under windows In-Reply-To: <1378267183.66.0.904044097978.issue18917@psf.upfronthosting.co.za> Message-ID: <1378296798.49.0.89660279242.issue18917@psf.upfronthosting.co.za> Nick added the comment: Turns out adding "SetEnv PYTHONIOENCODING utf-8" to the end of apache's httpd.conf file fixed the problem for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 14:25:57 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Wed, 04 Sep 2013 12:25:57 +0000 Subject: [issue18615] sndhdr.whathdr could return a namedtuple In-Reply-To: <1375370275.79.0.808837089288.issue18615@psf.upfronthosting.co.za> Message-ID: <1378297557.34.0.488516480751.issue18615@psf.upfronthosting.co.za> Changes by Claudiu.Popa : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 14:30:47 2013 From: report at bugs.python.org (Wolfgang Maier) Date: Wed, 04 Sep 2013 12:30:47 +0000 Subject: [issue18920] argparse module version action Message-ID: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> New submission from Wolfgang Maier: Hi, I just noticed that version output generated via the **'version' action** of the **argparse** module is routed to stderr. I'd expect regular output to go to stdout instead. The current behavior also seems inconsistent to me because --help prints to stdout. Best, Wolfgang ---------- messages: 196905 nosy: wolma priority: normal severity: normal status: open title: argparse module version action type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 14:59:50 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 12:59:50 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378299590.64.0.179948568966.issue18849@psf.upfronthosting.co.za> Eli Bendersky added the comment: Re (1) let's leave it as it is, now. I don't think it really matters. I left some comments in Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:03:48 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 13:03:48 +0000 Subject: [issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed In-Reply-To: <1312654346.88.0.619161172388.issue12704@psf.upfronthosting.co.za> Message-ID: <1378299828.64.0.605084555396.issue12704@psf.upfronthosting.co.za> Eli Bendersky added the comment: Why guess... did you try it in the code? Trying has another goal - it would be nice to have a short code sample here demonstrating what's happening. The paragraph you're quoting seems obscure to me, with or without the fix. ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:13:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2013 13:13:14 +0000 Subject: [issue18615] sndhdr.whathdr could return a namedtuple In-Reply-To: <1375370275.79.0.808837089288.issue18615@psf.upfronthosting.co.za> Message-ID: <1378300394.71.0.332087515499.issue18615@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +r.david.murray stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:17:59 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 13:17:59 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> Message-ID: <1378300679.83.0.346756162676.issue18920@psf.upfronthosting.co.za> Eli Bendersky added the comment: Yes, it seems like an oversight to me. Printing --version to stdout is more customary (Python itself does it, and most other tools do too). A question comes up about backwards compatibility. I would definitely not change it in 2.x - it's just not worth it. As for 3.x, should this go into 3.3 too or just 3.4? ---------- nosy: +bethard, eli.bendersky, serhiy.storchaka versions: +Python 3.4 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:24:21 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 13:24:21 +0000 Subject: [issue18898] Apply the setobject optimizations to dictionaries In-Reply-To: <1378012493.62.0.577402281969.issue18898@psf.upfronthosting.co.za> Message-ID: <1378301061.17.0.237290871161.issue18898@psf.upfronthosting.co.za> Eli Bendersky added the comment: I'm still interested in seeing benchmarks that show where this actually improves things and by how much. Also, whether any regressions occur and how serious they are. ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:26:47 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 04 Sep 2013 13:26:47 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> Message-ID: <1378301207.52.0.672185270845.issue18920@psf.upfronthosting.co.za> Ezio Melotti added the comment: Only on 3.4. Python prints the version on stdout since 3.4 -- before it used stderr: 3.3$ ./python -V 2> /dev/null 3.3$ ./python -V > /dev/null Python 3.3.2+ 3.4$ ./python -V 2> /dev/null Python 3.4.0a1+ 3.4$ ./python -V > /dev/null This might also explain why argparse uses stderr (other modules/scripts in the stdlib might do the same too). ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:34:23 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 13:34:23 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378301207.52.0.672185270845.issue18920@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: On Wed, Sep 4, 2013 at 6:26 AM, Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Only on 3.4. > Python prints the version on stdout since 3.4 -- before it used stderr: > 3.3$ ./python -V 2> /dev/null > 3.3$ ./python -V > /dev/null > Python 3.3.2+ > > 3.4$ ./python -V 2> /dev/null > Python 3.4.0a1+ > 3.4$ ./python -V > /dev/null > > This might also explain why argparse uses stderr (other modules/scripts in > the stdlib might do the same too). > Ah, right. On 3.4 Python's main.c uses printf for --version; on earlier versions it's fprintf(stderr...) I guess it's a no-brainer then; 3.4 has to be changed, but not earlier versions. I'll whip up a quick patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:36:11 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 13:36:11 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> Message-ID: <1378301771.28.0.355674538222.issue18920@psf.upfronthosting.co.za> Eli Bendersky added the comment: The Python executable change is from #18338 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:38:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Sep 2013 13:38:19 +0000 Subject: [issue18898] Apply the setobject optimizations to dictionaries In-Reply-To: <1378012493.62.0.577402281969.issue18898@psf.upfronthosting.co.za> Message-ID: <1378301899.48.0.652847433269.issue18898@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:40:00 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 04 Sep 2013 13:40:00 +0000 Subject: [issue18693] help() not helpful with enum In-Reply-To: <1376013592.17.0.550012846255.issue18693@psf.upfronthosting.co.za> Message-ID: <1378302000.24.0.157110150739.issue18693@psf.upfronthosting.co.za> Ethan Furman added the comment: Found it! It was a combination of __objclass__ not being defined on the enum mmebers, and the metatype not being searched in the __mro__ by inspect. Thanks, Ronald, for the necessary clues. Patch attached. I'm not sure if I have the method wowser showing up in the correct dir(). Thoughts? ---------- keywords: +patch stage: committed/rejected -> patch review Added file: http://bugs.python.org/file31585/issue18693.stoneleaf.01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:43:54 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 04 Sep 2013 13:43:54 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1378302234.36.0.0255506282829.issue16938@psf.upfronthosting.co.za> Ethan Furman added the comment: Issue18693 has a patch to `inspect` so that classify_class_attrs will also look in the metaclass. If that is accepted I think PyDoc is okay as is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:48:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2013 13:48:28 +0000 Subject: [issue8311] wave module sets data subchunk size incorrectly when writing wav file In-Reply-To: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> Message-ID: <1378302508.44.0.180507143703.issue8311@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It's because you write an array of integers while writeframes() expects a bytes object. Here is a test. ---------- keywords: +patch stage: test needed -> needs patch versions: +Python 2.7, Python 3.3, Python 3.4 -Python 2.6 Added file: http://bugs.python.org/file31586/wave_test_write_array.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:49:32 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 13:49:32 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> Message-ID: <1378302572.24.0.0242902781691.issue18920@psf.upfronthosting.co.za> Eli Bendersky added the comment: Patch attached ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file31587/issue18920.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:51:39 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 13:51:39 +0000 Subject: [issue18693] help() not helpful with enum In-Reply-To: <1376013592.17.0.550012846255.issue18693@psf.upfronthosting.co.za> Message-ID: <1378302699.3.0.0260318223317.issue18693@psf.upfronthosting.co.za> Eli Bendersky added the comment: Great, Ethan. I'd say the inspect fix has to be reviewed and committed separately. Maybe #16938 is the right place to post the patch for it. Once that's in, we can review/commit the enum parts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 16:03:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2013 14:03:43 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> Message-ID: <1378303423.25.0.426418842539.issue18920@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > This might also explain why argparse uses stderr (other modules/scripts in the stdlib might do the same too). Lib/trace.py, Tools/pynche/Main.py, and Tools/i18n/pygettext.py write to the stdout. Lib/smtpd.py and Tools/i18n/msgfmt.py write to the stderr. The optparse module also writes to the stdout. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 16:13:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2013 14:13:10 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> Message-ID: <1378303990.26.0.0614344174364.issue18920@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You misplace Misc/NEWS entry in wrong section -- "What's New in Python 3.4.0 Alpha 1". I think this change (as change of issue18338) worths the mentioning in Doc/whatsnew/3.4.rst. Did you run all test suite? This change can affect other tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 16:27:30 2013 From: report at bugs.python.org (Steven Murdoch) Date: Wed, 04 Sep 2013 14:27:30 +0000 Subject: [issue18921] In imaplib, cached capabilities may be out of date after login Message-ID: <1378304850.85.0.68028293284.issue18921@psf.upfronthosting.co.za> New submission from Steven Murdoch: When an IMAP server is behind a proxy, the proxy's capabilities may differ from that of the actual IMAP server. However, in Python imaplib, the client will ignore any updates to available capabilities in the response to the LOGIN command (see rfc3501, section 6.2.3). As a result, imaplib will incorrectly assume that certain features are not available (including the IDLE patch in issue 11245, and as implemented in getmail 4.43.0). imaplib should refresh its capability list either based on the result of the login command or by explicitly sending a CAPABILITY command following login. ---------- components: Library (Lib) messages: 196920 nosy: sjmurdoch priority: normal severity: normal status: open title: In imaplib, cached capabilities may be out of date after login type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 16:28:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2013 14:28:55 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <1378304935.92.0.16177319048.issue18909@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed, for less surprise we should use PyInt_FromSsize_t() on Python 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 16:49:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2013 14:49:28 +0000 Subject: [issue18922] Output versions of scripts to stdout Message-ID: <1378306168.12.0.839885180116.issue18922@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write their version strings to stderr. It should be changed to stdout for consistency with most common practice. See also issue18338 and issue18920. ---------- components: Demos and Tools, Library (Lib) keywords: easy messages: 196922 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Output versions of scripts to stdout type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 17:07:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Sep 2013 15:07:42 +0000 Subject: [issue18808] Thread.join returns before PyThreadState is destroyed In-Reply-To: <1377982884.97.0.741244299739.issue18808@psf.upfronthosting.co.za> Message-ID: <426932132.36686992.1378307256182.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > What I still don't understand: the new lock is an internal > implementation detail. How would it gain a weakref with a callback? > Users aren't going to mess with this lock, and if you want to stop > Python maintainers from giving it a weakref with a callback, simply > say they shouldn't do that (in the code comments) - you could even > add code verifying it doesn't have any weakrefs outstanding > (although that would likely be a waste of time and code: no > maintainer is going to _want_ to make a weakref to it, let alone a > weakref with a callback). Well... perhaps I'm being too perfectionist, but I don't want Python to be crashable merely by manipulating a Thread object's private attributes. If I add some check code, it will quickly become more complicated than the current weakref version, which works by design :-) > My concern is the bulk and obscurity of this code, all to plug such a > minor hole. I call it "minor" because it's been reported once in > the history of the project, and Tamas wormed around it with a > 1-liner (added a sleep). Yeah, the overall concern is a bit obscure, but still: right now, if you use threads inside a subinterpreter, your code can work or crash depending on subtle timing conditions (where "crash" doesn't even mean "raise an exception" but "abort the whole process"). So I think it's worth trying to fix, even though the complication can look a bit disproportionate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 17:08:54 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 04 Sep 2013 15:08:54 +0000 Subject: [issue18693] help() not helpful with enum In-Reply-To: <1378302699.3.0.0260318223317.issue18693@psf.upfronthosting.co.za> Message-ID: <52274D07.4080705@stoneleaf.us> Ethan Furman added the comment: help() won't really be fixed with the inspect patch. If no objections within a few hours I'll open a new issue for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 17:17:11 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 04 Sep 2013 15:17:11 +0000 Subject: [issue18921] In imaplib, cached capabilities may be out of date after login In-Reply-To: <1378304850.85.0.68028293284.issue18921@psf.upfronthosting.co.za> Message-ID: <1378307831.7.0.824148980901.issue18921@psf.upfronthosting.co.za> R. David Murray added the comment: I agree that this would be a good idea, but it is not a bug in the current implementation. The only place imaplib itself uses the cached capabilities is *before* login, in the starttls method, and there it refreshes it after starttls succeeds. Although it isn't documented any more than the 'capabilities' attribute is (and therefor neither are part of the public API currently), you can call the capability command yourself if you need the refreshed capabilities in your own code. Good catch on the bug in the IDLE patch, though. ---------- nosy: +r.david.murray stage: -> needs patch type: behavior -> enhancement versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 17:18:59 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 04 Sep 2013 15:18:59 +0000 Subject: [issue11245] Implementation of IMAP IDLE in imaplib? In-Reply-To: <1298061371.03.0.0638918089315.issue11245@psf.upfronthosting.co.za> Message-ID: <1378307939.72.0.402348881657.issue11245@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- dependencies: +In imaplib, cached capabilities may be out of date after login _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 18:23:02 2013 From: report at bugs.python.org (Erik Bray) Date: Wed, 04 Sep 2013 16:23:02 +0000 Subject: [issue18876] Problems with files opened in append mode with io module In-Reply-To: <1377796053.23.0.271574141063.issue18876@psf.upfronthosting.co.za> Message-ID: <1378311782.32.0.543492640781.issue18876@psf.upfronthosting.co.za> Changes by Erik Bray : Added file: http://bugs.python.org/file31588/issue_18876_patch_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 19:05:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Sep 2013 17:05:45 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <3cVWd50nwwz7LnZ@mail.python.org> Roundup Robot added the comment: New changeset e4d45315c38c by Charles-Fran?ois Natali in branch 'default': Issue #16853: Add new selectors module. http://hg.python.org/cpython/rev/e4d45315c38c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 19:31:21 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Sep 2013 17:31:21 +0000 Subject: [issue16038] ftplib: unlimited readline() from connection In-Reply-To: <1348569175.14.0.867789583045.issue16038@psf.upfronthosting.co.za> Message-ID: <1378315881.45.0.104125913278.issue16038@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I'm attaching a slightly different patch including new tests and which uses a 'maxline' class attribute (as opposed to a global var). Christian if that's OK with you I will wait a while and then make a commit for all Python versions. ---------- Added file: http://bugs.python.org/file31589/ftplib_maxline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 19:38:34 2013 From: report at bugs.python.org (Meador Inge) Date: Wed, 04 Sep 2013 17:38:34 +0000 Subject: [issue16826] Don't check for PYTHONCASEOK if interpreter started with -E In-Reply-To: <1356964491.55.0.198222992625.issue16826@psf.upfronthosting.co.za> Message-ID: <1378316314.73.0.109916883978.issue16826@psf.upfronthosting.co.za> Meador Inge added the comment: Reopening to rework test cases. ---------- resolution: fixed -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 19:47:08 2013 From: report at bugs.python.org (Li Wah Teng) Date: Wed, 04 Sep 2013 17:47:08 +0000 Subject: [issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1378316828.12.0.720979263897.issue7511@psf.upfronthosting.co.za> Li Wah Teng added the comment: About the "'KEY_BASE' is not defined" error in Steve Dower's diff, I was able to fix it by adding the following line before the KEY_BASE variable is referenced: KEY_BASE = r"Software\Microsoft\\" With this, I was finally able to use the patched msvccompiler9.py to build PyCrypto using VS Express 2010 with Windows SDK 7.1 and Python 3.3.2 (64-bit) installed. If someone can confirm that this is the only thing missing in the 2 versions of the msvccompiler9.diff files, it would be great. Hope it helps! ---------- nosy: +lwteng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 19:50:00 2013 From: report at bugs.python.org (Berker Peksag) Date: Wed, 04 Sep 2013 17:50:00 +0000 Subject: [issue18922] Output versions of scripts to stdout In-Reply-To: <1378306168.12.0.839885180116.issue18922@psf.upfronthosting.co.za> Message-ID: <1378317000.72.0.670433487087.issue18922@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:27:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2013 18:27:17 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <3cVWd50nwwz7LnZ@mail.python.org> Message-ID: STINNER Victor added the comment: > New changeset e4d45315c38c by Charles-Fran?ois Natali in branch 'default': > Issue #16853: Add new selectors module. > http://hg.python.org/cpython/rev/e4d45315c38c Great! Congrats Charles-Fran?ois for the new module! I tried to implement such module once but I gave up because it was more complex than what I expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:30:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Sep 2013 18:30:48 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <3cVYWD0Js4z7Lp6@mail.python.org> Roundup Robot added the comment: New changeset 6b14ebe0f7ac by Victor Stinner in branch 'default': Issue #16853: Mention the new selectors module in What's New in Python 3.4 http://hg.python.org/cpython/rev/6b14ebe0f7ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:31:46 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 04 Sep 2013 18:31:46 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <1378319506.28.0.605001961441.issue16853@psf.upfronthosting.co.za> Guido van Rossum added the comment: Agreed, this was a great feat of implementation and API design. Is there anything left to do or can we close this issue? (I looked at the Proactor code in Tulip again and I think it is not quite as easy to isolate it, so I'm not requesting that Proactors be added to the stdlib at this time.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:35:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2013 18:35:44 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <1378319744.06.0.867324407833.issue16853@psf.upfronthosting.co.za> STINNER Victor added the comment: > Is there anything left to do or can we close this issue? It would be nice to mention the new selectors module in the documentation of the select module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:37:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Sep 2013 18:37:14 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1378319744.06.0.867324407833.issue16853@psf.upfronthosting.co.za> Message-ID: <1378319826.2577.0.camel@fsol> Antoine Pitrou added the comment: > > Is there anything left to do or can we close this issue? > > It would be nice to mention the new selectors module in the documentation of the select module. Feel free to make documentation commits :) They don't necessarily have to pass a review stage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:40:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Sep 2013 18:40:27 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <3cVYkL6np9zSDD@mail.python.org> Roundup Robot added the comment: New changeset 142ff216e4b4 by Victor Stinner in branch 'default': Issue #16853: Mention the new selectors module in the select module http://hg.python.org/cpython/rev/142ff216e4b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:41:35 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2013 18:41:35 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module Message-ID: <1378320095.08.0.301150241372.issue18923@psf.upfronthosting.co.za> New submission from STINNER Victor: Python 3.4 has a new selectors module (issue #16853). It would be nice to use it instead of select.poll or select.select in the subprocess module. ---------- messages: 196936 nosy: haypo priority: normal severity: normal status: open title: Use the new selectors module in the subprocess module type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:44:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2013 18:44:54 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module In-Reply-To: <1378320095.08.0.301150241372.issue18923@psf.upfronthosting.co.za> Message-ID: <1378320294.46.0.495933222446.issue18923@psf.upfronthosting.co.za> STINNER Victor added the comment: Other modules using select.select() or select.poll() for more than 1 file descriptor: - asyncore - multiprocessing.connection - multiprocessing.forkserver ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:44:57 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 04 Sep 2013 18:44:57 +0000 Subject: [issue18823] Idle: use pipes instead of sockets to talk with user subprocess In-Reply-To: <1377300904.13.0.124289838176.issue18823@psf.upfronthosting.co.za> Message-ID: <1378320297.53.0.790235433924.issue18823@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:45:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2013 18:45:33 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <1378320333.78.0.928681855077.issue16853@psf.upfronthosting.co.za> STINNER Victor added the comment: > Feel free to make documentation commits :) Ok, done. I also created the issue #18923: "Use the new selectors module in the subprocess module". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:47:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Sep 2013 18:47:05 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <1378320425.9.0.654145714778.issue16853@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I feel this can be closed then :) Thanks, Charles-Fran?ois! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:48:10 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Sep 2013 18:48:10 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <1378320490.36.0.0707186762122.issue16853@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > Is there anything left to do or can we close this issue? Add support for select.devpoll on Solaris. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:49:26 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 04 Sep 2013 18:49:26 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <1378320566.65.0.272219744611.issue16853@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > Is there anything left to do or can we close this issue? I usually wait until the test is run on the buildbots to check I didn't break anything: apparently that's OK, so we can close. > It would be nice to mention the new selectors module in the documentation of the select module. Indeed (I mentioned the select module in selectors' doc, but the contrary is certainly useful to point users to this new module), thanks for your commit. Where were you when I asked for documentation review ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:58:01 2013 From: report at bugs.python.org (Nicola Palumbo) Date: Wed, 04 Sep 2013 18:58:01 +0000 Subject: [issue18922] Output versions of scripts to stdout In-Reply-To: <1378306168.12.0.839885180116.issue18922@psf.upfronthosting.co.za> Message-ID: <1378321081.11.0.552450521086.issue18922@psf.upfronthosting.co.za> Nicola Palumbo added the comment: Now The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write their version strings to stdout, and not to sderr. Applying the patch the stdout can be redirect /python.exe Lib/smtpd.py --version >> /dev/null Without the patch: /python.exe Lib/smtpd.py --version >> /dev/null Python SMTP proxy version 0.3 ---------- keywords: +patch nosy: +npalumbo Added file: http://bugs.python.org/file31590/issue18922.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:58:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Sep 2013 18:58:06 +0000 Subject: [issue18876] Problems with files opened in append mode with io module In-Reply-To: <1377796053.23.0.271574141063.issue18876@psf.upfronthosting.co.za> Message-ID: <3cVZ6j3mNcz7Ll5@mail.python.org> Roundup Robot added the comment: New changeset 33bd39b67cc1 by Antoine Pitrou in branch '3.3': Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened. http://hg.python.org/cpython/rev/33bd39b67cc1 New changeset b5530669ef70 by Antoine Pitrou in branch 'default': Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened. http://hg.python.org/cpython/rev/b5530669ef70 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:59:00 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 04 Sep 2013 18:59:00 +0000 Subject: [issue18829] csv produces confusing error message when passed a non-string delimiter In-Reply-To: <1377435383.74.0.241640816854.issue18829@psf.upfronthosting.co.za> Message-ID: <1378321140.76.0.138473791804.issue18829@psf.upfronthosting.co.za> Ezio Melotti added the comment: IMHO the error should say """TypeError: "delimiter" must be an 1-character string, not bytes""". We could also have two separate errors for "wrong type" and "right type, wrong length" (this would be a ValueError though). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:07:22 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 04 Sep 2013 19:07:22 +0000 Subject: [issue18853] Got ResourceWarning unclosed file when running Lib/shlex.py demo In-Reply-To: <1377612267.45.0.680080135941.issue18853@psf.upfronthosting.co.za> Message-ID: <1378321642.68.0.838767317108.issue18853@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:09:05 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 04 Sep 2013 19:09:05 +0000 Subject: [issue18856] Added test coverage for calendar print functions In-Reply-To: <1377631161.77.0.572665348858.issue18856@psf.upfronthosting.co.za> Message-ID: <1378321745.59.0.153555930973.issue18856@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> patch review versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:09:56 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 04 Sep 2013 19:09:56 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1378321796.04.0.134923050782.issue18857@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:10:48 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 04 Sep 2013 19:10:48 +0000 Subject: [issue18859] README.valgrind should mention --with-valgrind In-Reply-To: <1377649189.0.0.381916551624.issue18859@psf.upfronthosting.co.za> Message-ID: <1378321848.82.0.0967518088139.issue18859@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:47:27 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 04 Sep 2013 19:47:27 +0000 Subject: [issue18924] Enum members are easily replaced Message-ID: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> New submission from Ethan Furman: Python 3.4.0a1+ (default:33727fbb4668+, Aug 31 2013, 12:34:55) [GCC 4.7.3] on linux Type "help", "copyright", "credits" or "license" for more information. --> import enum --> class Test(enum.Enum): ... this = 'that' ... --> Test.this --> Test.this = 9 --> Test.this 9 I'm pretty sure we don't want that. ---------- assignee: ethan.furman messages: 196945 nosy: barry, eli.bendersky, ethan.furman priority: normal severity: normal status: open title: Enum members are easily replaced type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:55:49 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 04 Sep 2013 19:55:49 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <20130904155546.66f94117@anarchist> Barry A. Warsaw added the comment: On Sep 04, 2013, at 07:47 PM, Ethan Furman wrote: >I'm pretty sure we don't want that. Agreed, although a "we're all consenting adults" argument could be made. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 22:04:25 2013 From: report at bugs.python.org (Lukas Wunner) Date: Wed, 04 Sep 2013 20:04:25 +0000 Subject: [issue18045] get_python_version is not import in bdist_rpm.py In-Reply-To: <1369355842.75.0.290813933305.issue18045@psf.upfronthosting.co.za> Message-ID: <1378325065.47.0.100672032597.issue18045@psf.upfronthosting.co.za> Lukas Wunner added the comment: The attached patch adds just the missing import statement (which already exists in all 3.x versions) and changes nothing else. ---------- nosy: +l Added file: http://bugs.python.org/file31591/issue18045-py27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 22:12:46 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 04 Sep 2013 20:12:46 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <20130904155546.66f94117@anarchist> Message-ID: <5227943F.8070701@stoneleaf.us> Ethan Furman added the comment: I'm not suggesting we try to make it impossible, just tougher (akin to what we did with the name and value attributes on an Enum member -- at Guido's behest, no less ;). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 22:18:37 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 20:18:37 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <1378325917.86.0.199419869209.issue18924@psf.upfronthosting.co.za> Eli Bendersky added the comment: Time for your friendly devil's advocate... We're using and loving this language: >>> class Foo: ... bar = 2 ... >>> f = Foo() >>> f.bar 2 >>> f.bar = 42 >>> f.bar 42 >>> So let's stop trying to make enums even more alien. This is a non-issue in Python. [Barry, how come your name in the tracker is linked to your website? me wants...] ---------- keywords: +buildbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 22:23:19 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 04 Sep 2013 20:23:19 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378325917.86.0.199419869209.issue18924@psf.upfronthosting.co.za> Message-ID: <20130904162316.7825bb13@anarchist> Barry A. Warsaw added the comment: On Sep 04, 2013, at 08:18 PM, Eli Bendersky wrote: >[Barry, how come your name in the tracker is linked to your website? me >wants...] Go to "Your Details" in the left sidebar and enter a "Homepage". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 22:34:36 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 20:34:36 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <1378326876.68.0.287807964863.issue18924@psf.upfronthosting.co.za> Eli Bendersky added the comment: "You do not have permission to edit user" - in a red banner, no less. Blasphemy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 22:46:24 2013 From: report at bugs.python.org (jort bloem) Date: Wed, 04 Sep 2013 20:46:24 +0000 Subject: [issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable In-Reply-To: <1377807943.36.0.898364678904.issue18879@psf.upfronthosting.co.za> Message-ID: <1378327584.89.0.274856143475.issue18879@psf.upfronthosting.co.za> jort bloem added the comment: I am only new to Python, but... Having looked at the code, I am surprised that the _TemporaryFileWrapper is not a subclass of "file". Surely that would be the "python" way, and would solve this problem, too? __getattr__ would no longer be needed. The opening of the file is within the library, so _os.open() could be replaced with file()... It would require rewriting/reorganising chunks of this code... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 22:53:58 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Sep 2013 20:53:58 +0000 Subject: [issue18925] select.poll.modify is not documented Message-ID: <1378328037.99.0.424927131422.issue18925@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': It was introduced in Python 2.6: http://bugs.python.org/issue1657 Will commit a patch soon. ---------- assignee: docs at python components: Documentation messages: 196953 nosy: docs at python, giampaolo.rodola priority: normal severity: normal status: open title: select.poll.modify is not documented versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 22:57:37 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 04 Sep 2013 20:57:37 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378325917.86.0.199419869209.issue18924@psf.upfronthosting.co.za> Message-ID: <52279EC2.8000205@stoneleaf.us> Ethan Furman added the comment: Eli Bendersky added the comment: > > So let's stop trying to make enums even more alien. This is a non-issue in Python. Enumerations are supposed to be constant. Since this is Python there is actually very little that cannot be changed, but we can make objects better reflect our intent. For Enum members Guido had me change the `value` and `name` attributes to properties because the value and name should also be constant. Can they still be changed? Yes, but you have to know what you're doing. (Enum.member._name_ = ... ) I'm proposing we do the same thing for the Enum class that we did for the Enum member. To me, an Enumeration that lets you change its constants higgledy-piggledy is way more alien than one that tries to stay, um, /constant/. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 23:08:14 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 04 Sep 2013 21:08:14 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <52279EC2.8000205@stoneleaf.us> Message-ID: Eli Bendersky added the comment: On Wed, Sep 4, 2013 at 1:57 PM, Ethan Furman wrote: > > Ethan Furman added the comment: > > Eli Bendersky added the comment: > > > > So let's stop trying to make enums even more alien. This is a non-issue > in Python. > > Enumerations are supposed to be constant. Since this is Python there is > actually very little that cannot be changed, > but we can make objects better reflect our intent. > > For Enum members Guido had me change the `value` and `name` attributes to > properties because the value and name should > also be constant. Can they still be changed? Yes, but you have to know > what you're doing. (Enum.member._name_ = ... ) > > I'm proposing we do the same thing for the Enum class that we did for the > Enum member. > > To me, an Enumeration that lets you change its constants higgledy-piggledy > is way more alien than one that tries to > stay, um, /constant/. > I can empathize with your reasoning, but I'm still -1. There's an infinite amount of tweaks you can think of to make Enum "safer", in a language that by design is unsafe for such operations. You will keep finding new holes, because the language will keep fighting you. And the end result? A bit more theoretical purity, hardly any tangible gain. But more complex code, which makes it more prone to bugs and more difficult to understand. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 23:09:25 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 04 Sep 2013 21:09:25 +0000 Subject: [issue18808] Thread.join returns before PyThreadState is destroyed In-Reply-To: <1377179797.68.0.40345735309.issue18808@psf.upfronthosting.co.za> Message-ID: <1378328965.4.0.848447681959.issue18808@psf.upfronthosting.co.za> Tim Peters added the comment: Oh, I'm not opposed, I'm just complaining ;-) It would be much nicer to have an approach that worked for all thread users, not just threading.Thread users. For example, a user can easily (well, plausibly) get into the same kinds of troubles here by calling _thread.start_new_thread() directly, then waiting for their threads "to end" before letting the program finish - they have no idea either when their tstates are actually destroyed. A high-probability way to "appear to fix" this for everyone could change Py_EndInterpreter's if (tstate != interp->tstate_head || tstate->next != NULL) Py_FatalError("Py_EndInterpreter: not the last thread"); to something like int count = 0; while (tstate != interp->tstate_head || tstate->next != NULL) { ++count; if (count > SOME_MAGIC_VALUE) Py_FatalError("Py_EndInterpreter: not the last thread"); sleep(SOME_SHORT_TIME); } In the meantime ;-), you should change this part of the new .join() code: if endtime is not None: waittime = endtime - _time() if not lock.acquire(timeout=waittime): return The problem here is that we have no idea how much time may have elapsed before computing the new `waittime`. So the new `waittime` _may_ be negative, in which case we've already timed out (but passing a negative `waittime` to acquire() means "wait as long as it takes to acquire the lock"). So this block should return if waittime < 0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 23:10:27 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Sep 2013 21:10:27 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <1378329027.75.0.841674258567.issue16853@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I have realized just now that at least epoll() and kqueue() selectors could take advantage and define their own modify() method (there was even a TODO I totally missed). Anyway, from now on I'm gonna file separate issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 23:12:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2013 21:12:21 +0000 Subject: [issue18922] Output versions of scripts to stdout In-Reply-To: <1378306168.12.0.839885180116.issue18922@psf.upfronthosting.co.za> Message-ID: <1378329141.89.0.775245851776.issue18922@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 23:12:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2013 21:12:39 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1378329159.06.0.230781175393.issue13153@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This bug can be reproduced on Linux too. Just copy and paste illegal UTF-8 sequence. I.e. b'\xed\xb2\x80' or b'\xc0\x80'. My patch works with first example but failed with second. When change the error handler in fromTclStringAndSize() to "replace" it works with all illegal sequences. ---------- assignee: -> serhiy.storchaka stage: -> patch review Added file: http://bugs.python.org/file31592/tkinter_string_conv_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 23:51:08 2013 From: report at bugs.python.org (Raymond Piller) Date: Wed, 04 Sep 2013 21:51:08 +0000 Subject: [issue18926] plistlib - str converted to bool Message-ID: <1378331468.16.0.119656145942.issue18926@psf.upfronthosting.co.za> New submission from Raymond Piller: A plist with: My key False will parse to a dict as: {'My key': False} Expected: {'My key': 'False'} If bool(False) is needed, the plist should say: My key ---------- messages: 196959 nosy: VertigoRay priority: normal severity: normal status: open title: plistlib - str converted to bool versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 23:54:08 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 04 Sep 2013 21:54:08 +0000 Subject: [issue18927] Lock.acquire() docs incorrect about negative timeout Message-ID: <1378331648.69.0.879815072803.issue18927@psf.upfronthosting.co.za> New submission from Tim Peters: Here from the 3.3.2 docs for threading.Lock: """ acquire(blocking=True, timeout=-1) Acquire a lock, blocking or non-blocking. ... When invoked with the floating-point timeout argument set to a positive value, block for at most the number of seconds specified by timeout and as long as the lock cannot be acquired. A negative timeout argument specifies an unbounded wait. ... """ However, that's not what the code does for a negative timeout: >>> from threading import Lock >>> x = Lock() >>> x.acquire(1, -0.2) Traceback (most recent call last): File "", line 1, in ValueError: timeout value must be strictly positive The only negative value the code allows is -1, in lock_PyThread_acquire_lock(): if (timeout < 0 && timeout != -1) { PyErr_SetString(PyExc_ValueError, "timeout value must be " "strictly positive"); return NULL; } The docs should change to say that -1 is special ;-) ---------- assignee: docs at python components: Documentation keywords: easy messages: 196960 nosy: docs at python, tim.peters priority: normal severity: normal status: open title: Lock.acquire() docs incorrect about negative timeout type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 23:57:04 2013 From: report at bugs.python.org (Eric Snow) Date: Wed, 04 Sep 2013 21:57:04 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <1378331824.58.0.456873658996.issue18924@psf.upfronthosting.co.za> Eric Snow added the comment: I'm also -1, though I do appreciate the "indicating intent" argument. What's the risk that someone will accidentally overwrite an enum item? Also, is there other enum functionality that relies on the continued existence of the initial enum items? If not then I'm in the "consenting adults" camp. Eli makes a good point about the potential for (ultimately) unnecessary complexity and what that costs us. However, now's the time to come to a conclusion--before the 3.4 release (and likely beta 1) lock in the API. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 23:57:42 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 04 Sep 2013 21:57:42 +0000 Subject: [issue18808] Thread.join returns before PyThreadState is destroyed In-Reply-To: <1377179797.68.0.40345735309.issue18808@psf.upfronthosting.co.za> Message-ID: <1378331862.56.0.105473555243.issue18808@psf.upfronthosting.co.za> Tim Peters added the comment: Oops! The docs are wrong - a negative timeout actually raises: ValueError: timeout value must be strictly positive unless the timeout is exactly -1. All the more reason to ensure that a negative waittime isn't passed. I opened a different issue about the doc glitch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:00:57 2013 From: report at bugs.python.org (Ray) Date: Wed, 04 Sep 2013 22:00:57 +0000 Subject: [issue18926] plistlib - str converted to bool In-Reply-To: <1378331468.16.0.119656145942.issue18926@psf.upfronthosting.co.za> Message-ID: <1378332057.23.0.689820158469.issue18926@psf.upfronthosting.co.za> Ray added the comment: Disregard, I think. I'm not sure why, but my current app seems to be doing the converting. >>> import plistlib >>> pl = {'My key': 'False'} >>> plist = plistlib.writePlistToString(pl) >>> plist '\n\n\n\n\tMy key\n\tFalse\n\n\n' >>> plistlib.readPlistFromString(plist) {'My key': 'False'} >>> pl = {'My key': False} >>> plist = plistlib.writePlistToString(pl) >>> plist '\n\n\n\n\tMy key\n\t\n\n\n' >>> plistlib.readPlistFromString(plist) {'My key': False} ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:03:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Sep 2013 22:03:49 +0000 Subject: [issue18876] Problems with files opened in append mode with io module In-Reply-To: <1377796053.23.0.271574141063.issue18876@psf.upfronthosting.co.za> Message-ID: <3cVfF100JCz7Ljk@mail.python.org> Roundup Robot added the comment: New changeset fc2b88a27fa1 by Antoine Pitrou in branch '2.7': Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened. http://hg.python.org/cpython/rev/fc2b88a27fa1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:04:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Sep 2013 22:04:59 +0000 Subject: [issue18876] Problems with files opened in append mode with io module In-Reply-To: <1377796053.23.0.271574141063.issue18876@psf.upfronthosting.co.za> Message-ID: <1378332299.42.0.986650503548.issue18876@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I have committed your patch. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:05:18 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 04 Sep 2013 22:05:18 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <1378332318.03.0.380952446091.issue18924@psf.upfronthosting.co.za> Ethan Furman added the comment: Yes, as a matter of fact: --> Test.this --> Test.this = 'other' --> Test.this 'other' --> Test('that') --> list(Test) [] As you can see, the Test Enum becomes inconsistent if this is allowed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:05:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2013 22:05:44 +0000 Subject: [issue18925] select.poll.modify is not documented In-Reply-To: <1378328037.99.0.424927131422.issue18925@psf.upfronthosting.co.za> Message-ID: <1378332344.83.0.749582157394.issue18925@psf.upfronthosting.co.za> STINNER Victor added the comment: For your information, epoll.closed and kqueue.closed were not documented. I documented them recently in Python 3.4 doc. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:28:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Sep 2013 22:28:26 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <3cVfnP5WSQz7LjW@mail.python.org> Roundup Robot added the comment: New changeset f01e06d26b41 by Victor Stinner in branch '3.3': Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast http://hg.python.org/cpython/rev/f01e06d26b41 New changeset ac27d979078a by Victor Stinner in branch 'default': (Merge 3.3) Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, http://hg.python.org/cpython/rev/ac27d979078a New changeset 1a65bb15dedf by Victor Stinner in branch '2.7': Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast http://hg.python.org/cpython/rev/1a65bb15dedf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:31:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2013 22:31:55 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <1378333915.2.0.251705885997.issue18909@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 1a65bb15dedf by Victor Stinner in branch '2.7': > Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast > http://hg.python.org/cpython/rev/1a65bb15dedf I prefer to use a function taking a void* instead of hoping that Py_ssize_t has exactly the same size than void*. Ok, the type may change, but who cares? Do you really rely on the exact type of a private function (_tkinter.tkapp.interpaddr())? :-) @Christoph: Thanks for the report! Can you please your usecase on Python 2.7, 3.3 and/or 3.4 on Windows 64 bit? ---------- nosy: +haypo resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 01:35:54 2013 From: report at bugs.python.org (Christoph Gohlke) Date: Wed, 04 Sep 2013 23:35:54 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <1378337754.24.0.619676159235.issue18909@psf.upfronthosting.co.za> Christoph Gohlke added the comment: @haypo: Thanks for fixing this so fast! Your changes work for me on win-amd64-py2.7 and py3.3. I am aware of two 3rd party C extensions that use the value of interpaddr(): https://github.com/python-imaging/Pillow/blob/master/_imagingtk.c#L40 https://github.com/matplotlib/matplotlib/blob/master/src/_tkagg.cpp#L233 Both parse the PyObject returned by interpaddr() into a Py_ssize_t variable using `PyArg_ParseTuple(PyObject*, "n", &Py_ssize_t)` and then cast the Py_ssize_t variable to a (TkappObject*). Can a PyLong with a value > 3**31 be parsed into a Py_ssize_t on 32 bit platforms? Could this become a problem on systems where 32 bit processes can address more than 2 GB? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 02:18:34 2013 From: report at bugs.python.org (David Benbennick) Date: Thu, 05 Sep 2013 00:18:34 +0000 Subject: [issue18928] Remove misleading documentation for random.shuffle Message-ID: <1378340314.25.0.0317280223826.issue18928@psf.upfronthosting.co.za> New submission from David Benbennick: Since Python 2.1 [1], when random.shuffle was added, the documentation has said: """Note that for even rather small len(x), the total number of permutations of x is larger than the period of most random number generators; this implies that most permutations of a long sequence can never be generated.""" This comment is incorrect and misleading. In fact, I claim that shuffle can produce "all" permutations for any representable sequence. To shuffle a sequence of length N requires log(N!) ~ N * log(N/e) bits of randomness [2]. The random module provides a generator with "a period of 2**19937-1", meaning you can get 2**19937 bits of randomness out of it before it starts repeating. All of which is to say that any representable sequence, say N < 2**50, will need no more than 2**60 bits of randomness to shuffle. That is well within the period of the random number generator. Attached is a patch that deletes the comment. An illustration of this misconception is at [3]. 1: http://docs.python.org/release/2.1/lib/module-random.html 2: https://en.wikipedia.org/wiki/Factorial#Rate_of_growth_and_approximations_for_large_n 3: http://stackoverflow.com/questions/3062741/maximal-length-of-list-to-shuffle-with-python-random-shuffle ---------- assignee: docs at python components: Documentation files: mywork.patch keywords: patch messages: 196971 nosy: dbenbenn, docs at python priority: normal severity: normal status: open title: Remove misleading documentation for random.shuffle Added file: http://bugs.python.org/file31593/mywork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 02:27:15 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Thu, 05 Sep 2013 00:27:15 +0000 Subject: [issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed In-Reply-To: <1378299828.64.0.605084555396.issue12704@psf.upfronthosting.co.za> Message-ID: <5227CFDA.2050801@rath.org> Nikolaus Rath added the comment: On 09/04/2013 06:03 AM, Eli Bendersky wrote: > Why guess... did you try it in the code? I don't follow... why guess what? And try what in code? > it would be nice to have a short code sample here demonstrating what's happening. The paragraph you're quoting seems obscure to me, with or without the fix. Sounds reasonable. I'll revise the patch and add an example. Best, -Nikolaus -- ?Time flies like an arrow, fruit flies like a Banana.? PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 03:17:57 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 05 Sep 2013 01:17:57 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1378343877.46.0.945895183319.issue18874@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 04:51:02 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 05 Sep 2013 02:51:02 +0000 Subject: [issue18929] inspect.classify_class_attrs ignores metaclass Message-ID: <1378349462.72.0.930877473496.issue18929@psf.upfronthosting.co.za> New submission from Ethan Furman: Part of the solution for Issue18693 is to have `inspect.classify_class_attrs()` properly consider the metaclass (or type) of the class when searching for the origination point of class attributes. The fix is changing line 325: - for base in (cls,) + mro: + for base in (cls,) + mro + (type(cls),): or line 361: - return cls.__mro__ + return cls.__mro__ + (type(cls), ) Should we target previous Pythons with this fix? ---------- messages: 196973 nosy: eli.bendersky, ethan.furman priority: normal severity: normal status: open title: inspect.classify_class_attrs ignores metaclass type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 04:51:59 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 05 Sep 2013 02:51:59 +0000 Subject: [issue18929] inspect.classify_class_attrs ignores metaclass In-Reply-To: <1378349462.72.0.930877473496.issue18929@psf.upfronthosting.co.za> Message-ID: <1378349519.14.0.162299323409.issue18929@psf.upfronthosting.co.za> Changes by Ethan Furman : Added file: http://bugs.python.org/file31594/local_fix.stoneleaf.01 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 04:52:12 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 05 Sep 2013 02:52:12 +0000 Subject: [issue18929] inspect.classify_class_attrs ignores metaclass In-Reply-To: <1378349462.72.0.930877473496.issue18929@psf.upfronthosting.co.za> Message-ID: <1378349532.9.0.795696946841.issue18929@psf.upfronthosting.co.za> Changes by Ethan Furman : Added file: http://bugs.python.org/file31595/global_fix.stoneleaf.01 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 05:11:00 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 05 Sep 2013 03:11:00 +0000 Subject: [issue18928] Remove misleading documentation for random.shuffle In-Reply-To: <1378340314.25.0.0317280223826.issue18928@psf.upfronthosting.co.za> Message-ID: <1378350660.5.0.624542182524.issue18928@psf.upfronthosting.co.za> R. David Murray added the comment: It seems to me that 2080 (per the accepted answer to your [3]) is indeed "a rather small len(x)", and that the docs are correct as written. I wonder if it would be worth adding a footnote that explains how to calculate that example 2080 number from the documented period of the random number generator, to make the concepts involved a little bit clearer? ---------- nosy: +r.david.murray, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 05:20:43 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 05 Sep 2013 03:20:43 +0000 Subject: [issue18928] Remove misleading documentation for random.shuffle In-Reply-To: <1378340314.25.0.0317280223826.issue18928@psf.upfronthosting.co.za> Message-ID: <1378351243.78.0.0611822809763.issue18928@psf.upfronthosting.co.za> R. David Murray added the comment: Alternatively, you would have to supply (or supply a pointer to) a mathematical proof of your thesis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 05:48:15 2013 From: report at bugs.python.org (Tim Peters) Date: Thu, 05 Sep 2013 03:48:15 +0000 Subject: [issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed In-Reply-To: <1312654346.88.0.619161172388.issue12704@psf.upfronthosting.co.za> Message-ID: <1378352895.7.0.507135141344.issue12704@psf.upfronthosting.co.za> Tim Peters added the comment: I think the docs are already clear: they say "the generator-iterator?s close() method will be called". That's all that needs to be said: now go look at the docs for generator.close(). They explain _all_ that close() does, and it would be a Bad Idea to duplicate all that in this part of the docs too. (And, yes, for a start, close() "Raises a GeneratorExit at the point where the generator function was paused".) It would certainly help if the "close" (in "the generator-iterator?s close() method will be called") were an active hyperlink in the docs. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 05:49:41 2013 From: report at bugs.python.org (Tim Peters) Date: Thu, 05 Sep 2013 03:49:41 +0000 Subject: [issue18808] Thread.join returns before PyThreadState is destroyed In-Reply-To: <1377179797.68.0.40345735309.issue18808@psf.upfronthosting.co.za> Message-ID: <1378352981.14.0.367786011203.issue18808@psf.upfronthosting.co.za> Tim Peters added the comment: Fudge - there's another unlikely problem here. For example: main program creates a threading.Thread t, runs it, and does t.join(5) (whatever - any timeout value). When t.join() returns, the main program has no idea whether t is done or not. Suppose t isn't done, but finishes _bootstrap_inner a microsecond (whatever) later. Now the user follows the doc's advice, and checks t.is_alive() to see whether it still needs to join t. t.is_alive() returns False! _bootstrap_inner() already finished, so the t._stopped event is already set. So the main program skips doing another t.join(), and lets the program exit. There's no guarantee then that t's tstate has been cleared, and we can be back to same fatal error that started this. Of course this has nothing to do with the patch switching from a Condition to an Event to manage the stopped state (good change!) - it has to do with that, no matter how it's coded, _bootstrap_inner() says "this thread is done" before the tstate is unlinked from the chain. For a related reason, note that Python's threading._shutdown() doesn't prevent the fatal shutdown error even after the patch! _pickSomeNonDaemonThread() also ignores threads for which is_alive() returns False. As above, that can return False while the tstate is still in the chain, and then threading._shutdown() never joins such a thread. join() can't fix the problem if it's not called. I supposed that one can be repaired by removing the is_alive() check in _pickSomeNonDaemonThread() (i.e., always join() every non-daemon thread). In their favor, the probabilistic "sleep" approaches would almost always "fix" these too ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 06:20:34 2013 From: report at bugs.python.org (Tim Peters) Date: Thu, 05 Sep 2013 04:20:34 +0000 Subject: [issue18928] Remove misleading documentation for random.shuffle In-Reply-To: <1378340314.25.0.0317280223826.issue18928@psf.upfronthosting.co.za> Message-ID: <1378354834.03.0.230262854684.issue18928@psf.upfronthosting.co.za> Tim Peters added the comment: When the comment was introduced, Python's Wichmann-Hill generator had a much shorter period, and we couldn't even generate all the permutations of a deck of cards. The period is astronomically larger now, but the stackoverflow answer (2080) is correct for the current upper bound. The docs could be beefed up to say more about that - but they'd get awfully tedious ;-) To the OP, this is your error: it takes lg(N!) "bits of randomness" (lg is the logarithm to base 2) to generate _one_ random permutation. That says nothing about what's needed to generate _all_ permutations. With an RNG of period P, there are P possible starting states. The starting state wholly determines the permutation produced. Therefore an RNG of period P cannot generate more than P distinct permutations (and that's an absolute upper bound - it may not be achieved). That's why comparing N! to P is the correct computation here, and indeed: >>> math.factorial(2080) > 2**19937 - 1 False >>> math.factorial(2081) > 2**19937 - 1 True If you still don't believe it, here's a challenge: take a toy RNG with a small period, and use it to generate permutations (via any method you like). You'll find that you never get more distinct permutations than the period of your RNG. Then reread the above ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 07:14:16 2013 From: report at bugs.python.org (David Benbennick) Date: Thu, 05 Sep 2013 05:14:16 +0000 Subject: [issue18928] Remove misleading documentation for random.shuffle In-Reply-To: <1378340314.25.0.0317280223826.issue18928@psf.upfronthosting.co.za> Message-ID: <1378358056.14.0.745824190972.issue18928@psf.upfronthosting.co.za> David Benbennick added the comment: Okay, I see what the comment is saying now. I was mistaken. It might make the statement clearer if it is made more precise. "rather small" is vague. That vagueness is intentional, but it makes it more confusing. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 07:25:49 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 05 Sep 2013 05:25:49 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <1378358749.34.0.981902729499.issue18924@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- stage: -> patch review Added file: http://bugs.python.org/file31596/issue18924.stoneleaf.patch.01 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 07:40:10 2013 From: report at bugs.python.org (Tim Peters) Date: Thu, 05 Sep 2013 05:40:10 +0000 Subject: [issue18928] Remove misleading documentation for random.shuffle In-Reply-To: <1378340314.25.0.0317280223826.issue18928@psf.upfronthosting.co.za> Message-ID: <1378359610.28.0.931828722241.issue18928@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- resolution: -> invalid stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 07:58:44 2013 From: report at bugs.python.org (Ethan Furman) Date: Thu, 05 Sep 2013 05:58:44 +0000 Subject: [issue18929] inspect.classify_class_attrs ignores metaclass In-Reply-To: <1378349462.72.0.930877473496.issue18929@psf.upfronthosting.co.za> Message-ID: <1378360724.24.0.199742174161.issue18929@psf.upfronthosting.co.za> Ethan Furman added the comment: The global fix causes these two tests to fail: ====================================================================== FAIL: test_newstyle_mro (test.test_inspect.TestClassesAndFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ethan/source/python/issue18693/Lib/test/test_inspect.py", line 485, in test_newstyle_mro self.assertEqual(expected, got) AssertionError: Tuples differ: ( (.D'>, .B'>, .C'>, .A'>, - ) ? ^ + , ? ^ + ) ====================================================================== FAIL: test_help_output_redirect (test.test_pydoc.PydocDocTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ethan/source/python/issue18693/Lib/test/test_pydoc.py", line 396, in test_help_output_redirect self.assertEqual(expected_text, result) AssertionError: "Help on module test.pydoc_mod in test:\n\nNAME\n test.pydoc_mod - This is a [truncated]... != "Help on module test.pydoc_mod in test:\n\nNAME\n test.pydoc_mod - This is a [truncated]... Help on module test.pydoc_mod in test: NAME test.pydoc_mod - This is a test module for test_pydoc CLASSES builtins.object A B class A(builtins.object) | Hello and goodbye + | + | Method resolution order: + | A + | builtins.object + | builtins.type | | Methods defined here: | | __init__() | Wow, I have no function! | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) class B(builtins.object) + | Method resolution order: + | B + | builtins.object + | builtins.type + | | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | NO_MEANING = 'eggs' ====================================================================== I suspect (hope) updating the tests would be fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 08:45:42 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Sep 2013 06:45:42 +0000 Subject: [issue18912] Intendation issue in example code in itertools.count documentation In-Reply-To: <1378195706.84.0.122771342837.issue18912@psf.upfronthosting.co.za> Message-ID: <1378363542.22.0.86100733076.issue18912@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Please assign itertools doc changes to me in the future. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 09:12:35 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2013 07:12:35 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378337754.24.0.619676159235.issue18909@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/9/5 Christoph Gohlke : > I am aware of two 3rd party C extensions that use the value of interpaddr(): > > https://github.com/python-imaging/Pillow/blob/master/_imagingtk.c#L40 > https://github.com/matplotlib/matplotlib/blob/master/src/_tkagg.cpp#L233 > > Both parse the PyObject returned by interpaddr() into a Py_ssize_t variable using `PyArg_ParseTuple(PyObject*, "n", &Py_ssize_t)` and then cast the Py_ssize_t variable to a (TkappObject*). Ok, the code looks correct. Py_ssize_t is supposed to have the same size than a void*. > Can a PyLong with a value > 3**31 be parsed into a Py_ssize_t on 32 bit platforms? Could this become a problem on systems where 32 bit processes can address more than 2 GB? No, values >= 2^31 will raise an error. On Linux, addresses with the 32th bit set (range 0x80000000-0xffffffff) are reserved for the Linux kernel. So interpaddr() should be in the range 0x00000000-0x7fffffff. If the code worked before my patch, there is not reason for not working with the patch. My patch only has an impact on one specific platform: Windows 64 bit, the only platform where sizeof(long) < sizeof(void*) (on all other platforms supported by Python, sizeof(void*) == sizeof(long)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:15:00 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Sep 2013 08:15:00 +0000 Subject: [issue18898] Apply the setobject optimizations to dictionaries In-Reply-To: <1378012493.62.0.577402281969.issue18898@psf.upfronthosting.co.za> Message-ID: <1378368900.69.0.402589076998.issue18898@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- keywords: +patch Added file: http://bugs.python.org/file31597/noincref.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:15:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 05 Sep 2013 08:15:11 +0000 Subject: [issue18808] Thread.join returns before PyThreadState is destroyed In-Reply-To: <1377179797.68.0.40345735309.issue18808@psf.upfronthosting.co.za> Message-ID: <1378368911.55.0.104785470626.issue18808@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > It would be much nicer to have an approach that worked for all thread users, > not just threading.Thread users. For example, a user can easily (well, > plausibly) get into the same kinds of troubles here by calling > _thread.start_new_thread() directly, then waiting for their threads "to end" > before letting the program finish - they have no idea either when their > tstates are actually destroyed. The _thread module is a private API these days, I wouldn't worry too much about that. Are there reasons *not* to use the threading module (except CPython bootstrap issues that normal users should have no bother about)? Also, how would they wait for the thread to end, except by triggering their own Event object? > So the new `waittime` _may_ be negative, in which case we've already timed > out (but passing a negative `waittime` to acquire() means "wait as long as > it takes to acquire the lock"). So this block should return if waittime < 0. Thanks, good point :-o As for the is_alive() method, mmh, ok, it needs to be tweaked too. That will make the patch more interesting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:28:00 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 05 Sep 2013 08:28:00 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1378329027.75.0.841674258567.issue16853@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Giampaolo Rodola' added the comment: > > I have realized just now that at least epoll() and kqueue() selectors could take advantage and define their own modify() method (there was even a TODO I totally missed). As a side note, in the general case, there's more than a performance optimization: the problem with unregister() + register() vs a real modify (e.g. EPOLL_CTL_MOD) is that it's subject to a race condition, if an event fires during the short window where the FD isn't registered anymore. But since selectors use level-triggered notification, that's not an issue: I'll probably add a comment in the code explaining why it's safe, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:41:53 2013 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 05 Sep 2013 08:41:53 +0000 Subject: [issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable In-Reply-To: <1377807943.36.0.898364678904.issue18879@psf.upfronthosting.co.za> Message-ID: <1378370513.98.0.753126070354.issue18879@psf.upfronthosting.co.za> Jakub Stasiak added the comment: I don't see an obvious way of solving that. One thing I could think of is creating a wrapper for file method being returned from __getattr__ that holds reference to _TemporaryFileWrapper instance until the method gets called, please find a patch attached. ---------- keywords: +patch nosy: +jstasiak Added file: http://bugs.python.org/file31598/tempfile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 11:22:24 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 05 Sep 2013 09:22:24 +0000 Subject: [issue18829] csv produces confusing error message when passed a non-string delimiter In-Reply-To: <1377435383.74.0.241640816854.issue18829@psf.upfronthosting.co.za> Message-ID: <1378372944.1.0.0582615135564.issue18829@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the patch to accomodate Ezio Melotti's request. The patch now have two separate errors for "wrong type" and "right type, wrong length". Don't we break compatibility by changing the type of exception from TypeError to ValueError? ---------- Added file: http://bugs.python.org/file31599/fix_error_message_reader_csv_alternative_1_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 11:37:10 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 05 Sep 2013 09:37:10 +0000 Subject: [issue1584] Mac OS X: building with X11 Tkinter In-Reply-To: <1197345898.75.0.132866639605.issue1584@psf.upfronthosting.co.za> Message-ID: <1378373830.59.0.513441606226.issue1584@psf.upfronthosting.co.za> Ned Deily added the comment: Here's a patch. It is simple-minded but I think it should be powerful enough for advanced users to build with non-default Tcl and Tk libraries without having to modify the source. It adds two new options to configure; if used, both must be specified: ./configure \ --with-tcltk-includes="-I/opt/local/include" \ --with-tcltk-libs="-L/opt/local/lib -ltcl8.5 -ltk8.5" The values are passed into the top-level setup.py and override the default searches and values for include_dirs and libraries when building _tkinter.so. In addition, the options can be overridden with make. This can be useful when testing tkinter with different versions of Tcl/Tk: ./configure make make test # test with platform default Tcl/Tk ( cd ./build/lib.xx && mv _tkinter.so _tkinter.so.default ) make \ TCLTK_INCLUDES="-I/opt/local/include" \ TCLTK_LIBS="-L/opt/local/lib -ltcl8.6 -ltk8.6" make test # test with another version of Tcl/Tk I have some more testing to do on other platforms but, unless there are major objections, I intend to commit this soon for use with Issue15663. ---------- components: -Macintosh keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file31600/issue1584_rev0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:52:34 2013 From: report at bugs.python.org (Stefan Schukat) Date: Thu, 05 Sep 2013 10:52:34 +0000 Subject: [issue18930] os.spawnXX functions terminates process if second argument is empty list Message-ID: <1378378354.78.0.544374922966.issue18930@psf.upfronthosting.co.za> New submission from Stefan Schukat: If os.spawnv or os.spawnve is called with an empty second argument the process terminates in release builds under Windows. This is simple to reproduce: >>> import os >>> nPath = os.path.join(os.environ["windir"], "notepad.exe") >>> os.spawnv(os.P_NOWAIT, nPath, []) # or os.spawnv(os.P_NOWAIT, nPath, [], {}) This has the same cause as the bug reported for execv http://bugs.python.org/issue1039 and could be fixed in the same way. ---------- components: Interpreter Core messages: 196988 nosy: SSchukat priority: normal severity: normal status: open title: os.spawnXX functions terminates process if second argument is empty list versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:58:35 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 05 Sep 2013 10:58:35 +0000 Subject: [issue18931] new selectors module should support devpoll on Solaris Message-ID: <1378378715.64.0.328227872693.issue18931@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': This is a follow up of issue 16853. I will try to see whether I can come up with a patch later today. ---------- messages: 196989 nosy: christian.heimes, felipecruz, giampaolo.rodola, gvanrossum, haypo, meador.inge, neologix, pitrou, python-dev, rosslagerwall, sbt priority: normal severity: normal status: open title: new selectors module should support devpoll on Solaris versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 13:01:54 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 05 Sep 2013 11:01:54 +0000 Subject: [issue18932] selectors and modify() Message-ID: <1378378914.54.0.524373723237.issue18932@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': This is a follow up of issue 16853 (see comment http://bugs.python.org/issue16853#msg196984). ---------- messages: 196990 nosy: christian.heimes, felipecruz, giampaolo.rodola, gvanrossum, haypo, meador.inge, neologix, pitrou, python-dev, rosslagerwall, sbt priority: normal severity: normal status: open title: selectors and modify() versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:01:00 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:01:00 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382460.47.0.281333296894.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Removed file: http://bugs.python.org/file31573/temp_dir_exists_retry_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:01:04 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:01:04 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382464.82.0.592286869088.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Removed file: http://bugs.python.org/file31574/temp_dir_exists_retry_33_34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:01:08 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:01:08 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382468.14.0.429066165356.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Removed file: http://bugs.python.org/file31579/temp_dir_exists_retry_test_33_34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:01:13 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:01:13 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382473.83.0.420743066046.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Removed file: http://bugs.python.org/file31580/temp_dir_exists_retry_test_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:01:43 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:01:43 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382503.09.0.579716054177.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31601/temp_dir_exists_retry_test_33_34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:03:22 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:03:22 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382602.28.0.700397311572.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31602/temp_dir_exists_retry_33_34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:03:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 12:03:24 +0000 Subject: [issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable In-Reply-To: <1377807943.36.0.898364678904.issue18879@psf.upfronthosting.co.za> Message-ID: <1378382604.74.0.073236014661.issue18879@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yet one way is just remove __del__() and monkey-patch underlied file. ---------- Added file: http://bugs.python.org/file31603/tempfile_simplify.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:03:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 12:03:41 +0000 Subject: [issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable In-Reply-To: <1377807943.36.0.898364678904.issue18879@psf.upfronthosting.co.za> Message-ID: <1378382621.22.0.0593471843061.issue18879@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:03:53 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:03:53 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382633.67.0.314467954953.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31604/temp_dir_exists_retry_test_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:04:03 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:04:03 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382643.16.0.843701946358.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31605/temp_dir_exists_retry_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:07:18 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:07:18 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382838.53.0.965234930471.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Removed file: http://bugs.python.org/file31601/temp_dir_exists_retry_test_33_34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:07:23 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:07:23 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382843.06.0.887757533368.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Removed file: http://bugs.python.org/file31602/temp_dir_exists_retry_33_34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:07:27 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:07:27 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382847.77.0.081241133914.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Removed file: http://bugs.python.org/file31604/temp_dir_exists_retry_test_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:07:34 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:07:34 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382854.73.0.0563127210928.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Removed file: http://bugs.python.org/file31605/temp_dir_exists_retry_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:07:48 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:07:48 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382868.52.0.16931447854.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31606/temp_dir_exists_retry_test_33_34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:07:59 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:07:59 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382879.73.0.220302672409.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31607/temp_dir_exists_retry_33_34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:09:26 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:09:26 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382966.25.0.783833519424.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31608/temp_dir_exists_retry_test_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:09:39 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Thu, 05 Sep 2013 12:09:39 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <1378382979.73.0.558532263153.issue18849@psf.upfronthosting.co.za> Changes by Vlad Shcherbina : Added file: http://bugs.python.org/file31609/temp_dir_exists_retry_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:18:31 2013 From: report at bugs.python.org (Meador Inge) Date: Thu, 05 Sep 2013 12:18:31 +0000 Subject: [issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable In-Reply-To: <1377807943.36.0.898364678904.issue18879@psf.upfronthosting.co.za> Message-ID: <1378383511.04.0.00972772155321.issue18879@psf.upfronthosting.co.za> Meador Inge added the comment: I was experimenting with something similar to what Jakub has. Rebinding the call the the wrapper seems like a simple and clean way to do it. Although, I wasn't absolutely sure whether this approach covers all cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:25:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 12:25:38 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1378383938.01.0.0676526067185.issue13153@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Previous patch has a regression, it breaks decoding NUL which Tcl encodes in "modified" UTF-8 as \xc0\x80. However this part of code already broken, because it handles only singular NUL and not a NUL embedded in larger string. Here is a patch which also fixes decoding NULs from "modified" UTF-8. ---------- Added file: http://bugs.python.org/file31610/tkinter_string_conv_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:26:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 12:26:15 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1378383975.83.0.61958795632.issue13153@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31185/tkinter_string_conv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:26:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 12:26:34 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1378383994.17.0.0236193733877.issue13153@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31592/tkinter_string_conv_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:42:56 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 05 Sep 2013 12:42:56 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module In-Reply-To: <1378320095.08.0.301150241372.issue18923@psf.upfronthosting.co.za> Message-ID: <1378384976.14.0.50653630874.issue18923@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:47:12 2013 From: report at bugs.python.org (Madison May) Date: Thu, 05 Sep 2013 12:47:12 +0000 Subject: [issue18856] Added test coverage for calendar print functions In-Reply-To: <1377631161.77.0.572665348858.issue18856@psf.upfronthosting.co.za> Message-ID: <1378385232.43.0.693901609237.issue18856@psf.upfronthosting.co.za> Madison May added the comment: At Ezio suggestion, I've updated the patch to use test.support.captured_stdout(). ---------- Added file: http://bugs.python.org/file31611/calendar_print_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 15:08:38 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 05 Sep 2013 13:08:38 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module In-Reply-To: <1378320095.08.0.301150241372.issue18923@psf.upfronthosting.co.za> Message-ID: <1378386518.52.0.788857730155.issue18923@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: It's likely that asyncore won't be able to take any practical advantage from this integration. To say one, epoll()/kqueue() pollers won't bring any speedup over select()/poll() because of how asyncore.loop() function is implemented (see http://bugs.python.org/issue6692#msg103628 and http://bugs.python.org/issue11273). Also, the new selectors module only takes read and write events into account, whereas asyncore explicitly closes dispatcher in case of disconnection events (POLLOUT, etc). In summary I'd say it's a lot wiser to leave asyncore alone and consider it frozen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 15:09:02 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 05 Sep 2013 13:09:02 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: Message-ID: <52288264.3030702@gmail.com> Richard Oudkerk added the comment: On 05/09/2013 9:28am, Charles-Fran?ois Natali wrote: > As a side note, in the general case, there's more than a performance > optimization: the problem with unregister() + register() vs a real > modify (e.g. EPOLL_CTL_MOD) is that it's subject to a race condition, > if an event fires during the short window where the FD isn't > registered anymore. Even with edge-triggered notification, doesn't registering an fd check the current readiness: >>> import os, select >>> r, w = os.pipe() >>> p = select.epoll() >>> os.write(w, b"h") >>> p.register(r, select.EPOLLIN | select.EPOLLET) >>> p.poll(0) [(3, 1)] >>> p.poll(0) [] Otherwise it would be very difficult to edge-triggered notification. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 15:55:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 13:55:01 +0000 Subject: [issue18829] csv produces confusing error message when passed a non-string delimiter In-Reply-To: <1377435383.74.0.241640816854.issue18829@psf.upfronthosting.co.za> Message-ID: <1378389301.63.0.324247066133.issue18829@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: A comment in csv.py says about compatibility with 2.3! After adding ValueError to the list of catched exceptions we can keep this compatibility for future generations. Here is a patch. I also have resorted the tests a little. ---------- Added file: http://bugs.python.org/file31612/fix_error_message_reader_csv_alternative_1_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:04:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Sep 2013 14:04:05 +0000 Subject: [issue18878] Add support of the 'with' statement to sunau.open. In-Reply-To: <1377805738.91.0.260228450439.issue18878@psf.upfronthosting.co.za> Message-ID: <3cW3Xz4msmz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset a62f59667c9e by Serhiy Storchaka in branch 'default': Issue #18878: sunau.open now supports the context manager protocol. Based on http://hg.python.org/cpython/rev/a62f59667c9e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:06:25 2013 From: report at bugs.python.org (Nicola Palumbo) Date: Thu, 05 Sep 2013 14:06:25 +0000 Subject: [issue18922] Output versions of scripts to stdout In-Reply-To: <1378306168.12.0.839885180116.issue18922@psf.upfronthosting.co.za> Message-ID: <1378389985.3.0.477997961256.issue18922@psf.upfronthosting.co.za> Changes by Nicola Palumbo : Removed file: http://bugs.python.org/file31590/issue18922.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:06:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Sep 2013 14:06:59 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <3cW3cM0hWMz7Lm8@mail.python.org> Roundup Robot added the comment: New changeset 90040e560527 by Christian Heimes in branch '3.3': Issue #18709: GCC 4.6 complains that 'v' may be used uninitialized in GEN_EMAIL/GEN_URI/GEN_DNS case http://hg.python.org/cpython/rev/90040e560527 New changeset 4e93f32176fb by Christian Heimes in branch 'default': Issue #18709: GCC 4.6 complains that 'v' may be used uninitialized in GEN_EMAIL/GEN_URI/GEN_DNS case http://hg.python.org/cpython/rev/4e93f32176fb New changeset 07ee48ce4513 by Christian Heimes in branch '2.6': Issue #18709: GCC 4.6 complains that 'v' may be used uninitialized in GEN_EMAIL/GEN_URI/GEN_DNS case http://hg.python.org/cpython/rev/07ee48ce4513 New changeset a7d5b86ffb95 by Christian Heimes in branch '2.7': Issue #18709: GCC 4.6 complains that 'v' may be used uninitialized in GEN_EMAIL/GEN_URI/GEN_DNS case http://hg.python.org/cpython/rev/a7d5b86ffb95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:08:26 2013 From: report at bugs.python.org (Nicola Palumbo) Date: Thu, 05 Sep 2013 14:08:26 +0000 Subject: [issue18922] Output versions of scripts to stdout In-Reply-To: <1378306168.12.0.839885180116.issue18922@psf.upfronthosting.co.za> Message-ID: <1378390106.17.0.243731910034.issue18922@psf.upfronthosting.co.za> Changes by Nicola Palumbo : Added file: http://bugs.python.org/file31613/issue18922.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:10:06 2013 From: report at bugs.python.org (Jonathan Frere) Date: Thu, 05 Sep 2013 14:10:06 +0000 Subject: [issue18933] Add link to source code in logging documentation Message-ID: <1378390206.88.0.825858805448.issue18933@psf.upfronthosting.co.za> New submission from Jonathan Frere: The logging module documentation is probably best accompanied by the source that it is meant to be documenting. Could a link to either the package directory (http://hg.python.org/cpython/file/2.7/Lib/logging/) or the __init__.py file in that directory (http://hg.python.org/cpython/file/2.7/Lib/logging/__init__.py), I'd argue the __init__.py file. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 197000 nosy: Johz, docs at python, vinay.sajip priority: normal severity: normal status: open title: Add link to source code in logging documentation type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:37:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Sep 2013 14:37:48 +0000 Subject: [issue18830] Remove duplicates from a result of getclasstree() In-Reply-To: <1377442213.69.0.00603799982208.issue18830@psf.upfronthosting.co.za> Message-ID: <3cW4Hv5Md3z7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 39d0dfa5808c by Serhiy Storchaka in branch '3.3': Issue #18830: inspect.getclasstree() no more produces duplicated entries even http://hg.python.org/cpython/rev/39d0dfa5808c New changeset 86ab7b7c173e by Serhiy Storchaka in branch 'default': Issue #18830: inspect.getclasstree() no more produces duplicated entries even http://hg.python.org/cpython/rev/86ab7b7c173e New changeset 408165aced01 by Serhiy Storchaka in branch '2.7': Issue #18830: inspect.getclasstree() no more produces duplicated entries even http://hg.python.org/cpython/rev/408165aced01 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:39:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 14:39:27 +0000 Subject: [issue18878] Add support of the 'with' statement to sunau.open. In-Reply-To: <1377805738.91.0.260228450439.issue18878@psf.upfronthosting.co.za> Message-ID: <1378391967.83.0.813805479702.issue18878@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:39:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 14:39:54 +0000 Subject: [issue18830] Remove duplicates from a result of getclasstree() In-Reply-To: <1377442213.69.0.00603799982208.issue18830@psf.upfronthosting.co.za> Message-ID: <1378391994.64.0.955727488995.issue18830@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:45:15 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 05 Sep 2013 14:45:15 +0000 Subject: [issue18829] csv produces confusing error message when passed a non-string delimiter In-Reply-To: <1377435383.74.0.241640816854.issue18829@psf.upfronthosting.co.za> Message-ID: <1378392315.49.0.671108573365.issue18829@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Same as fix_error_message_reader_csv_alternative_1_v4.patch (by Serhiy), but I removed unused variables in the test. ---------- Added file: http://bugs.python.org/file31614/fix_error_message_reader_csv_alternative_1_v5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:45:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Sep 2013 14:45:23 +0000 Subject: [issue18922] Output versions of scripts to stdout In-Reply-To: <1378306168.12.0.839885180116.issue18922@psf.upfronthosting.co.za> Message-ID: <3cW4Sf36bSz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset e81699a6390c by Serhiy Storchaka in branch 'default': Issue #18922: Now The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write http://hg.python.org/cpython/rev/e81699a6390c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:47:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 14:47:29 +0000 Subject: [issue18922] Output versions of scripts to stdout In-Reply-To: <1378306168.12.0.839885180116.issue18922@psf.upfronthosting.co.za> Message-ID: <1378392449.94.0.584870627257.issue18922@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Nicola and Berker. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 17:01:34 2013 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 05 Sep 2013 15:01:34 +0000 Subject: [issue18933] Add link to source code in logging documentation In-Reply-To: <1378390206.88.0.825858805448.issue18933@psf.upfronthosting.co.za> Message-ID: <1378393294.26.0.903851038693.issue18933@psf.upfronthosting.co.za> Vinay Sajip added the comment: Why for the logging module in particular? This isn't the norm for stdlib packages, AFAIK. The logging documentation (both tutorial and reference) is supposed to stand on its own, and in general I don't expect documentation users to (have to) look at the source to understand how to use logging. If you think particular aspects of the documentation need clarifying, then please indicate what they are and suggest what sort of improvements you think are in order. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 17:05:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Sep 2013 15:05:40 +0000 Subject: [issue18672] Fix format specifiers for debug output in _sre.c In-Reply-To: <1375805518.91.0.887667887132.issue18672@psf.upfronthosting.co.za> Message-ID: <3cW4w31mw0z7Lkm@mail.python.org> Roundup Robot added the comment: New changeset 99310e5e1b1c by Serhiy Storchaka in branch '3.3': Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in http://hg.python.org/cpython/rev/99310e5e1b1c New changeset c41c68a18bb6 by Serhiy Storchaka in branch 'default': Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in http://hg.python.org/cpython/rev/c41c68a18bb6 New changeset 603b4d593758 by Serhiy Storchaka in branch '2.7': Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in http://hg.python.org/cpython/rev/603b4d593758 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 17:24:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 15:24:58 +0000 Subject: [issue18672] Fix format specifiers for debug output in _sre.c In-Reply-To: <1375805518.91.0.887667887132.issue18672@psf.upfronthosting.co.za> Message-ID: <1378394698.15.0.713214911254.issue18672@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 17:34:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 15:34:48 +0000 Subject: [issue18829] csv produces confusing error message when passed a non-string delimiter In-Reply-To: <1377435383.74.0.241640816854.issue18829@psf.upfronthosting.co.za> Message-ID: <1378395288.15.0.381712193632.issue18829@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I rather prefer adding new tests. ---------- Added file: http://bugs.python.org/file31615/fix_error_message_reader_csv_alternative_1_v6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 17:54:24 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 05 Sep 2013 15:54:24 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378332318.03.0.380952446091.issue18924@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: On Wed, Sep 4, 2013 at 3:05 PM, Ethan Furman wrote: > > Ethan Furman added the comment: > > Yes, as a matter of fact: > > --> Test.this > > --> Test.this = 'other' > --> Test.this > 'other' > --> Test('that') > > --> list(Test) > [] > > As you can see, the Test Enum becomes inconsistent if this is allowed. > Again, this is fully in accordance to the Python philosophy of allowing monkey-patching in the first place. There's any number of way monkey-patching objects can lead to inconsistent states, because the internal invariants are only guaranteed to be preserved through public, documented interfaces. I'm still -1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 17:57:57 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 05 Sep 2013 15:57:57 +0000 Subject: [issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed In-Reply-To: <5227CFDA.2050801@rath.org> Message-ID: Eli Bendersky added the comment: On Wed, Sep 4, 2013 at 5:27 PM, Nikolaus Rath wrote: > > Nikolaus Rath added the comment: > > On 09/04/2013 06:03 AM, Eli Bendersky wrote: > > Why guess... did you try it in the code? > > I don't follow... why guess what? And try what in code? > I was referring to this part of the original report: """ This strongly suggests that the last-executed yield statement will raise an exception if the generator is closed. If this is the case, it would be great if the documentation could be extended to say what exception is raised. If this is not the case, it would be great if whatever magic is happening could be documented as well. """ If this is the case, if this is not the case... I was just saying that you can provide some sample code in the issue that demonstrates what *actually* happens and whether it's not explained well enough in the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 18:42:34 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 05 Sep 2013 16:42:34 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <52288264.3030702@gmail.com> Message-ID: Charles-Fran?ois Natali added the comment: > Richard Oudkerk added the comment: > > Even with edge-triggered notification, doesn't registering an fd check > the current readiness: Hum... Looks like I forgot to turn my brain on this morning :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 18:44:41 2013 From: report at bugs.python.org (Jonathan Frere) Date: Thu, 05 Sep 2013 16:44:41 +0000 Subject: [issue18933] Add link to source code in logging documentation In-Reply-To: <1378390206.88.0.825858805448.issue18933@psf.upfronthosting.co.za> Message-ID: <1378399481.48.0.210289320453.issue18933@psf.upfronthosting.co.za> Jonathan Frere added the comment: Well, if all the modules could link back to source code, that would be ideal, it's just the logging happens to be the one that I keep coming back to. Encouraging users to read the source will hopefully help people understand the modules they're using conceptually, and also give people more sample code to use. That said, a number of modules link back to the source, particularly small single-file implementations of things, such as glob, fnmatch, string, pprint, repr, types, UserDict, weakref, Queue, sched, to name a few that I randomly opened. Why logging in particular? Well, as I said, I keep on coming back to it, so at least one Python user feels this need. Secondly, it's a module that perhaps isn't quite as conceptually clear as others (hence the 'alternatives' that abound). Thirdly, parts of the module such as logging.handlers will be directly used as templates by many developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 18:46:25 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 05 Sep 2013 16:46:25 +0000 Subject: [issue18934] multiprocessing: use selectors module Message-ID: <1378399585.11.0.596283488282.issue18934@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: Here's a patch. ---------- components: Library (Lib) files: selectors_multiprocessing.diff keywords: needs review, patch messages: 197012 nosy: neologix, sbt priority: normal severity: normal stage: patch review status: open title: multiprocessing: use selectors module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31616/selectors_multiprocessing.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 18:59:58 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 05 Sep 2013 16:59:58 +0000 Subject: [issue18935] test_regrtest.test_timeout failure Message-ID: <1378400398.96.0.0580722992203.issue18935@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: http://buildbot.python.org/all/builders/AMD64 Fedora without threads 3.x/builds/5074/steps/test/logs/stdio """ ====================================================================== FAIL: test_timeout (test.test_regrtest.ParseArgsTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/test/test_regrtest.py", line 30, in test_timeout self.assertEqual(ns.timeout, 4.2) AssertionError: None != 4.2 """ That's because the "--timeout" isn't supported if Python is built --without-threads. Possible patch attached. ---------- components: Tests files: test_timeout.diff keywords: needs review, patch messages: 197013 nosy: haypo, neologix, pitrou priority: normal severity: normal stage: patch review status: open title: test_regrtest.test_timeout failure type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file31617/test_timeout.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 19:21:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 17:21:09 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1378401669.79.0.393999058748.issue2259@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 19:31:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 17:31:14 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1378402274.21.0.229651482136.issue1575020@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 19:31:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 17:31:31 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1378402291.6.0.935594127847.issue1575020@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 19:43:51 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 05 Sep 2013 17:43:51 +0000 Subject: [issue18934] multiprocessing: use selectors module In-Reply-To: <1378399585.11.0.596283488282.issue18934@psf.upfronthosting.co.za> Message-ID: <1378403030.99.0.344214691139.issue18934@psf.upfronthosting.co.za> Richard Oudkerk added the comment: LGTM. But I would move "import selectors" in multiprocessing.connection to just before the definition of wait() for Unix. It is not needed on Windows and unnecessary imports slow down start up of new processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 19:57:15 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 05 Sep 2013 17:57:15 +0000 Subject: [issue18931] new selectors module should support devpoll on Solaris In-Reply-To: <1378378715.64.0.328227872693.issue18931@psf.upfronthosting.co.za> Message-ID: <1378403835.77.0.549286682527.issue18931@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Patch is in attachment. ---------- keywords: +patch Added file: http://bugs.python.org/file31618/devpoll.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 20:12:25 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 05 Sep 2013 18:12:25 +0000 Subject: [issue18934] multiprocessing: use selectors module In-Reply-To: <1378399585.11.0.596283488282.issue18934@psf.upfronthosting.co.za> Message-ID: <1378404745.52.0.214601610219.issue18934@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 20:34:42 2013 From: report at bugs.python.org (Meador Inge) Date: Thu, 05 Sep 2013 18:34:42 +0000 Subject: [issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable In-Reply-To: <1377807943.36.0.898364678904.issue18879@psf.upfronthosting.co.za> Message-ID: <1378406082.33.0.00973210525882.issue18879@psf.upfronthosting.co.za> Meador Inge added the comment: The monkey-patched version breaks the auto-close on __del__ feature: [meadori at li589-207 cpython]$ ./python Python 3.4.0a1+ (default:c41c68a18bb6, Sep 5 2013, 17:51:03) [GCC 4.7.2 20120921 (Red Hat 4.7.2-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tempfile >>> tempfile.NamedTemporaryFile(dir=".",delete=False).write(b"hello") __main__:1: ResourceWarning: unclosed file <_io.BufferedRandom name=4> 5 Also run the test suite with '-R :' and you will see tons of resource warnings. Breaking auto-close is because now unlinking *and* closing are being guarded by 'delete'. Even if that is fixed you still run into resource leak problems. Looks like the monkey-patching introduces a reference cycle. The wrapper binding approach works fine in all the tests I did. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 20:47:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Sep 2013 18:47:11 +0000 Subject: [issue18934] multiprocessing: use selectors module In-Reply-To: <1378399585.11.0.596283488282.issue18934@psf.upfronthosting.co.za> Message-ID: <3cW9qf3yDVz7Lkb@mail.python.org> Roundup Robot added the comment: New changeset 81f0c6358a5f by Charles-Fran?ois Natali in branch 'default': Issue #18934: multiprocessing: use selectors module. http://hg.python.org/cpython/rev/81f0c6358a5f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 21:36:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 19:36:00 +0000 Subject: [issue12866] Add support for 24-bit samples in the audioop module In-Reply-To: <1314744712.67.0.770855933698.issue12866@psf.upfronthosting.co.za> Message-ID: <1378409760.47.0.712037734341.issue12866@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unfortunately Peter's file is not ready for release. It adds support of 24-bit samples only to the part of functions, it works only on little-endian platform, it should crash on platforms which not allows non-aligned access, and I suspect it can overflow output buffers. And it doesn't provided in diff format. Here is other patch which adds support for 24-bit samples. It also cleanup and simplify the code of audioop.c so that its total size is even decreased. Patch includes test and documentation changes. ---------- components: +Extension Modules keywords: +patch nosy: +r.david.murray stage: -> patch review title: Want to submit our Audioop.c patch for 24bit audio -> Add support for 24-bit samples in the audioop module Added file: http://bugs.python.org/file31619/audioop_24bit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 21:38:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 19:38:18 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1378409898.33.0.0148074066887.issue2259@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add support for 24-bit samples in the audioop module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 21:39:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 19:39:28 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1378409968.2.0.578039156951.issue1575020@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add support for 24-bit samples in the audioop module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 21:58:46 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Sep 2013 19:58:46 +0000 Subject: [issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable In-Reply-To: <1377807943.36.0.898364678904.issue18879@psf.upfronthosting.co.za> Message-ID: <1378411126.66.0.574492411353.issue18879@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The monkey-patched version breaks the auto-close on __del__ feature: Files were closed. Just with a warning. I consider this as an enhancement. If you don't close file explicitly you will get a leak on non-refcounted Python implementations. It's true for both ordinal files so tempfiles. Perhaps we should add a warning in any __del__ method (even if we will commit Jakub's patch, this way LGTM too). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 22:03:08 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 05 Sep 2013 20:03:08 +0000 Subject: [issue18936] getopt chokes on unicode option names Message-ID: <1378411388.86.0.748005801735.issue18936@psf.upfronthosting.co.za> New submission from Jason R. Coombs: Today I encountered a bug where I was using a Distutils.Command subclass, which uses getopt for option parsing. The implementation is here: https://bitbucket.org/jaraco/jaraco.packaging/src/2.2/jaraco/packaging/depends.py?at=default Around line 59, the options are defined, but because the syntax is Python 3 style with unicode literals, under Python 2.7, those get created as unicode objects. When I invoke that Command under Python 2.7, I get this error: Traceback (most recent call last): File "setup.py", line 160, in setup(**setup_params) File "/usr/lib/python2.7/distutils/core.py", line 138, in setup ok = dist.parse_command_line() File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 250, in parse_command_line File "/usr/lib/python2.7/distutils/dist.py", line 467, in parse_command_line args = self._parse_command_opts(parser, args) File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 533, in _parse_command_opts File "/usr/lib/python2.7/distutils/dist.py", line 564, in _parse_command_opts (args, opts) = parser.getopt(args[1:]) File "/usr/lib/python2.7/distutils/fancy_getopt.py", line 253, in getopt self._grok_option_table() File "/usr/lib/python2.7/distutils/fancy_getopt.py", line 171, in _grok_option_table "must be a string of length >= 2") % long distutils.errors.DistutilsGetoptError: invalid long option 'requirement=': must be a string of length >= 2 That error is raised because 'requirement=' is a Unicode, but the test in fancy_getopt is isinstance(opt, str). I can work around the issue by wrapping all of the options in str() calls, which leaves them unchanged on Python 3 and downcasts them to strings on Python 2, but that's not pretty. I suggest that fancy_getopt should either include 'unicode' in the isinstance test or (if unicode values really aren't supported), encode unicode values first. ---------- components: Library (Lib) messages: 197020 nosy: jason.coombs priority: low severity: normal status: open title: getopt chokes on unicode option names versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 22:17:44 2013 From: report at bugs.python.org (Christoph Gohlke) Date: Thu, 05 Sep 2013 20:17:44 +0000 Subject: [issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp In-Reply-To: <1378171503.23.0.926493949821.issue18909@psf.upfronthosting.co.za> Message-ID: <1378412264.94.0.39648163266.issue18909@psf.upfronthosting.co.za> Christoph Gohlke added the comment: Sorry, of course I meant > 2**31. Thank you very much for your review! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 22:26:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 05 Sep 2013 20:26:01 +0000 Subject: [issue18937] add unittest assertion for logging Message-ID: <1378412761.53.0.263834884699.issue18937@psf.upfronthosting.co.za> New submission from Antoine Pitrou: It is sometimes useful to check for the log messages emitted by some piece of code (especially a library). Would it be a good idea to add a dedicated assertion method for that? I would propose the following API: with self.assertLogging("logger.name", level="WARN") as cm: ... The `cm` context manager could give access to all the log records and formatted output lines for the given logger name (and children) and at least the given logging level. I have something like that here, except not with a dedicated assertion method: https://bitbucket.org/optiflowsrd/obelus/src/c2a2f78068123264adde8cc3ece4889c61773f00/obelus/test/__init__.py?at=default#cl-20 ---------- components: Library (Lib) messages: 197022 nosy: ezio.melotti, michael.foord, pitrou, vinay.sajip priority: normal severity: normal status: open title: add unittest assertion for logging type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 22:42:40 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 05 Sep 2013 20:42:40 +0000 Subject: [issue18937] add unittest assertion for logging In-Reply-To: <1378412761.53.0.263834884699.issue18937@psf.upfronthosting.co.za> Message-ID: <1378413760.62.0.649148279396.issue18937@psf.upfronthosting.co.za> R. David Murray added the comment: I have project in which that would be useful, so +1 from me for the general concept. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 22:56:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 05 Sep 2013 20:56:37 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <1378414597.93.0.961923473384.issue18924@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think Ethan has a point that the inconsistency when overriding a member can hide subtle bugs. I would agree with Eli and Eric if it wasn't for that problem. Also, we can first forbid overriding, then change our decision later on if someone comes with a use case (doing the converse would be more annoying as it would break compatibility). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 23:11:25 2013 From: report at bugs.python.org (Johnny Boy) Date: Thu, 05 Sep 2013 21:11:25 +0000 Subject: [issue18938] Prepend Is Not A Word Message-ID: <1378415485.5.0.896501812591.issue18938@psf.upfronthosting.co.za> New submission from Johnny Boy: If you do a custom install on Windows and click "Add python.exe to Path" the text below says "Prepend c:\Python33\ to the system Path variable" Prepend is not a word! The word you are looking for is Prefix. http://encyclopedia2.thefreedictionary.com/prepend " Although it sounds correct, prepend is not an English word. It was created to sound like the opposite of "append," which means to add to the end. The correct English word is "prefix;" " ---------- components: Installation messages: 197025 nosy: opticyclic priority: normal severity: normal status: open title: Prepend Is Not A Word versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 23:15:05 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 05 Sep 2013 21:15:05 +0000 Subject: [issue18934] multiprocessing: use selectors module In-Reply-To: <3cW9qf3yDVz7Lkb@mail.python.org> Message-ID: Charles-Fran?ois Natali added the comment: The test is failing on some (unstable) buildbots: http://buildbot.python.org/all/builders/AMD64%20Solaris%2011%20%5BSB%5D%203.x/builds/1598/steps/test/logs/stdio """ ====================================================================== FAIL: test_invalid_handles (test.test_multiprocessing_fork.TestInvalidHandle) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/3.x.snakebite-solaris11-amd64/build/Lib/test/_test_multiprocessing.py", line 2962, in test_invalid_handles self.assertRaises((ValueError, OSError), conn.poll) AssertionError: (, ) not raised by poll """ Basically, this test checks that calling poll() on an invalid Connection (invalid FD) raises an OSError. That's true for select, kqueue and epoll, but not for poll(), which returns POLLNVAL. I'm not sure about what to do here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 23:15:10 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Sep 2013 21:15:10 +0000 Subject: [issue18938] Prepend Is Not A Word In-Reply-To: <1378415485.5.0.896501812591.issue18938@psf.upfronthosting.co.za> Message-ID: <1378415710.71.0.418894492352.issue18938@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It is however a very common programming term. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 23:38:37 2013 From: report at bugs.python.org (Graham Wideman) Date: Thu, 05 Sep 2013 21:38:37 +0000 Subject: [issue18938] Prepend Is Not A Word In-Reply-To: <1378415485.5.0.896501812591.issue18938@psf.upfronthosting.co.za> Message-ID: <1378417117.36.0.933816913169.issue18938@psf.upfronthosting.co.za> Graham Wideman added the comment: "Prepend" appears in every online dictionary I consulted. For a dictionary to list it and give the usual meaning for it, pretty much demonstrates "prepend" functioning as a real word. That and its 1.3 million hits on google. "Prepend" certainly has a commonly understood meaning, particularly in computing. To the extent that "prepend" has became popular as the appropriate-sounding opposite of "append", that is exactly why it _should_ be used in this context... where one might well need to discuss adding strings before or after, and be clear about the distinction. ---------- nosy: +gwideman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 23:43:36 2013 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 05 Sep 2013 21:43:36 +0000 Subject: [issue18937] add unittest assertion for logging In-Reply-To: <1378412761.53.0.263834884699.issue18937@psf.upfronthosting.co.za> Message-ID: <1378417416.53.0.123668636054.issue18937@psf.upfronthosting.co.za> Vinay Sajip added the comment: I agree a context manager would be useful. Note that I have already provided a Handler subclass (TestHandler) as well as a Matcher class which allows matching of LogRecords, and which can be used in assertions. These are in test.support as they were originally intended for Python's own tests, but could be moved to the logging package if they are considered more generally useful. See this for how to use them: http://plumberjack.blogspot.co.uk/2010/09/unit-testing-and-logging.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:02:40 2013 From: report at bugs.python.org (Graham Wideman) Date: Thu, 05 Sep 2013 22:02:40 +0000 Subject: [issue18939] Venv docs regarding original python install Message-ID: <1378418560.94.0.0370764034466.issue18939@psf.upfronthosting.co.za> New submission from Graham Wideman: http://docs.python.org/dev/library/venv.html More detail needed regarding the original python environment The article explains how to use venv to create a new python installation with independent libraries etc, and a means to activate one or another virtual python environment. However, there are some points regarding the original python environment which are cloudy. (1) After pyvenv, what status does the original python installation have? Does pyvenv turn it into just one of now two or more virtual environments? Or is the original one special? Must it be specifically deactivated in order to activate a (different) virtual environment? (2) The motivation behind venv seems to be to create virtual enviroments that can be substantially or completely separate from the system site directories or from the original python that pyvenv was run from. Yet elsewhere the doc discusses how pyvenv creates a pyvenv.cfg file with a home key pointing back to the originating Python installation, and "sys.base_prefix and sys.base_exec_prefix point to the non-venv Python installation which was used to create the venv."... which suggest that a venv is _not_ independent of its creating Python installation. It would be helpful to provide some context for this seemingly contradictory information. Perhaps there are scenarios with differing degrees of independence, in which these pointers back to the originating Python installation may or may not be relevant? (3) How do you proceed to create virtual environments from scratch when you have no initial python installation, or no python installation of that python version? -- Hope these suggestions help. ---------- assignee: docs at python components: Documentation messages: 197030 nosy: docs at python, gwideman priority: normal severity: normal status: open title: Venv docs regarding original python install type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:02:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Sep 2013 22:02:58 +0000 Subject: [issue18933] Add link to source code in logging documentation In-Reply-To: <1378390206.88.0.825858805448.issue18933@psf.upfronthosting.co.za> Message-ID: <3cWG9Y3pbkz7LjT@mail.python.org> Roundup Robot added the comment: New changeset dc4e6b48c321 by Vinay Sajip in branch '2.7': Issue #18933: Added links to source code. http://hg.python.org/cpython/rev/dc4e6b48c321 New changeset 34e515f2fdfe by Vinay Sajip in branch '3.3': Issue #18933: Added links to source code. http://hg.python.org/cpython/rev/34e515f2fdfe New changeset c5924523747e by Vinay Sajip in branch 'default': Closes #18933: Merged update from 3.3. http://hg.python.org/cpython/rev/c5924523747e ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:04:11 2013 From: report at bugs.python.org (Erik Bray) Date: Thu, 05 Sep 2013 22:04:11 +0000 Subject: [issue18876] Problems with files opened in append mode with io module In-Reply-To: <1377796053.23.0.271574141063.issue18876@psf.upfronthosting.co.za> Message-ID: <1378418651.25.0.71018645547.issue18876@psf.upfronthosting.co.za> Erik Bray added the comment: Thank you! Has there been a separate issue opened for the BufferedWriter bug or can that be covered by this issue as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:08:59 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 05 Sep 2013 22:08:59 +0000 Subject: [issue18934] multiprocessing: use selectors module In-Reply-To: <1378399585.11.0.596283488282.issue18934@psf.upfronthosting.co.za> Message-ID: <1378418939.36.0.644825845371.issue18934@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I remember wondering at one time why EPOLLNVAL did not exist, and realizing that closed fds are just silently unregistered by epoll(). I guess the issue is that some of the selectors indicate a bad fd on registration, and others do it when polled. On registration On poll ---------------------------------------------------------------- SelectSelector No Raises OSError PollSelector No No (EVENT_READ or EVENT_WRITE) EpollSelector Raises OSError No KqueueSelector ? ? It would be easiest to relax the test, perhaps by just checking that conn.poll(0) raises or returns True. Or maybe PollSelector.select() should raise OSError if POLLNVAL is indicated. That would match the behaviour of SelectSelector.select(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:16:17 2013 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 05 Sep 2013 22:16:17 +0000 Subject: [issue18937] add unittest assertion for logging In-Reply-To: <1378412761.53.0.263834884699.issue18937@psf.upfronthosting.co.za> Message-ID: <1378419377.33.0.584718969732.issue18937@psf.upfronthosting.co.za> Vinay Sajip added the comment: Whoops, meant to say "... moved to the unittest package ...". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 01:49:28 2013 From: report at bugs.python.org (Joshua Olson) Date: Thu, 05 Sep 2013 23:49:28 +0000 Subject: [issue18940] TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time. Message-ID: <1378424967.99.0.0736879617379.issue18940@psf.upfronthosting.co.za> New submission from Joshua Olson: In TimedRotatingFileHandler if you have a low volume logger than hasn't written to the log within the interval time doRollover will fail because there is no file to rotate. os.rename(self.baseFilename, dfn) should be something like if os.path.exists(self.base_fileName): os.rename(self.baseFilename, dfn I have included a unit test file. This test fails on 2.7.1 and 2.7.3. I have not tried 2.7.5. ---------- components: Library (Lib) files: logging_test.py messages: 197035 nosy: solarmist priority: normal severity: normal status: open title: TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time. versions: Python 2.7 Added file: http://bugs.python.org/file31620/logging_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 01:56:09 2013 From: report at bugs.python.org (Joshua Olson) Date: Thu, 05 Sep 2013 23:56:09 +0000 Subject: [issue18941] RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover Message-ID: <1378425368.84.0.428778978895.issue18941@psf.upfronthosting.co.za> New submission from Joshua Olson: For low volume loggers RotatingFileHandler and TimedRotatingFileHandler will create possibly unnecessary files on doRollover, since they don't check the value of delay when opening the new self.stream. self.stream = self._open() should be something like if not self.delay: self.stream = self._open() ---------- messages: 197036 nosy: solarmist priority: normal severity: normal status: open title: RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 02:02:30 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 06 Sep 2013 00:02:30 +0000 Subject: [issue18931] new selectors module should support devpoll on Solaris In-Reply-To: <1378378715.64.0.328227872693.issue18931@psf.upfronthosting.co.za> Message-ID: <1378425750.93.0.511437334652.issue18931@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 02:07:05 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 06 Sep 2013 00:07:05 +0000 Subject: [issue18929] inspect.classify_class_attrs ignores metaclass In-Reply-To: <1378349462.72.0.930877473496.issue18929@psf.upfronthosting.co.za> Message-ID: <1378426025.13.0.859526095363.issue18929@psf.upfronthosting.co.za> Ethan Furman added the comment: Another option with the global fix is to only add the metaclass to the mro if the metaclass is not 'type'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 02:19:26 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 06 Sep 2013 00:19:26 +0000 Subject: [issue18808] Thread.join returns before PyThreadState is destroyed In-Reply-To: <1377179797.68.0.40345735309.issue18808@psf.upfronthosting.co.za> Message-ID: <1378426766.78.0.328967780995.issue18808@psf.upfronthosting.co.za> Tim Peters added the comment: So you're not concerned about a now-private API (which used to be advertised), but are concerned about a user mucking with a new private lock in an exceedingly unlikely (in the absence of malice) way. That clarifies things ;-) I'm not really concerned about either. User perversity knows no limits, though, so I wouldn't be surprised if some people are rolling their own higher-level threads in Python for reasons they think are compelling. Details don't really matter to that, right? Like: > Also, how would they wait for the thread to end, except by > triggering their own Event object? Any number of ways. Roll their own Event, roll their own Barrier, roll their own Condition, or even something as simple as keeping an integer count of the number of threads they created, and then (e.g.) while nthreads: time.sleep(1) at the end, with each thread doing a global nthreads with nthreads_lock: nthreads -= 1 in its end-of-life code. Essentially rolling their own clumsy variant of a Semaphore. I've seen code like that "in the wild". But, no, I'll join you in not worrying about it ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 02:46:02 2013 From: report at bugs.python.org (Joshua Olson) Date: Fri, 06 Sep 2013 00:46:02 +0000 Subject: [issue18940] TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time. In-Reply-To: <1378424967.99.0.0736879617379.issue18940@psf.upfronthosting.co.za> Message-ID: <1378428362.15.0.38207270954.issue18940@psf.upfronthosting.co.za> Joshua Olson added the comment: Here is a patch for the logging file from the cpython hg repo. ---------- keywords: +patch Added file: http://bugs.python.org/file31621/doRollover.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 02:47:48 2013 From: report at bugs.python.org (Joshua Olson) Date: Fri, 06 Sep 2013 00:47:48 +0000 Subject: [issue18940] TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time. In-Reply-To: <1378424967.99.0.0736879617379.issue18940@psf.upfronthosting.co.za> Message-ID: <1378428468.2.0.627177244957.issue18940@psf.upfronthosting.co.za> Changes by Joshua Olson : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 03:50:11 2013 From: report at bugs.python.org (Joshua Olson) Date: Fri, 06 Sep 2013 01:50:11 +0000 Subject: [issue18940] TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time. In-Reply-To: <1378424967.99.0.0736879617379.issue18940@psf.upfronthosting.co.za> Message-ID: <1378432211.65.0.0965587537225.issue18940@psf.upfronthosting.co.za> Changes by Joshua Olson : Removed file: http://bugs.python.org/file31621/doRollover.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 03:50:18 2013 From: report at bugs.python.org (Joshua Olson) Date: Fri, 06 Sep 2013 01:50:18 +0000 Subject: [issue18940] TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time. In-Reply-To: <1378424967.99.0.0736879617379.issue18940@psf.upfronthosting.co.za> Message-ID: <1378432218.24.0.366435654652.issue18940@psf.upfronthosting.co.za> Changes by Joshua Olson : Removed file: http://bugs.python.org/file31620/logging_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 03:50:55 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 06 Sep 2013 01:50:55 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <1378432255.62.0.590790449674.issue18924@psf.upfronthosting.co.za> Eric Snow added the comment: > I would agree with Eli and Eric if it wasn't for that problem. Agreed. That was the gist of my question that led to Ethan's example. If it's easy to accidentally break an enum, particularly in a subtle way, then it may not be worth taking a consenting adults approach. Usually in consenting adults cases, it's simply not worth adding the extra complexity (or taking the time) to lock down an API or cover all the cases--it won't be a problem in practice since normal usage doesn't bear enough risk to worry about it. In the case of enums, particularly in how they re-purpose classes and yet allow non-item attributes, there's a higher risk of accidentally breaking something during normal usage. They quack like a class, but maybe they need to look less like a duck. The question is, is the risk (and associated cost) of accidental breakage high enough to warrant the cost of being more heavy-handed? > Also, we can first forbid overriding, then change our decision later > on if someone comes with a use case (doing the converse would be more > annoying as it would break compatibility). +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 03:51:21 2013 From: report at bugs.python.org (Joshua Olson) Date: Fri, 06 Sep 2013 01:51:21 +0000 Subject: [issue18940] TimedRotatingFileHandler and RotatingFileHandler fail to doRollover if a logger has delay=True and no logs in that time. In-Reply-To: <1378424967.99.0.0736879617379.issue18940@psf.upfronthosting.co.za> Message-ID: <1378432281.27.0.409797023383.issue18940@psf.upfronthosting.co.za> Joshua Olson added the comment: This fixes the issue in both RotatingFilerHandler classes. ---------- title: TimedRotatingFileHandler fails to doRollover if a logger has delay=True and no logs in that time. -> TimedRotatingFileHandler and RotatingFileHandler fail to doRollover if a logger has delay=True and no logs in that time. Added file: http://bugs.python.org/file31622/doRollover.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 03:53:00 2013 From: report at bugs.python.org (Joshua Olson) Date: Fri, 06 Sep 2013 01:53:00 +0000 Subject: [issue18940] TimedRotatingFileHandler and RotatingFileHandler fail to doRollover if a logger has delay=True and no logs in that time. In-Reply-To: <1378424967.99.0.0736879617379.issue18940@psf.upfronthosting.co.za> Message-ID: <1378432380.87.0.686832433441.issue18940@psf.upfronthosting.co.za> Changes by Joshua Olson : Added file: http://bugs.python.org/file31623/logging_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 03:56:06 2013 From: report at bugs.python.org (Joshua Olson) Date: Fri, 06 Sep 2013 01:56:06 +0000 Subject: [issue18941] RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover In-Reply-To: <1378425368.84.0.428778978895.issue18941@psf.upfronthosting.co.za> Message-ID: <1378432566.6.0.266707744224.issue18941@psf.upfronthosting.co.za> Joshua Olson added the comment: Demonstrate the bug ---------- Added file: http://bugs.python.org/file31624/logging_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 03:56:46 2013 From: report at bugs.python.org (Joshua Olson) Date: Fri, 06 Sep 2013 01:56:46 +0000 Subject: [issue18941] RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover In-Reply-To: <1378425368.84.0.428778978895.issue18941@psf.upfronthosting.co.za> Message-ID: <1378432606.45.0.805007272645.issue18941@psf.upfronthosting.co.za> Joshua Olson added the comment: If delay is set then don't automatically open the new file. ---------- keywords: +patch Added file: http://bugs.python.org/file31625/delay_rollover.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 04:02:58 2013 From: report at bugs.python.org (Graham Wideman) Date: Fri, 06 Sep 2013 02:02:58 +0000 Subject: [issue18939] Venv docs regarding original python install In-Reply-To: <1378418560.94.0.0370764034466.issue18939@psf.upfronthosting.co.za> Message-ID: <1378432978.72.0.412156225351.issue18939@psf.upfronthosting.co.za> Graham Wideman added the comment: Additionally on the subject of venv docs: I would encourage making it more clear regarding how activate changes the user's PATH. Both http://www.python.org/dev/peps/pep-0405/ and http://docs.python.org/3.3/library/venv.html talk about how activate adds the activated python binary to the path, but doesn't mention what path: The one for the current console session? The system PATH environment variable (Windows) or one of the bash startup scripts (unix)? This is important, because it determines how far-reaching is activation of a particular virtual environment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 04:39:59 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 06 Sep 2013 02:39:59 +0000 Subject: [issue18939] Venv docs regarding original python install In-Reply-To: <1378418560.94.0.0370764034466.issue18939@psf.upfronthosting.co.za> Message-ID: <1378435199.39.0.513955602251.issue18939@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. It seems to me that that document is indeed not clear as to what is really going on. My understanding has always been that there is only one Python interpreter, but that it behaves differently when invoked through the symlink in the venv. I suppose that on Windows platforms where symlink isn't available it must actually copy the whole binary, but I don't use Windows so I don't know for sure. (So, to answer one of your questions, you *can't* create a venv for a Python you don't already have installed.) It should also mention that the activation is per-shell-session, which would answer some of your other questions. ---------- nosy: +r.david.murray, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 04:42:09 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 06 Sep 2013 02:42:09 +0000 Subject: [issue18940] TimedRotatingFileHandler and RotatingFileHandler fail to doRollover if a logger has delay=True and no logs in that time. In-Reply-To: <1378424967.99.0.0736879617379.issue18940@psf.upfronthosting.co.za> Message-ID: <1378435329.68.0.254362478575.issue18940@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 04:43:00 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 06 Sep 2013 02:43:00 +0000 Subject: [issue18941] RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover In-Reply-To: <1378425368.84.0.428778978895.issue18941@psf.upfronthosting.co.za> Message-ID: <1378435380.04.0.549014806194.issue18941@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 04:48:48 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 06 Sep 2013 02:48:48 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <1378435728.57.0.984351102215.issue18924@psf.upfronthosting.co.za> Ethan Furman added the comment: Heavy-handed would be having the metaclass turn all the enum members into read-only properties. The solution I have proposed is more like a wagging of one's finger saying, "No, no, that's not the right way!" ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:07:27 2013 From: report at bugs.python.org (Graham Wideman) Date: Fri, 06 Sep 2013 03:07:27 +0000 Subject: [issue18939] Venv docs regarding original python install In-Reply-To: <1378418560.94.0.0370764034466.issue18939@psf.upfronthosting.co.za> Message-ID: <1378436847.67.0.425426260956.issue18939@psf.upfronthosting.co.za> Graham Wideman added the comment: Thanks R. David for your comments. > It should also mention that the activation is per-shell-session, .. which also has implications (or lack of effect) for launching from Windows Explorer, for example. Seems like in practical use, one would need to set up a batch file or shell script to run a particular venv activate command and launch a command shell with that python environment already set up. "Shell for python 2.7.5 and library XYZ" etc. Advice along these lines would be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:46:24 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 06 Sep 2013 03:46:24 +0000 Subject: [issue18942] _debugmallocstats() gibberish output on Windows Message-ID: <1378439184.72.0.614374936253.issue18942@psf.upfronthosting.co.za> New submission from Tim Peters: On Windows, _debugmallocstats() output ends with lines like this: 0 free 12-sized PyTupleObjects * zd bytes each = 0 0 free 13-sized PyTupleObjects * zd bytes each = 0 "zd" is senseless. Betting it's due to using a %zd format code, which MS doesn't support (but Python itself supports in other printf-like functions, like PyErr_Format()). I'll track it down and fix it :-) ---------- assignee: tim.peters messages: 197048 nosy: tim.peters priority: normal severity: normal stage: needs patch status: open title: _debugmallocstats() gibberish output on Windows type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 06:11:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 04:11:26 +0000 Subject: [issue18942] _debugmallocstats() gibberish output on Windows In-Reply-To: <1378439184.72.0.614374936253.issue18942@psf.upfronthosting.co.za> Message-ID: <3cWQLk0vKtzNtB@mail.python.org> Roundup Robot added the comment: New changeset d95cc29ea94e by Tim Peters in branch '3.3': Issue #18942: sys._debugmallocstats() output was damaged on Windows. http://hg.python.org/cpython/rev/d95cc29ea94e New changeset 43f772554872 by Tim Peters in branch 'default': Nerge 3.3 into default. http://hg.python.org/cpython/rev/43f772554872 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 06:13:17 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 06 Sep 2013 04:13:17 +0000 Subject: [issue18942] _debugmallocstats() gibberish output on Windows In-Reply-To: <1378439184.72.0.614374936253.issue18942@psf.upfronthosting.co.za> Message-ID: <1378440797.39.0.303277705385.issue18942@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 06:44:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 04:44:01 +0000 Subject: [issue15350] {urllib,urllib.parse}.urlencode.__doc__ is unclear In-Reply-To: <1342263934.43.0.385544849615.issue15350@psf.upfronthosting.co.za> Message-ID: <3cWR4K1KTmz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 975d1e180689 by Senthil Kumaran in branch 'default': merge from 3.3 http://hg.python.org/cpython/rev/975d1e180689 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 06:46:21 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 06 Sep 2013 04:46:21 +0000 Subject: [issue15350] {urllib,urllib.parse}.urlencode.__doc__ is unclear In-Reply-To: <1342263934.43.0.385544849615.issue15350@psf.upfronthosting.co.za> Message-ID: <1378442781.26.0.793993518964.issue15350@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in 3.3 and cpython. 3.2 is security fix mode and patches are not backported. This does not apply to 2.7. Thanks for the patch. ---------- resolution: -> fixed status: open -> closed versions: -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 08:31:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Sep 2013 06:31:48 +0000 Subject: [issue18808] Thread.join returns before PyThreadState is destroyed In-Reply-To: <1378426766.78.0.328967780995.issue18808@psf.upfronthosting.co.za> Message-ID: <1378449102.2487.4.camel@fsol> Antoine Pitrou added the comment: Le vendredi 06 septembre 2013 ? 00:19 +0000, Tim Peters a ?crit : > Tim Peters added the comment: > > So you're not concerned about a now-private API (which used to be > advertised), but are concerned about a user mucking with a new private > lock in an exceedingly unlikely (in the absence of malice) way. That > clarifies things ;-) :-) The only reason I'm concerned about the user mucking with the private lock is that it's a new opportunity that's opened. But, yeah, I could remove the weakref and only keep the lock. The code would only be ~10 lines shorter, though. What do other people think? > in its end-of-life code. Essentially rolling their own clumsy variant > of a Semaphore. I guess they spell it like: import clumsy_threading as threading > I've seen code like that "in the wild". Well, I've sure seen my share of sleep() calls as a synchronization measure too (and removed a number of them)... :-) That's one of the reasons I added the timeout arguments, actually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 08:57:40 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 06 Sep 2013 06:57:40 +0000 Subject: [issue18934] multiprocessing: use selectors module In-Reply-To: <1378418939.36.0.644825845371.issue18934@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Richard Oudkerk added the comment: > > I remember wondering at one time why EPOLLNVAL did not exist, and realizing that closed fds are just silently unregistered by epoll(). Exactly. > I guess the issue is that some of the selectors indicate a bad fd on registration, and others do it when polled. > > On registration On poll > ---------------------------------------------------------------- > SelectSelector No Raises OSError > PollSelector No No (EVENT_READ or EVENT_WRITE) > EpollSelector Raises OSError No > KqueueSelector ? ? Kqueue raises OSError upon registration. Not sure about poll(). > It would be easiest to relax the test, perhaps by just checking that conn.poll(0) raises or returns True. That's what I think too. Apparently, the test was added for this issue: http://bugs.python.org/issue3321 Basically, the goal was to check that conn.poll() wouldn't crash if passed an invalid FD (which can happen if you register a FD greater than FD_SETSIZE in a fd_set). So relaxing the check would still make sense. > Or maybe PollSelector.select() should raise OSError if POLLNVAL is indicated. That would match the behaviour of SelectSelector.select(). Yes, that would be a possibility. I'll have to give it some more thought. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 10:08:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 08:08:09 +0000 Subject: [issue1584] Mac OS X: building with X11 Tkinter In-Reply-To: <1197345898.75.0.132866639605.issue1584@psf.upfronthosting.co.za> Message-ID: <3cWWbr4SXDz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 0986e4f5750d by Ned Deily in branch 'default': Issue #1584: Provide options to override default search paths for Tcl and Tk http://hg.python.org/cpython/rev/0986e4f5750d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 10:22:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 08:22:04 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <3cWWvw11Vgz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 985384cd6365 by Ned Deily in branch 'default': Issue #15663: Tcl/Tk 8.5.14 is now included with the OS X 10.6+ http://hg.python.org/cpython/rev/985384cd6365 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 10:25:54 2013 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 06 Sep 2013 08:25:54 +0000 Subject: [issue18939] Venv docs regarding original python install In-Reply-To: <1378418560.94.0.0370764034466.issue18939@psf.upfronthosting.co.za> Message-ID: <1378455954.45.0.98889043284.issue18939@psf.upfronthosting.co.za> Vinay Sajip added the comment: The venv documentation does assume that the reader knows what virtual environments are and how they work. More details are available in PEP 405, which is not referenced in this documentation - I will rectify that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 10:36:11 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 06 Sep 2013 08:36:11 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1378456571.85.0.453997601461.issue15663@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- dependencies: +Mac OS X: building with X11 Tkinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 10:51:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 08:51:55 +0000 Subject: [issue18939] Venv docs regarding original python install In-Reply-To: <1378418560.94.0.0370764034466.issue18939@psf.upfronthosting.co.za> Message-ID: <3cWXZL4d8Pz7LjN@mail.python.org> Roundup Robot added the comment: New changeset ad09332f856f by Vinay Sajip in branch '3.3': Issue #18939: Updated venv documentation with some clarifications. http://hg.python.org/cpython/rev/ad09332f856f New changeset 408b6b3dcf9a by Vinay Sajip in branch 'default': Closes #18939: Merged documentation update from 3.3. http://hg.python.org/cpython/rev/408b6b3dcf9a ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 11:00:02 2013 From: report at bugs.python.org (Armin Rigo) Date: Fri, 06 Sep 2013 09:00:02 +0000 Subject: [issue18943] argparse: default args in mutually exclusive groups Message-ID: <1378458002.17.0.371205806782.issue18943@psf.upfronthosting.co.za> New submission from Armin Rigo: In argparse, default arguments have a strange behavior that shows up in mutually exclusive groups: specifying explicitly on the command-line an argument, but giving it its default value, is sometimes equivalent to not specifying the argument at all, and sometimes not. See the attached test diff: it contains two apparently equivalent pieces of code, but one passes and one fails. The difference is that, in CPython, int("42") is 42 but int("4200") is not 4200 (in the sense of the operator "is"). The line that uses "is" in this way is this line in argparse.py (line 1783 in 2.7 head): if argument_values is not action.default: ---------- files: test_argparse.diff keywords: patch messages: 197058 nosy: arigo priority: normal severity: normal status: open title: argparse: default args in mutually exclusive groups versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file31626/test_argparse.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 11:01:37 2013 From: report at bugs.python.org (Armin Rigo) Date: Fri, 06 Sep 2013 09:01:37 +0000 Subject: [issue18943] argparse: default args in mutually exclusive groups In-Reply-To: <1378458002.17.0.371205806782.issue18943@psf.upfronthosting.co.za> Message-ID: <1378458097.23.0.519627571524.issue18943@psf.upfronthosting.co.za> Changes by Armin Rigo : ---------- keywords: -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 11:11:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 09:11:50 +0000 Subject: [issue18940] TimedRotatingFileHandler and RotatingFileHandler fail to doRollover if a logger has delay=True and no logs in that time. In-Reply-To: <1378424967.99.0.0736879617379.issue18940@psf.upfronthosting.co.za> Message-ID: <3cWY1L1JKtz7LjW@mail.python.org> Roundup Robot added the comment: New changeset 6a591870017c by Vinay Sajip in branch '2.7': Issue #18940: Handled low-volume logging when delay is True. http://hg.python.org/cpython/rev/6a591870017c New changeset 324774a59256 by Vinay Sajip in branch '3.3': Issue #18940: Handled low-volume logging when delay is True. http://hg.python.org/cpython/rev/324774a59256 New changeset 8002aee72837 by Vinay Sajip in branch 'default': Closes #18940: Merged fix from 3.3. http://hg.python.org/cpython/rev/8002aee72837 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 11:12:01 2013 From: report at bugs.python.org (Armin Rigo) Date: Fri, 06 Sep 2013 09:12:01 +0000 Subject: [issue18943] argparse: default args in mutually exclusive groups In-Reply-To: <1378458002.17.0.371205806782.issue18943@psf.upfronthosting.co.za> Message-ID: <1378458721.9.0.935337474484.issue18943@psf.upfronthosting.co.za> Changes by Armin Rigo : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 11:12:51 2013 From: report at bugs.python.org (Armin Rigo) Date: Fri, 06 Sep 2013 09:12:51 +0000 Subject: [issue18944] Minor mistake in test_set.py Message-ID: <1378458771.78.0.221134021979.issue18944@psf.upfronthosting.co.za> New submission from Armin Rigo: Found a minor mistake in test_set.py. Patch attached. ---------- components: Interpreter Core files: test_set.diff keywords: patch messages: 197060 nosy: arigo priority: normal severity: normal status: open title: Minor mistake in test_set.py versions: Python 3.5 Added file: http://bugs.python.org/file31627/test_set.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 11:27:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 09:27:03 +0000 Subject: [issue18941] RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover In-Reply-To: <1378425368.84.0.428778978895.issue18941@psf.upfronthosting.co.za> Message-ID: <3cWYLt3Nk6z7LjN@mail.python.org> Roundup Robot added the comment: New changeset 4d45f1ed1179 by Vinay Sajip in branch '2.7': Issue #18941: Respected delay when doing rollover. http://hg.python.org/cpython/rev/4d45f1ed1179 New changeset 0577c9a82c0a by Vinay Sajip in branch '3.3': Issue #18941: Respected delay when doing rollover. http://hg.python.org/cpython/rev/0577c9a82c0a New changeset 7627fea85a6d by Vinay Sajip in branch 'default': Closes #18941: Merged fix from 3.3. http://hg.python.org/cpython/rev/7627fea85a6d ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 11:34:12 2013 From: report at bugs.python.org (Vlad Shcherbina) Date: Fri, 06 Sep 2013 09:34:12 +0000 Subject: [issue18945] Name collision handling in tempfile is not covered by tests Message-ID: <1378460052.66.0.943377543243.issue18945@psf.upfronthosting.co.za> New submission from Vlad Shcherbina: I intend to add test for (existing dir)-(new file) collision in http://bugs.python.org/issue18849, but file-file, file-dir and dir-dir collisions are yet to be covered. ---------- components: Tests messages: 197062 nosy: vlad priority: normal severity: normal status: open title: Name collision handling in tempfile is not covered by tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 13:58:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Sep 2013 11:58:52 +0000 Subject: [issue18876] Problems with files opened in append mode with io module In-Reply-To: <1378418651.25.0.71018645547.issue18876@psf.upfronthosting.co.za> Message-ID: <985449185.41369533.1378468726108.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Erik Bray added the comment: > > Thank you! Has there been a separate issue opened for the > BufferedWriter bug or can that be covered by this issue as well? No other issue has been opened as I know of, but indeed it would be clearer to open a separate one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 14:51:00 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 06 Sep 2013 12:51:00 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1378471860.64.0.829056796895.issue15663@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Great work. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:14:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 13:14:56 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <3cWfPq6Wpmz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 7611e7244bdd by Eli Bendersky in branch '3.3': Issue #18849: Fixed a Windows-specific tempfile bug where collision with an http://hg.python.org/cpython/rev/7611e7244bdd New changeset 035b61b52caa by Eli Bendersky in branch 'default': Issue #18849: Fixed a Windows-specific tempfile bug where collision with an http://hg.python.org/cpython/rev/035b61b52caa ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:17:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 13:17:55 +0000 Subject: [issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows In-Reply-To: <1377593921.13.0.684885433639.issue18849@psf.upfronthosting.co.za> Message-ID: <3cWfTH04Csz7Lk2@mail.python.org> Roundup Robot added the comment: New changeset e0037f266d45 by Eli Bendersky in branch '2.7': Close #18849: Fixed a Windows-specific tempfile bug where collision with an http://hg.python.org/cpython/rev/e0037f266d45 ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:33:46 2013 From: report at bugs.python.org (Thomas Heller) Date: Fri, 06 Sep 2013 13:33:46 +0000 Subject: [issue18852] site.py does not handle readline.__doc__ being None In-Reply-To: <1377609308.01.0.92318264163.issue18852@psf.upfronthosting.co.za> Message-ID: <1378474426.66.0.578833994216.issue18852@psf.upfronthosting.co.za> Thomas Heller added the comment: I suggest to remove the comment part from the patch and then apply it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:49:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 13:49:54 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> Message-ID: <3cWgBB1hzyz7LjM@mail.python.org> Roundup Robot added the comment: New changeset ec9a4b77f37b by Eli Bendersky in branch 'default': Issue #18920: argparse's default version action (for -v, --version) should http://hg.python.org/cpython/rev/ec9a4b77f37b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:50:24 2013 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 06 Sep 2013 13:50:24 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> Message-ID: <1378475424.58.0.263424214514.issue18920@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks, I moved the NEWS entry to the right place. Yes, all tests pass. I'll update whatsnew separately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:56:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 13:56:37 +0000 Subject: [issue18922] Output versions of scripts to stdout In-Reply-To: <1378306168.12.0.839885180116.issue18922@psf.upfronthosting.co.za> Message-ID: <3cWgKw6XWLz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 587bdb940524 by Eli Bendersky in branch 'default': Update whatsnew/3.4 wrt. --version going to stdout. #18338, #18920, #18922 http://hg.python.org/cpython/rev/587bdb940524 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:56:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 13:56:38 +0000 Subject: [issue18338] python --version should send output to STDOUT In-Reply-To: <1372676487.3.0.302989276182.issue18338@psf.upfronthosting.co.za> Message-ID: <3cWgKx4lQ7z7LjN@mail.python.org> Roundup Robot added the comment: New changeset 587bdb940524 by Eli Bendersky in branch 'default': Update whatsnew/3.4 wrt. --version going to stdout. #18338, #18920, #18922 http://hg.python.org/cpython/rev/587bdb940524 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:56:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 13:56:39 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> Message-ID: <3cWgKy311yz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 587bdb940524 by Eli Bendersky in branch 'default': Update whatsnew/3.4 wrt. --version going to stdout. #18338, #18920, #18922 http://hg.python.org/cpython/rev/587bdb940524 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:57:07 2013 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 06 Sep 2013 13:57:07 +0000 Subject: [issue18920] argparse module version action In-Reply-To: <1378297847.46.0.268237187871.issue18920@psf.upfronthosting.co.za> Message-ID: <1378475827.11.0.275931173879.issue18920@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 16:02:13 2013 From: report at bugs.python.org (=?utf-8?q?Dani=C3=ABl_van_Eeden?=) Date: Fri, 06 Sep 2013 14:02:13 +0000 Subject: [issue917120] imaplib: incorrect quoting in commands Message-ID: <1378476133.34.0.388969735708.issue917120@psf.upfronthosting.co.za> Changes by Dani?l van Eeden : ---------- nosy: +dveeden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 16:13:35 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 06 Sep 2013 14:13:35 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <1378476815.53.0.380323526128.issue18924@psf.upfronthosting.co.za> Ethan Furman added the comment: In retrospect the read-only properties would not be any more difficult to get around than the __setattr__ solution, and it would conflict with our use of _RouteClassAttributeToGetattr. To properly replace an enum member one has to change two internal data structures: _member_map_ -> 'enum_name' : member _member2value_map -> enum_value : member # if hashable To actually create a real (non-mock) member is even more work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 16:17:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2013 14:17:19 +0000 Subject: [issue18924] Enum members are easily replaced In-Reply-To: <1378324047.44.0.111510450424.issue18924@psf.upfronthosting.co.za> Message-ID: <3cWgnp264zz7Lkj@mail.python.org> Roundup Robot added the comment: New changeset 1d88d04aade2 by Ethan Furman in branch 'default': Close #18924: Block naive attempts to change an Enum member. http://hg.python.org/cpython/rev/1d88d04aade2 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 16:20:34 2013 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 06 Sep 2013 14:20:34 +0000 Subject: [issue18945] Name collision handling in tempfile is not covered by tests In-Reply-To: <1378460052.66.0.943377543243.issue18945@psf.upfronthosting.co.za> Message-ID: <1378477234.25.0.260409644476.issue18945@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 16:57:13 2013 From: report at bugs.python.org (Armin Rigo) Date: Fri, 06 Sep 2013 14:57:13 +0000 Subject: [issue16938] pydoc confused by __dir__ In-Reply-To: <1357944129.98.0.501949279766.issue16938@psf.upfronthosting.co.za> Message-ID: <1378479433.92.0.994881181732.issue16938@psf.upfronthosting.co.za> Armin Rigo added the comment: I believe that this describes a problem more general than the problem of Enums from Issue18693: help(x) shouldn't crash in the presence of a __dir__() method that returns unexpected names. ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 17:04:10 2013 From: report at bugs.python.org (Steve Dower) Date: Fri, 06 Sep 2013 15:04:10 +0000 Subject: [issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1378479850.84.0.769306756548.issue7511@psf.upfronthosting.co.za> Steve Dower added the comment: I believe that is all that is missing from the patches I posted, though I'd have thought that having Visual C++ 2010 Express installed would be sufficient without the patch (though you didn't mention C++, so maybe you have a different one?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 18:10:43 2013 From: report at bugs.python.org (James Lu) Date: Fri, 06 Sep 2013 16:10:43 +0000 Subject: [issue18946] HTMLParser should ignore errors when parsing text in